mirror of
https://github.com/thousandeyes/thousandeyes-sdk-python.git
synced 2026-06-19 17:36:51 +00:00
[GitHub Bot] Generated python SDK
This commit is contained in:
parent
a2aaa9f059
commit
cc2066c6ee
@ -28,6 +28,8 @@ docs/ExpandAccountGroupOptions.md
|
||||
docs/ExtendedUser.md
|
||||
docs/InterfaceIpMapping.md
|
||||
docs/Link.md
|
||||
docs/NetworkProviderInfo.md
|
||||
docs/NetworkProviderType.md
|
||||
docs/PaginationLinks.md
|
||||
docs/Permission.md
|
||||
docs/Permissions.md
|
||||
@ -40,6 +42,7 @@ docs/Roles.md
|
||||
docs/RolesApi.md
|
||||
docs/SelfLinks.md
|
||||
docs/SimpleAgent.md
|
||||
docs/SimpleAgentAllOfNetworkProviderInfo.md
|
||||
docs/SimpleTest.md
|
||||
docs/TestInterval.md
|
||||
docs/TestLinks.md
|
||||
@ -93,6 +96,8 @@ src/thousandeyes_sdk/administrative/models/expand_account_group_options.py
|
||||
src/thousandeyes_sdk/administrative/models/extended_user.py
|
||||
src/thousandeyes_sdk/administrative/models/interface_ip_mapping.py
|
||||
src/thousandeyes_sdk/administrative/models/link.py
|
||||
src/thousandeyes_sdk/administrative/models/network_provider_info.py
|
||||
src/thousandeyes_sdk/administrative/models/network_provider_type.py
|
||||
src/thousandeyes_sdk/administrative/models/pagination_links.py
|
||||
src/thousandeyes_sdk/administrative/models/permission.py
|
||||
src/thousandeyes_sdk/administrative/models/permissions.py
|
||||
@ -103,6 +108,7 @@ 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_agent_all_of_network_provider_info.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
|
||||
|
||||
@ -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.84
|
||||
- API version: 7.0.92
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
@ -152,6 +152,8 @@ Class | Method | HTTP request | Description
|
||||
- [ExtendedUser](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/ExtendedUser.md)
|
||||
- [InterfaceIpMapping](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/InterfaceIpMapping.md)
|
||||
- [Link](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/Link.md)
|
||||
- [NetworkProviderInfo](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/NetworkProviderInfo.md)
|
||||
- [NetworkProviderType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/NetworkProviderType.md)
|
||||
- [PaginationLinks](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/PaginationLinks.md)
|
||||
- [Permission](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/Permission.md)
|
||||
- [Permissions](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/Permissions.md)
|
||||
@ -162,6 +164,7 @@ 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)
|
||||
- [SimpleAgentAllOfNetworkProviderInfo](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/SimpleAgentAllOfNetworkProviderInfo.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)
|
||||
|
||||
@ -13,9 +13,10 @@ Name | Type | Description | Notes
|
||||
**location** | **str** | Location of the agent. | [optional] [readonly]
|
||||
**country_id** | **str** | 2-digit ISO country code | [optional] [readonly]
|
||||
**coordinates** | [**Coordinates**](Coordinates.md) | | [optional]
|
||||
**network_provider_info** | [**SimpleAgentAllOfNetworkProviderInfo**](SimpleAgentAllOfNetworkProviderInfo.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's set to ignore SSL errors on browserbot-based tests. | [optional] [readonly]
|
||||
**prefix** | **str** | Prefix containing agents public IP address. | [optional] [readonly]
|
||||
**agent_type** | [**CloudEnterpriseAgentType**](CloudEnterpriseAgentType.md) | |
|
||||
|
||||
## Example
|
||||
|
||||
@ -14,6 +14,7 @@ Name | Type | Description | Notes
|
||||
**last_seen** | **datetime** | UTC last seen date (ISO date-time format). | [optional] [readonly]
|
||||
**agent_state** | [**EnterpriseAgentState**](EnterpriseAgentState.md) | | [optional]
|
||||
**target_for_tests** | **str** | Test target IP address. | [optional]
|
||||
**serial_number** | **str** | Serial number of an enterprise agent or cluster member device. This field is not available for Cloud Agents. | [optional] [readonly]
|
||||
**utilization** | **int** | Shows overall utilization percentage (online Enterprise Agents and Enterprise Clusters only). | [optional] [readonly]
|
||||
|
||||
## Example
|
||||
|
||||
@ -14,9 +14,10 @@ Name | Type | Description | Notes
|
||||
**location** | **str** | Location of the agent. | [optional] [readonly]
|
||||
**country_id** | **str** | 2-digit ISO country code | [optional] [readonly]
|
||||
**coordinates** | [**Coordinates**](Coordinates.md) | | [optional]
|
||||
**network_provider_info** | [**SimpleAgentAllOfNetworkProviderInfo**](SimpleAgentAllOfNetworkProviderInfo.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's set to ignore SSL errors on browserbot-based tests. | [optional] [readonly]
|
||||
**prefix** | **str** | Prefix containing agents public IP address. | [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 `/tests` 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]
|
||||
@ -30,6 +31,7 @@ Name | Type | Description | Notes
|
||||
**keep_browser_cache** | **bool** | Flag indicating if the agent retains cache. | [optional]
|
||||
**created_date** | **datetime** | UTC Agent creation date (ISO date-time format). | [optional] [readonly]
|
||||
**target_for_tests** | **str** | Test target IP address. | [optional]
|
||||
**serial_number** | **str** | Serial number of an enterprise agent or cluster member device. This field is not available for Cloud Agents. | [optional] [readonly]
|
||||
**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_mapping** | [**List[InterfaceIpMapping]**](InterfaceIpMapping.md) | | [optional] [readonly]
|
||||
|
||||
|
||||
@ -18,6 +18,7 @@ Name | Type | Description | Notes
|
||||
**keep_browser_cache** | **bool** | Flag indicating if the agent retains cache. | [optional]
|
||||
**created_date** | **datetime** | UTC Agent creation date (ISO date-time format). | [optional] [readonly]
|
||||
**target_for_tests** | **str** | Test target IP address. | [optional]
|
||||
**serial_number** | **str** | Serial number of an enterprise agent or cluster member device. This field is not available for Cloud Agents. | [optional] [readonly]
|
||||
**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_mapping** | [**List[InterfaceIpMapping]**](InterfaceIpMapping.md) | | [optional] [readonly]
|
||||
|
||||
|
||||
32
thousandeyes-sdk-administrative/docs/NetworkProviderInfo.md
Normal file
32
thousandeyes-sdk-administrative/docs/NetworkProviderInfo.md
Normal file
@ -0,0 +1,32 @@
|
||||
# NetworkProviderInfo
|
||||
|
||||
Information about the network provider that owns the agent's public IP prefix.
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**asn** | **int** | Autonomous System Number (ASN) announcing the agent's public IP prefix. | [optional] [readonly]
|
||||
**name** | **str** | Name of the network provider organization. | [optional] [readonly]
|
||||
**type** | [**NetworkProviderType**](NetworkProviderType.md) | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from thousandeyes_sdk.administrative.models.network_provider_info import NetworkProviderInfo
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of NetworkProviderInfo from a JSON string
|
||||
network_provider_info_instance = NetworkProviderInfo.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(NetworkProviderInfo.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
network_provider_info_dict = network_provider_info_instance.to_dict()
|
||||
# create an instance of NetworkProviderInfo from a dict
|
||||
network_provider_info_from_dict = NetworkProviderInfo.from_dict(network_provider_info_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)
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# ApiAgentWidgetShow
|
||||
# NetworkProviderType
|
||||
|
||||
Ownership of the agent.
|
||||
Classification of the agent's network provider.
|
||||
|
||||
## Properties
|
||||
|
||||
@ -13,9 +13,10 @@ Name | Type | Description | Notes
|
||||
**location** | **str** | Location of the agent. | [optional] [readonly]
|
||||
**country_id** | **str** | 2-digit ISO country code | [optional] [readonly]
|
||||
**coordinates** | [**Coordinates**](Coordinates.md) | | [optional]
|
||||
**network_provider_info** | [**SimpleAgentAllOfNetworkProviderInfo**](SimpleAgentAllOfNetworkProviderInfo.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's set to ignore SSL errors on browserbot-based tests. | [optional] [readonly]
|
||||
**prefix** | **str** | Prefix containing agents public IP address. | [optional] [readonly]
|
||||
|
||||
## Example
|
||||
|
||||
|
||||
@ -0,0 +1,31 @@
|
||||
# SimpleAgentAllOfNetworkProviderInfo
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**asn** | **int** | Autonomous System Number (ASN) announcing the agent's public IP prefix. | [optional] [readonly]
|
||||
**name** | **str** | Name of the network provider organization. | [optional] [readonly]
|
||||
**type** | [**NetworkProviderType**](NetworkProviderType.md) | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from thousandeyes_sdk.administrative.models.simple_agent_all_of_network_provider_info import SimpleAgentAllOfNetworkProviderInfo
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of SimpleAgentAllOfNetworkProviderInfo from a JSON string
|
||||
simple_agent_all_of_network_provider_info_instance = SimpleAgentAllOfNetworkProviderInfo.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(SimpleAgentAllOfNetworkProviderInfo.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
simple_agent_all_of_network_provider_info_dict = simple_agent_all_of_network_provider_info_instance.to_dict()
|
||||
# create an instance of SimpleAgentAllOfNetworkProviderInfo from a dict
|
||||
simple_agent_all_of_network_provider_info_from_dict = SimpleAgentAllOfNetworkProviderInfo.from_dict(simple_agent_all_of_network_provider_info_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)
|
||||
|
||||
|
||||
@ -48,6 +48,8 @@ from thousandeyes_sdk.administrative.models.expand_account_group_options import
|
||||
from thousandeyes_sdk.administrative.models.extended_user import ExtendedUser
|
||||
from thousandeyes_sdk.administrative.models.interface_ip_mapping import InterfaceIpMapping
|
||||
from thousandeyes_sdk.administrative.models.link import Link
|
||||
from thousandeyes_sdk.administrative.models.network_provider_info import NetworkProviderInfo
|
||||
from thousandeyes_sdk.administrative.models.network_provider_type import NetworkProviderType
|
||||
from thousandeyes_sdk.administrative.models.pagination_links import PaginationLinks
|
||||
from thousandeyes_sdk.administrative.models.permission import Permission
|
||||
from thousandeyes_sdk.administrative.models.permissions import Permissions
|
||||
@ -58,6 +60,7 @@ 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_agent_all_of_network_provider_info import SimpleAgentAllOfNetworkProviderInfo
|
||||
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
|
||||
|
||||
@ -39,6 +39,8 @@ from thousandeyes_sdk.administrative.models.expand_account_group_options import
|
||||
from thousandeyes_sdk.administrative.models.extended_user import ExtendedUser
|
||||
from thousandeyes_sdk.administrative.models.interface_ip_mapping import InterfaceIpMapping
|
||||
from thousandeyes_sdk.administrative.models.link import Link
|
||||
from thousandeyes_sdk.administrative.models.network_provider_info import NetworkProviderInfo
|
||||
from thousandeyes_sdk.administrative.models.network_provider_type import NetworkProviderType
|
||||
from thousandeyes_sdk.administrative.models.pagination_links import PaginationLinks
|
||||
from thousandeyes_sdk.administrative.models.permission import Permission
|
||||
from thousandeyes_sdk.administrative.models.permissions import Permissions
|
||||
@ -49,6 +51,7 @@ 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_agent_all_of_network_provider_info import SimpleAgentAllOfNetworkProviderInfo
|
||||
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
|
||||
|
||||
@ -20,6 +20,7 @@ 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 thousandeyes_sdk.administrative.models.simple_agent_all_of_network_provider_info import SimpleAgentAllOfNetworkProviderInfo
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
@ -35,11 +36,12 @@ class AgentResponse(BaseModel):
|
||||
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
|
||||
network_provider_info: Optional[SimpleAgentAllOfNetworkProviderInfo] = Field(default=None, alias="networkProviderInfo")
|
||||
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")
|
||||
prefix: Optional[StrictStr] = Field(default=None, description="Prefix containing agents public IP address.")
|
||||
agent_type: CloudEnterpriseAgentType = Field(alias="agentType")
|
||||
__properties: ClassVar[List[str]] = ["ipAddresses", "publicIpAddresses", "network", "agentId", "agentName", "location", "countryId", "coordinates", "enabled", "prefix", "verifySslCertificates", "agentType"]
|
||||
__properties: ClassVar[List[str]] = ["ipAddresses", "publicIpAddresses", "network", "agentId", "agentName", "location", "countryId", "coordinates", "networkProviderInfo", "enabled", "verifySslCertificates", "prefix", "agentType"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
@ -88,8 +90,8 @@ class AgentResponse(BaseModel):
|
||||
"agent_id",
|
||||
"location",
|
||||
"country_id",
|
||||
"prefix",
|
||||
"verify_ssl_certificates",
|
||||
"prefix",
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
@ -100,6 +102,9 @@ class AgentResponse(BaseModel):
|
||||
# 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 network_provider_info
|
||||
if self.network_provider_info:
|
||||
_dict['networkProviderInfo'] = self.network_provider_info.to_dict()
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
@ -120,9 +125,10 @@ class AgentResponse(BaseModel):
|
||||
"location": obj.get("location"),
|
||||
"countryId": obj.get("countryId"),
|
||||
"coordinates": Coordinates.from_dict(obj["coordinates"]) if obj.get("coordinates") is not None else None,
|
||||
"networkProviderInfo": SimpleAgentAllOfNetworkProviderInfo.from_dict(obj["networkProviderInfo"]) if obj.get("networkProviderInfo") is not None else None,
|
||||
"enabled": obj.get("enabled"),
|
||||
"prefix": obj.get("prefix"),
|
||||
"verifySslCertificates": obj.get("verifySslCertificates"),
|
||||
"prefix": obj.get("prefix"),
|
||||
"agentType": obj.get("agentType")
|
||||
})
|
||||
return _obj
|
||||
|
||||
@ -37,8 +37,9 @@ class ClusterMember(BaseModel):
|
||||
last_seen: Optional[datetime] = Field(default=None, description="UTC last seen date (ISO date-time format).", alias="lastSeen")
|
||||
agent_state: Optional[EnterpriseAgentState] = Field(default=None, alias="agentState")
|
||||
target_for_tests: Optional[StrictStr] = Field(default=None, description="Test target IP address.", alias="targetForTests")
|
||||
serial_number: Optional[StrictStr] = Field(default=None, description="Serial number of an enterprise agent or cluster member device. This field is not available for Cloud Agents.", alias="serialNumber")
|
||||
utilization: Optional[StrictInt] = Field(default=None, description="Shows overall utilization percentage (online Enterprise Agents and Enterprise Clusters only).")
|
||||
__properties: ClassVar[List[str]] = ["ipAddresses", "publicIpAddresses", "network", "memberId", "name", "errorDetails", "lastSeen", "agentState", "targetForTests", "utilization"]
|
||||
__properties: ClassVar[List[str]] = ["ipAddresses", "publicIpAddresses", "network", "memberId", "name", "errorDetails", "lastSeen", "agentState", "targetForTests", "serialNumber", "utilization"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
@ -79,6 +80,7 @@ class ClusterMember(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",
|
||||
@ -88,6 +90,7 @@ class ClusterMember(BaseModel):
|
||||
"name",
|
||||
"error_details",
|
||||
"last_seen",
|
||||
"serial_number",
|
||||
"utilization",
|
||||
])
|
||||
|
||||
@ -124,6 +127,7 @@ class ClusterMember(BaseModel):
|
||||
"lastSeen": obj.get("lastSeen"),
|
||||
"agentState": obj.get("agentState"),
|
||||
"targetForTests": obj.get("targetForTests"),
|
||||
"serialNumber": obj.get("serialNumber"),
|
||||
"utilization": obj.get("utilization")
|
||||
})
|
||||
return _obj
|
||||
|
||||
@ -27,6 +27,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_agent_all_of_network_provider_info import SimpleAgentAllOfNetworkProviderInfo
|
||||
from thousandeyes_sdk.administrative.models.simple_test import SimpleTest
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
@ -44,9 +45,10 @@ class EnterpriseAgent(BaseModel):
|
||||
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
|
||||
network_provider_info: Optional[SimpleAgentAllOfNetworkProviderInfo] = Field(default=None, alias="networkProviderInfo")
|
||||
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")
|
||||
prefix: Optional[StrictStr] = Field(default=None, description="Prefix containing agents public IP address.")
|
||||
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")
|
||||
@ -60,9 +62,10 @@ class EnterpriseAgent(BaseModel):
|
||||
keep_browser_cache: Optional[StrictBool] = Field(default=None, description="Flag indicating if the agent retains cache.", alias="keepBrowserCache")
|
||||
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")
|
||||
serial_number: Optional[StrictStr] = Field(default=None, description="Serial number of an enterprise agent or cluster member device. This field is not available for Cloud Agents.", alias="serialNumber")
|
||||
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_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"]
|
||||
__properties: ClassVar[List[str]] = ["agentType", "ipAddresses", "publicIpAddresses", "network", "agentId", "agentName", "location", "countryId", "coordinates", "networkProviderInfo", "enabled", "verifySslCertificates", "prefix", "testIds", "tests", "clusterMembers", "utilization", "accountGroups", "ipv6Policy", "errorDetails", "hostname", "lastSeen", "agentState", "keepBrowserCache", "createdDate", "targetForTests", "serialNumber", "localResolutionPrefixes", "interfaceIpMapping"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
@ -111,6 +114,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",
|
||||
@ -119,8 +123,8 @@ class EnterpriseAgent(BaseModel):
|
||||
"agent_id",
|
||||
"location",
|
||||
"country_id",
|
||||
"prefix",
|
||||
"verify_ssl_certificates",
|
||||
"prefix",
|
||||
"test_ids",
|
||||
"cluster_members",
|
||||
"utilization",
|
||||
@ -128,6 +132,7 @@ class EnterpriseAgent(BaseModel):
|
||||
"hostname",
|
||||
"last_seen",
|
||||
"created_date",
|
||||
"serial_number",
|
||||
"interface_ip_mapping",
|
||||
])
|
||||
|
||||
@ -139,6 +144,9 @@ class EnterpriseAgent(BaseModel):
|
||||
# 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 network_provider_info
|
||||
if self.network_provider_info:
|
||||
_dict['networkProviderInfo'] = self.network_provider_info.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of each item in tests (list)
|
||||
_items = []
|
||||
if self.tests:
|
||||
@ -195,9 +203,10 @@ class EnterpriseAgent(BaseModel):
|
||||
"location": obj.get("location"),
|
||||
"countryId": obj.get("countryId"),
|
||||
"coordinates": Coordinates.from_dict(obj["coordinates"]) if obj.get("coordinates") is not None else None,
|
||||
"networkProviderInfo": SimpleAgentAllOfNetworkProviderInfo.from_dict(obj["networkProviderInfo"]) if obj.get("networkProviderInfo") is not None else None,
|
||||
"enabled": obj.get("enabled"),
|
||||
"prefix": obj.get("prefix"),
|
||||
"verifySslCertificates": obj.get("verifySslCertificates"),
|
||||
"prefix": obj.get("prefix"),
|
||||
"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,
|
||||
@ -211,6 +220,7 @@ class EnterpriseAgent(BaseModel):
|
||||
"keepBrowserCache": obj.get("keepBrowserCache"),
|
||||
"createdDate": obj.get("createdDate"),
|
||||
"targetForTests": obj.get("targetForTests"),
|
||||
"serialNumber": obj.get("serialNumber"),
|
||||
"localResolutionPrefixes": obj.get("localResolutionPrefixes"),
|
||||
"interfaceIpMapping": [InterfaceIpMapping.from_dict(_item) for _item in obj["interfaceIpMapping"]] if obj.get("interfaceIpMapping") is not None else None
|
||||
})
|
||||
|
||||
@ -46,9 +46,10 @@ class EnterpriseAgentData(BaseModel):
|
||||
keep_browser_cache: Optional[StrictBool] = Field(default=None, description="Flag indicating if the agent retains cache.", alias="keepBrowserCache")
|
||||
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")
|
||||
serial_number: Optional[StrictStr] = Field(default=None, description="Serial number of an enterprise agent or cluster member device. This field is not available for Cloud Agents.", alias="serialNumber")
|
||||
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_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"]
|
||||
__properties: ClassVar[List[str]] = ["testIds", "tests", "clusterMembers", "utilization", "accountGroups", "ipv6Policy", "errorDetails", "hostname", "lastSeen", "agentState", "keepBrowserCache", "createdDate", "targetForTests", "serialNumber", "localResolutionPrefixes", "interfaceIpMapping"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
@ -89,6 +90,7 @@ 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",
|
||||
@ -98,6 +100,7 @@ class EnterpriseAgentData(BaseModel):
|
||||
"hostname",
|
||||
"last_seen",
|
||||
"created_date",
|
||||
"serial_number",
|
||||
"interface_ip_mapping",
|
||||
])
|
||||
|
||||
@ -166,6 +169,7 @@ class EnterpriseAgentData(BaseModel):
|
||||
"keepBrowserCache": obj.get("keepBrowserCache"),
|
||||
"createdDate": obj.get("createdDate"),
|
||||
"targetForTests": obj.get("targetForTests"),
|
||||
"serialNumber": obj.get("serialNumber"),
|
||||
"localResolutionPrefixes": obj.get("localResolutionPrefixes"),
|
||||
"interfaceIpMapping": [InterfaceIpMapping.from_dict(_item) for _item in obj["interfaceIpMapping"]] if obj.get("interfaceIpMapping") is not None else None
|
||||
})
|
||||
|
||||
@ -0,0 +1,96 @@
|
||||
# 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, StrictInt, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from thousandeyes_sdk.administrative.models.network_provider_type import NetworkProviderType
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class NetworkProviderInfo(BaseModel):
|
||||
"""
|
||||
Information about the network provider that owns the agent's public IP prefix.
|
||||
""" # noqa: E501
|
||||
asn: Optional[StrictInt] = Field(default=None, description="Autonomous System Number (ASN) announcing the agent's public IP prefix.")
|
||||
name: Optional[StrictStr] = Field(default=None, description="Name of the network provider organization.")
|
||||
type: Optional[NetworkProviderType] = None
|
||||
__properties: ClassVar[List[str]] = ["asn", "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 NetworkProviderInfo 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([
|
||||
"asn",
|
||||
"name",
|
||||
])
|
||||
|
||||
_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 NetworkProviderInfo from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"asn": obj.get("asn"),
|
||||
"name": obj.get("name"),
|
||||
"type": obj.get("type")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@ -0,0 +1,44 @@
|
||||
# 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 NetworkProviderType(str, Enum):
|
||||
"""
|
||||
Classification of the agent's network provider.
|
||||
"""
|
||||
|
||||
"""
|
||||
allowed enum values
|
||||
"""
|
||||
UNKNOWN = 'unknown'
|
||||
ISP = 'isp'
|
||||
CDN = 'cdn'
|
||||
STUB = 'stub'
|
||||
CLOUD_MINUS_PROVIDER = 'cloud-provider'
|
||||
CARRIER = 'carrier'
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Self:
|
||||
"""Create an instance of NetworkProviderType from a JSON string"""
|
||||
return cls(json.loads(json_str))
|
||||
|
||||
@classmethod
|
||||
def _missing_(cls, value):
|
||||
"""Handle unknown values"""
|
||||
return cls.UNKNOWN
|
||||
|
||||
@ -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.coordinates import Coordinates
|
||||
from thousandeyes_sdk.administrative.models.simple_agent_all_of_network_provider_info import SimpleAgentAllOfNetworkProviderInfo
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
@ -34,10 +35,11 @@ class SimpleAgent(BaseModel):
|
||||
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
|
||||
network_provider_info: Optional[SimpleAgentAllOfNetworkProviderInfo] = Field(default=None, alias="networkProviderInfo")
|
||||
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", "coordinates", "enabled", "prefix", "verifySslCertificates"]
|
||||
prefix: Optional[StrictStr] = Field(default=None, description="Prefix containing agents public IP address.")
|
||||
__properties: ClassVar[List[str]] = ["ipAddresses", "publicIpAddresses", "network", "agentId", "agentName", "location", "countryId", "coordinates", "networkProviderInfo", "enabled", "verifySslCertificates", "prefix"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
@ -86,8 +88,8 @@ class SimpleAgent(BaseModel):
|
||||
"agent_id",
|
||||
"location",
|
||||
"country_id",
|
||||
"prefix",
|
||||
"verify_ssl_certificates",
|
||||
"prefix",
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
@ -98,6 +100,9 @@ class SimpleAgent(BaseModel):
|
||||
# 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 network_provider_info
|
||||
if self.network_provider_info:
|
||||
_dict['networkProviderInfo'] = self.network_provider_info.to_dict()
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
@ -118,9 +123,10 @@ class SimpleAgent(BaseModel):
|
||||
"location": obj.get("location"),
|
||||
"countryId": obj.get("countryId"),
|
||||
"coordinates": Coordinates.from_dict(obj["coordinates"]) if obj.get("coordinates") is not None else None,
|
||||
"networkProviderInfo": SimpleAgentAllOfNetworkProviderInfo.from_dict(obj["networkProviderInfo"]) if obj.get("networkProviderInfo") is not None else None,
|
||||
"enabled": obj.get("enabled"),
|
||||
"prefix": obj.get("prefix"),
|
||||
"verifySslCertificates": obj.get("verifySslCertificates")
|
||||
"verifySslCertificates": obj.get("verifySslCertificates"),
|
||||
"prefix": obj.get("prefix")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@ -0,0 +1,96 @@
|
||||
# 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, StrictInt, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from thousandeyes_sdk.administrative.models.network_provider_type import NetworkProviderType
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class SimpleAgentAllOfNetworkProviderInfo(BaseModel):
|
||||
"""
|
||||
SimpleAgentAllOfNetworkProviderInfo
|
||||
""" # noqa: E501
|
||||
asn: Optional[StrictInt] = Field(default=None, description="Autonomous System Number (ASN) announcing the agent's public IP prefix.")
|
||||
name: Optional[StrictStr] = Field(default=None, description="Name of the network provider organization.")
|
||||
type: Optional[NetworkProviderType] = None
|
||||
__properties: ClassVar[List[str]] = ["asn", "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 SimpleAgentAllOfNetworkProviderInfo 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([
|
||||
"asn",
|
||||
"name",
|
||||
])
|
||||
|
||||
_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 SimpleAgentAllOfNetworkProviderInfo from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"asn": obj.get("asn"),
|
||||
"name": obj.get("name"),
|
||||
"type": obj.get("type")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@ -127,7 +127,7 @@ class TestAccountGroupsApi(unittest.TestCase):
|
||||
},
|
||||
"accountGroupName" : "Account A",
|
||||
"isDefaultAccountGroup" : true,
|
||||
"accountToken" : "6j052y4vfgyuhefghue",
|
||||
"accountToken" : "accountToken",
|
||||
"aid" : "1234",
|
||||
"orgId" : "12345",
|
||||
"users" : [ {
|
||||
@ -170,6 +170,11 @@ class TestAccountGroupsApi(unittest.TestCase):
|
||||
"agentType" : "enterprise-cluster",
|
||||
"ipv6Policy" : "force-ipv4",
|
||||
"prefix" : "99.128.0.0/11",
|
||||
"networkProviderInfo" : {
|
||||
"asn" : 7018,
|
||||
"name" : "AT&T Services, Inc.",
|
||||
"type" : "isp"
|
||||
},
|
||||
"countryId" : "US",
|
||||
"enabled" : true,
|
||||
"network" : "AT&T Services, Inc. (AS 7018)",
|
||||
@ -177,6 +182,7 @@ class TestAccountGroupsApi(unittest.TestCase):
|
||||
"keepBrowserCache" : true,
|
||||
"agentState" : "online",
|
||||
"localResolutionPrefixes" : [ "10.2.3.3/24", "10.2.3.3/24" ],
|
||||
"serialNumber" : "FOC2218ABCD",
|
||||
"coordinates" : {
|
||||
"latitude" : 37.77493,
|
||||
"longitude" : -122.41942
|
||||
@ -186,6 +192,7 @@ class TestAccountGroupsApi(unittest.TestCase):
|
||||
"testIds" : [ 281474976710706 ],
|
||||
"clusterMembers" : [ {
|
||||
"lastSeen" : "2022-07-17T22:00:54Z",
|
||||
"serialNumber" : "FOC2218ABCD",
|
||||
"publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ],
|
||||
"agentState" : "online",
|
||||
"targetForTests" : "1.1.1.1",
|
||||
@ -203,6 +210,7 @@ class TestAccountGroupsApi(unittest.TestCase):
|
||||
} ]
|
||||
}, {
|
||||
"lastSeen" : "2022-07-17T22:00:54Z",
|
||||
"serialNumber" : "FOC2218ABCD",
|
||||
"publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ],
|
||||
"agentState" : "online",
|
||||
"targetForTests" : "1.1.1.1",
|
||||
@ -315,6 +323,11 @@ class TestAccountGroupsApi(unittest.TestCase):
|
||||
"agentType" : "enterprise-cluster",
|
||||
"ipv6Policy" : "force-ipv4",
|
||||
"prefix" : "99.128.0.0/11",
|
||||
"networkProviderInfo" : {
|
||||
"asn" : 7018,
|
||||
"name" : "AT&T Services, Inc.",
|
||||
"type" : "isp"
|
||||
},
|
||||
"countryId" : "US",
|
||||
"enabled" : true,
|
||||
"network" : "AT&T Services, Inc. (AS 7018)",
|
||||
@ -322,6 +335,7 @@ class TestAccountGroupsApi(unittest.TestCase):
|
||||
"keepBrowserCache" : true,
|
||||
"agentState" : "online",
|
||||
"localResolutionPrefixes" : [ "10.2.3.3/24", "10.2.3.3/24" ],
|
||||
"serialNumber" : "FOC2218ABCD",
|
||||
"coordinates" : {
|
||||
"latitude" : 37.77493,
|
||||
"longitude" : -122.41942
|
||||
@ -331,6 +345,7 @@ class TestAccountGroupsApi(unittest.TestCase):
|
||||
"testIds" : [ 281474976710706 ],
|
||||
"clusterMembers" : [ {
|
||||
"lastSeen" : "2022-07-17T22:00:54Z",
|
||||
"serialNumber" : "FOC2218ABCD",
|
||||
"publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ],
|
||||
"agentState" : "online",
|
||||
"targetForTests" : "1.1.1.1",
|
||||
@ -348,6 +363,7 @@ class TestAccountGroupsApi(unittest.TestCase):
|
||||
} ]
|
||||
}, {
|
||||
"lastSeen" : "2022-07-17T22:00:54Z",
|
||||
"serialNumber" : "FOC2218ABCD",
|
||||
"publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ],
|
||||
"agentState" : "online",
|
||||
"targetForTests" : "1.1.1.1",
|
||||
@ -531,7 +547,7 @@ class TestAccountGroupsApi(unittest.TestCase):
|
||||
},
|
||||
"accountGroupName" : "Account A",
|
||||
"isDefaultAccountGroup" : true,
|
||||
"accountToken" : "6j052y4vfgyuhefghue",
|
||||
"accountToken" : "accountToken",
|
||||
"aid" : "1234",
|
||||
"orgId" : "12345",
|
||||
"users" : [ {
|
||||
@ -574,6 +590,11 @@ class TestAccountGroupsApi(unittest.TestCase):
|
||||
"agentType" : "enterprise-cluster",
|
||||
"ipv6Policy" : "force-ipv4",
|
||||
"prefix" : "99.128.0.0/11",
|
||||
"networkProviderInfo" : {
|
||||
"asn" : 7018,
|
||||
"name" : "AT&T Services, Inc.",
|
||||
"type" : "isp"
|
||||
},
|
||||
"countryId" : "US",
|
||||
"enabled" : true,
|
||||
"network" : "AT&T Services, Inc. (AS 7018)",
|
||||
@ -581,6 +602,7 @@ class TestAccountGroupsApi(unittest.TestCase):
|
||||
"keepBrowserCache" : true,
|
||||
"agentState" : "online",
|
||||
"localResolutionPrefixes" : [ "10.2.3.3/24", "10.2.3.3/24" ],
|
||||
"serialNumber" : "FOC2218ABCD",
|
||||
"coordinates" : {
|
||||
"latitude" : 37.77493,
|
||||
"longitude" : -122.41942
|
||||
@ -590,6 +612,7 @@ class TestAccountGroupsApi(unittest.TestCase):
|
||||
"testIds" : [ 281474976710706 ],
|
||||
"clusterMembers" : [ {
|
||||
"lastSeen" : "2022-07-17T22:00:54Z",
|
||||
"serialNumber" : "FOC2218ABCD",
|
||||
"publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ],
|
||||
"agentState" : "online",
|
||||
"targetForTests" : "1.1.1.1",
|
||||
@ -607,6 +630,7 @@ class TestAccountGroupsApi(unittest.TestCase):
|
||||
} ]
|
||||
}, {
|
||||
"lastSeen" : "2022-07-17T22:00:54Z",
|
||||
"serialNumber" : "FOC2218ABCD",
|
||||
"publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ],
|
||||
"agentState" : "online",
|
||||
"targetForTests" : "1.1.1.1",
|
||||
@ -719,6 +743,11 @@ class TestAccountGroupsApi(unittest.TestCase):
|
||||
"agentType" : "enterprise-cluster",
|
||||
"ipv6Policy" : "force-ipv4",
|
||||
"prefix" : "99.128.0.0/11",
|
||||
"networkProviderInfo" : {
|
||||
"asn" : 7018,
|
||||
"name" : "AT&T Services, Inc.",
|
||||
"type" : "isp"
|
||||
},
|
||||
"countryId" : "US",
|
||||
"enabled" : true,
|
||||
"network" : "AT&T Services, Inc. (AS 7018)",
|
||||
@ -726,6 +755,7 @@ class TestAccountGroupsApi(unittest.TestCase):
|
||||
"keepBrowserCache" : true,
|
||||
"agentState" : "online",
|
||||
"localResolutionPrefixes" : [ "10.2.3.3/24", "10.2.3.3/24" ],
|
||||
"serialNumber" : "FOC2218ABCD",
|
||||
"coordinates" : {
|
||||
"latitude" : 37.77493,
|
||||
"longitude" : -122.41942
|
||||
@ -735,6 +765,7 @@ class TestAccountGroupsApi(unittest.TestCase):
|
||||
"testIds" : [ 281474976710706 ],
|
||||
"clusterMembers" : [ {
|
||||
"lastSeen" : "2022-07-17T22:00:54Z",
|
||||
"serialNumber" : "FOC2218ABCD",
|
||||
"publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ],
|
||||
"agentState" : "online",
|
||||
"targetForTests" : "1.1.1.1",
|
||||
@ -752,6 +783,7 @@ class TestAccountGroupsApi(unittest.TestCase):
|
||||
} ]
|
||||
}, {
|
||||
"lastSeen" : "2022-07-17T22:00:54Z",
|
||||
"serialNumber" : "FOC2218ABCD",
|
||||
"publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ],
|
||||
"agentState" : "online",
|
||||
"targetForTests" : "1.1.1.1",
|
||||
|
||||
@ -43,6 +43,12 @@ docs/ErrorDetailCode.md
|
||||
docs/InterfaceIpMapping.md
|
||||
docs/Link.md
|
||||
docs/ListNotificationRulesResponse.md
|
||||
docs/LocalProblem.md
|
||||
docs/LocalProblemAgent.md
|
||||
docs/LocalProblemAgentResults.md
|
||||
docs/LocalProblemsApi.md
|
||||
docs/NetworkProviderInfo.md
|
||||
docs/NetworkProviderType.md
|
||||
docs/NotificationRule.md
|
||||
docs/NotificationRuleDetail.md
|
||||
docs/NotificationRules.md
|
||||
@ -50,6 +56,7 @@ docs/ProxyAuthType.md
|
||||
docs/ProxyType.md
|
||||
docs/SelfLinks.md
|
||||
docs/SimpleAgent.md
|
||||
docs/SimpleAgentAllOfNetworkProviderInfo.md
|
||||
docs/SimpleEnterpriseAgent.md
|
||||
docs/SimpleTest.md
|
||||
docs/TestInterval.md
|
||||
@ -68,6 +75,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/local_problems_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
|
||||
@ -108,6 +116,11 @@ src/thousandeyes_sdk/agents/models/error_detail_code.py
|
||||
src/thousandeyes_sdk/agents/models/interface_ip_mapping.py
|
||||
src/thousandeyes_sdk/agents/models/link.py
|
||||
src/thousandeyes_sdk/agents/models/list_notification_rules_response.py
|
||||
src/thousandeyes_sdk/agents/models/local_problem.py
|
||||
src/thousandeyes_sdk/agents/models/local_problem_agent.py
|
||||
src/thousandeyes_sdk/agents/models/local_problem_agent_results.py
|
||||
src/thousandeyes_sdk/agents/models/network_provider_info.py
|
||||
src/thousandeyes_sdk/agents/models/network_provider_type.py
|
||||
src/thousandeyes_sdk/agents/models/notification_rule.py
|
||||
src/thousandeyes_sdk/agents/models/notification_rule_detail.py
|
||||
src/thousandeyes_sdk/agents/models/notification_rules.py
|
||||
@ -115,6 +128,7 @@ src/thousandeyes_sdk/agents/models/proxy_auth_type.py
|
||||
src/thousandeyes_sdk/agents/models/proxy_type.py
|
||||
src/thousandeyes_sdk/agents/models/self_links.py
|
||||
src/thousandeyes_sdk/agents/models/simple_agent.py
|
||||
src/thousandeyes_sdk/agents/models/simple_agent_all_of_network_provider_info.py
|
||||
src/thousandeyes_sdk/agents/models/simple_enterprise_agent.py
|
||||
src/thousandeyes_sdk/agents/models/simple_test.py
|
||||
src/thousandeyes_sdk/agents/models/test_interval.py
|
||||
@ -130,5 +144,6 @@ 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_local_problems_api.py
|
||||
test/test_tests_assignment_on_agents_api.py
|
||||
test/test_utils.py
|
||||
|
||||
@ -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.84
|
||||
- API version: 7.0.92
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
@ -105,6 +105,7 @@ 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
|
||||
*LocalProblemsApi* | [**get_agents_local_problems**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-agents/docs/LocalProblemsApi.md#get_agents_local_problems) | **GET** /agents/local-problems | List Cloud agents with local problems
|
||||
*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
|
||||
@ -150,6 +151,11 @@ Class | Method | HTTP request | Description
|
||||
- [InterfaceIpMapping](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-agents/docs/InterfaceIpMapping.md)
|
||||
- [Link](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-agents/docs/Link.md)
|
||||
- [ListNotificationRulesResponse](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-agents/docs/ListNotificationRulesResponse.md)
|
||||
- [LocalProblem](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-agents/docs/LocalProblem.md)
|
||||
- [LocalProblemAgent](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-agents/docs/LocalProblemAgent.md)
|
||||
- [LocalProblemAgentResults](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-agents/docs/LocalProblemAgentResults.md)
|
||||
- [NetworkProviderInfo](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-agents/docs/NetworkProviderInfo.md)
|
||||
- [NetworkProviderType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-agents/docs/NetworkProviderType.md)
|
||||
- [NotificationRule](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-agents/docs/NotificationRule.md)
|
||||
- [NotificationRuleDetail](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-agents/docs/NotificationRuleDetail.md)
|
||||
- [NotificationRules](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-agents/docs/NotificationRules.md)
|
||||
@ -157,6 +163,7 @@ Class | Method | HTTP request | Description
|
||||
- [ProxyType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-agents/docs/ProxyType.md)
|
||||
- [SelfLinks](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-agents/docs/SelfLinks.md)
|
||||
- [SimpleAgent](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-agents/docs/SimpleAgent.md)
|
||||
- [SimpleAgentAllOfNetworkProviderInfo](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-agents/docs/SimpleAgentAllOfNetworkProviderInfo.md)
|
||||
- [SimpleEnterpriseAgent](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-agents/docs/SimpleEnterpriseAgent.md)
|
||||
- [SimpleTest](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-agents/docs/SimpleTest.md)
|
||||
- [TestInterval](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-agents/docs/TestInterval.md)
|
||||
|
||||
@ -13,9 +13,10 @@ Name | Type | Description | Notes
|
||||
**location** | **str** | Location of the agent. | [optional] [readonly]
|
||||
**country_id** | **str** | 2-digit ISO country code | [optional] [readonly]
|
||||
**coordinates** | [**Coordinates**](Coordinates.md) | | [optional]
|
||||
**network_provider_info** | [**SimpleAgentAllOfNetworkProviderInfo**](SimpleAgentAllOfNetworkProviderInfo.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's set to ignore SSL errors on browserbot-based tests. | [optional] [readonly]
|
||||
**prefix** | **str** | Prefix containing agents public IP address. | [optional] [readonly]
|
||||
**agent_type** | **str** | Enterprise Cluster agent type. |
|
||||
**tests** | [**List[SimpleTest]**](SimpleTest.md) | List of tests. See `/tests` for more information. | [optional]
|
||||
**labels** | [**List[AgentLabel]**](AgentLabel.md) | List of labels. See `/labels` for more information. | [optional] [readonly]
|
||||
@ -33,6 +34,7 @@ Name | Type | Description | Notes
|
||||
**keep_browser_cache** | **bool** | Flag indicating if the agent retains cache. | [optional]
|
||||
**created_date** | **datetime** | UTC Agent creation date (ISO date-time format). | [optional] [readonly]
|
||||
**target_for_tests** | **str** | Test target IP address. | [optional]
|
||||
**serial_number** | **str** | Serial number of an enterprise agent or cluster member device. This field is not available for Cloud Agents. | [optional] [readonly]
|
||||
**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_mapping** | [**List[InterfaceIpMapping]**](InterfaceIpMapping.md) | | [optional] [readonly]
|
||||
**notification_rules** | [**List[NotificationRules]**](NotificationRules.md) | List of notification rule objects configured on agent | [optional]
|
||||
|
||||
@ -13,9 +13,10 @@ Name | Type | Description | Notes
|
||||
**location** | **str** | Location of the agent. | [optional] [readonly]
|
||||
**country_id** | **str** | 2-digit ISO country code | [optional] [readonly]
|
||||
**coordinates** | [**Coordinates**](Coordinates.md) | | [optional]
|
||||
**network_provider_info** | [**SimpleAgentAllOfNetworkProviderInfo**](SimpleAgentAllOfNetworkProviderInfo.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's set to ignore SSL errors on browserbot-based tests. | [optional] [readonly]
|
||||
**prefix** | **str** | Prefix containing agents public IP address. | [optional] [readonly]
|
||||
**agent_type** | [**CloudEnterpriseAgentType**](CloudEnterpriseAgentType.md) | |
|
||||
|
||||
## Example
|
||||
|
||||
@ -13,9 +13,10 @@ Name | Type | Description | Notes
|
||||
**location** | **str** | Location of the agent. | [optional] [readonly]
|
||||
**country_id** | **str** | 2-digit ISO country code | [optional] [readonly]
|
||||
**coordinates** | [**Coordinates**](Coordinates.md) | | [optional]
|
||||
**network_provider_info** | [**SimpleAgentAllOfNetworkProviderInfo**](SimpleAgentAllOfNetworkProviderInfo.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's set to ignore SSL errors on browserbot-based tests. | [optional] [readonly]
|
||||
**prefix** | **str** | Prefix containing agents public IP address. | [optional] [readonly]
|
||||
**agent_type** | **str** | Cloud agent type. |
|
||||
**tests** | [**List[SimpleTest]**](SimpleTest.md) | List of tests. See `/tests` for more information. | [optional]
|
||||
**labels** | [**List[AgentLabel]**](AgentLabel.md) | List of labels - see `/labels` for more information. | [optional] [readonly]
|
||||
|
||||
@ -14,9 +14,10 @@ Name | Type | Description | Notes
|
||||
**location** | **str** | Location of the agent. | [optional] [readonly]
|
||||
**country_id** | **str** | 2-digit ISO country code | [optional] [readonly]
|
||||
**coordinates** | [**Coordinates**](Coordinates.md) | | [optional]
|
||||
**network_provider_info** | [**SimpleAgentAllOfNetworkProviderInfo**](SimpleAgentAllOfNetworkProviderInfo.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's set to ignore SSL errors on browserbot-based tests. | [optional] [readonly]
|
||||
**prefix** | **str** | Prefix containing agents public IP address. | [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 `/tests` 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]
|
||||
@ -30,6 +31,7 @@ Name | Type | Description | Notes
|
||||
**keep_browser_cache** | **bool** | Flag indicating if the agent retains cache. | [optional]
|
||||
**created_date** | **datetime** | UTC Agent creation date (ISO date-time format). | [optional] [readonly]
|
||||
**target_for_tests** | **str** | Test target IP address. | [optional]
|
||||
**serial_number** | **str** | Serial number of an enterprise agent or cluster member device. This field is not available for Cloud Agents. | [optional] [readonly]
|
||||
**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_mapping** | [**List[InterfaceIpMapping]**](InterfaceIpMapping.md) | | [optional] [readonly]
|
||||
|
||||
|
||||
@ -14,6 +14,7 @@ Name | Type | Description | Notes
|
||||
**last_seen** | **datetime** | UTC last seen date (ISO date-time format). | [optional] [readonly]
|
||||
**agent_state** | [**EnterpriseAgentState**](EnterpriseAgentState.md) | | [optional]
|
||||
**target_for_tests** | **str** | Test target IP address. | [optional]
|
||||
**serial_number** | **str** | Serial number of an enterprise agent or cluster member device. This field is not available for Cloud Agents. | [optional] [readonly]
|
||||
**utilization** | **int** | Shows overall utilization percentage (online Enterprise Agents and Enterprise Clusters only). | [optional] [readonly]
|
||||
|
||||
## Example
|
||||
|
||||
@ -14,9 +14,10 @@ Name | Type | Description | Notes
|
||||
**location** | **str** | Location of the agent. | [optional] [readonly]
|
||||
**country_id** | **str** | 2-digit ISO country code | [optional] [readonly]
|
||||
**coordinates** | [**Coordinates**](Coordinates.md) | | [optional]
|
||||
**network_provider_info** | [**SimpleAgentAllOfNetworkProviderInfo**](SimpleAgentAllOfNetworkProviderInfo.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's set to ignore SSL errors on browserbot-based tests. | [optional] [readonly]
|
||||
**prefix** | **str** | Prefix containing agents public IP address. | [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 `/tests` 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]
|
||||
@ -30,6 +31,7 @@ Name | Type | Description | Notes
|
||||
**keep_browser_cache** | **bool** | Flag indicating if the agent retains cache. | [optional]
|
||||
**created_date** | **datetime** | UTC Agent creation date (ISO date-time format). | [optional] [readonly]
|
||||
**target_for_tests** | **str** | Test target IP address. | [optional]
|
||||
**serial_number** | **str** | Serial number of an enterprise agent or cluster member device. This field is not available for Cloud Agents. | [optional] [readonly]
|
||||
**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_mapping** | [**List[InterfaceIpMapping]**](InterfaceIpMapping.md) | | [optional] [readonly]
|
||||
|
||||
|
||||
@ -13,9 +13,10 @@ Name | Type | Description | Notes
|
||||
**location** | **str** | Location of the agent. | [optional] [readonly]
|
||||
**country_id** | **str** | 2-digit ISO country code | [optional] [readonly]
|
||||
**coordinates** | [**Coordinates**](Coordinates.md) | | [optional]
|
||||
**network_provider_info** | [**SimpleAgentAllOfNetworkProviderInfo**](SimpleAgentAllOfNetworkProviderInfo.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's set to ignore SSL errors on browserbot-based tests. | [optional] [readonly]
|
||||
**prefix** | **str** | Prefix containing agents public IP address. | [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 `/tests` 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]
|
||||
@ -29,6 +30,7 @@ Name | Type | Description | Notes
|
||||
**keep_browser_cache** | **bool** | Flag indicating if the agent retains cache. | [optional]
|
||||
**created_date** | **datetime** | UTC Agent creation date (ISO date-time format). | [optional] [readonly]
|
||||
**target_for_tests** | **str** | Test target IP address. | [optional]
|
||||
**serial_number** | **str** | Serial number of an enterprise agent or cluster member device. This field is not available for Cloud Agents. | [optional] [readonly]
|
||||
**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_mapping** | [**List[InterfaceIpMapping]**](InterfaceIpMapping.md) | | [optional] [readonly]
|
||||
**notification_rules** | [**List[NotificationRules]**](NotificationRules.md) | List of notification rule objects configured on agent | [optional]
|
||||
|
||||
@ -18,6 +18,7 @@ Name | Type | Description | Notes
|
||||
**keep_browser_cache** | **bool** | Flag indicating if the agent retains cache. | [optional]
|
||||
**created_date** | **datetime** | UTC Agent creation date (ISO date-time format). | [optional] [readonly]
|
||||
**target_for_tests** | **str** | Test target IP address. | [optional]
|
||||
**serial_number** | **str** | Serial number of an enterprise agent or cluster member device. This field is not available for Cloud Agents. | [optional] [readonly]
|
||||
**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_mapping** | [**List[InterfaceIpMapping]**](InterfaceIpMapping.md) | | [optional] [readonly]
|
||||
|
||||
|
||||
@ -13,9 +13,10 @@ Name | Type | Description | Notes
|
||||
**location** | **str** | Location of the agent. | [optional] [readonly]
|
||||
**country_id** | **str** | 2-digit ISO country code | [optional] [readonly]
|
||||
**coordinates** | [**Coordinates**](Coordinates.md) | | [optional]
|
||||
**network_provider_info** | [**SimpleAgentAllOfNetworkProviderInfo**](SimpleAgentAllOfNetworkProviderInfo.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's set to ignore SSL errors on browserbot-based tests. | [optional] [readonly]
|
||||
**prefix** | **str** | Prefix containing agents public IP address. | [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 `/tests` 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]
|
||||
@ -29,6 +30,7 @@ Name | Type | Description | Notes
|
||||
**keep_browser_cache** | **bool** | Flag indicating if the agent retains cache. | [optional]
|
||||
**created_date** | **datetime** | UTC Agent creation date (ISO date-time format). | [optional] [readonly]
|
||||
**target_for_tests** | **str** | Test target IP address. | [optional]
|
||||
**serial_number** | **str** | Serial number of an enterprise agent or cluster member device. This field is not available for Cloud Agents. | [optional] [readonly]
|
||||
**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_mapping** | [**List[InterfaceIpMapping]**](InterfaceIpMapping.md) | | [optional] [readonly]
|
||||
**notification_rules** | [**List[NotificationRules]**](NotificationRules.md) | List of notification rule objects configured on agent | [optional]
|
||||
|
||||
33
thousandeyes-sdk-agents/docs/LocalProblem.md
Normal file
33
thousandeyes-sdk-agents/docs/LocalProblem.md
Normal file
@ -0,0 +1,33 @@
|
||||
# LocalProblem
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**agent** | [**LocalProblemAgent**](LocalProblemAgent.md) | |
|
||||
**start_date** | **datetime** | Date and time when the local problem interval started, in UTC. | [readonly]
|
||||
**end_date** | **datetime** | Date and time when the local problem interval ended, in UTC. This value is `null` when the local problem is active. | [optional] [readonly]
|
||||
**duration** | **int** | Duration of the local problem interval in seconds. | [readonly]
|
||||
**active** | **bool** | Indicates whether the local problem is active. | [readonly]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from thousandeyes_sdk.agents.models.local_problem import LocalProblem
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of LocalProblem from a JSON string
|
||||
local_problem_instance = LocalProblem.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(LocalProblem.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
local_problem_dict = local_problem_instance.to_dict()
|
||||
# create an instance of LocalProblem from a dict
|
||||
local_problem_from_dict = LocalProblem.from_dict(local_problem_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)
|
||||
|
||||
|
||||
32
thousandeyes-sdk-agents/docs/LocalProblemAgent.md
Normal file
32
thousandeyes-sdk-agents/docs/LocalProblemAgent.md
Normal file
@ -0,0 +1,32 @@
|
||||
# LocalProblemAgent
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**agent_id** | **str** | Agent ID. | [optional] [readonly]
|
||||
**agent_name** | **str** | Agent name. | [optional] [readonly]
|
||||
**country_id** | **str** | Two-letter ISO country code where the agent is located. | [optional] [readonly]
|
||||
**location** | **str** | Agent location. | [optional] [readonly]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from thousandeyes_sdk.agents.models.local_problem_agent import LocalProblemAgent
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of LocalProblemAgent from a JSON string
|
||||
local_problem_agent_instance = LocalProblemAgent.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(LocalProblemAgent.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
local_problem_agent_dict = local_problem_agent_instance.to_dict()
|
||||
# create an instance of LocalProblemAgent from a dict
|
||||
local_problem_agent_from_dict = LocalProblemAgent.from_dict(local_problem_agent_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)
|
||||
|
||||
|
||||
32
thousandeyes-sdk-agents/docs/LocalProblemAgentResults.md
Normal file
32
thousandeyes-sdk-agents/docs/LocalProblemAgentResults.md
Normal file
@ -0,0 +1,32 @@
|
||||
# LocalProblemAgentResults
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**local_problems** | [**List[LocalProblem]**](LocalProblem.md) | | [optional]
|
||||
**start_date** | **datetime** | (Optional) When passing `window` or `startDate` parameter, the client will also receive the `startDate` field indicating the UTC start date of the data's time range being retrieved (ISO date-time format). | [optional] [readonly]
|
||||
**end_date** | **datetime** | (Optional) When passing `window` or `endDate` parameter, the client will also receive the `endDate` field indicating the UTC end date of the data's time range being retrieved (ISO date-time format). | [optional] [readonly]
|
||||
**links** | [**SelfLinks**](SelfLinks.md) | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from thousandeyes_sdk.agents.models.local_problem_agent_results import LocalProblemAgentResults
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of LocalProblemAgentResults from a JSON string
|
||||
local_problem_agent_results_instance = LocalProblemAgentResults.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(LocalProblemAgentResults.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
local_problem_agent_results_dict = local_problem_agent_results_instance.to_dict()
|
||||
# create an instance of LocalProblemAgentResults from a dict
|
||||
local_problem_agent_results_from_dict = LocalProblemAgentResults.from_dict(local_problem_agent_results_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)
|
||||
|
||||
|
||||
101
thousandeyes-sdk-agents/docs/LocalProblemsApi.md
Normal file
101
thousandeyes-sdk-agents/docs/LocalProblemsApi.md
Normal file
@ -0,0 +1,101 @@
|
||||
# thousandeyes_sdk.agents.LocalProblemsApi
|
||||
|
||||
All URIs are relative to *https://api.thousandeyes.com/v7*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**get_agents_local_problems**](LocalProblemsApi.md#get_agents_local_problems) | **GET** /agents/local-problems | List Cloud agents with local problems
|
||||
|
||||
|
||||
# **get_agents_local_problems**
|
||||
> LocalProblemAgentResults get_agents_local_problems(aid=aid, window=window, start_date=start_date, end_date=end_date)
|
||||
|
||||
List Cloud agents with local problems
|
||||
|
||||
Returns local problem intervals for Cloud Agents available to your account in ThousandEyes. FedRAMP Cloud Agents are not included. Local problems indicate agent-side impairment detected by ThousandEyes and do not indicate that a monitored target or service was down. If no time range is specified, this operation returns active local problems.
|
||||
|
||||
### Example
|
||||
|
||||
* Bearer Authentication (BearerAuth):
|
||||
|
||||
```python
|
||||
import thousandeyes_sdk.agents
|
||||
from thousandeyes_sdk.agents.models.local_problem_agent_results import LocalProblemAgentResults
|
||||
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.LocalProblemsApi(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)
|
||||
window = '12h' # str | A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. (optional)
|
||||
start_date = '2022-07-17T22:00:54Z' # datetime | Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. (optional)
|
||||
end_date = '2022-07-18T22:00:54Z' # datetime | Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. (optional)
|
||||
|
||||
try:
|
||||
# List Cloud agents with local problems
|
||||
api_response = api_instance.get_agents_local_problems(aid=aid, window=window, start_date=start_date, end_date=end_date)
|
||||
print("The response of LocalProblemsApi->get_agents_local_problems:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling LocalProblemsApi->get_agents_local_problems: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**aid** | **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]
|
||||
**window** | **str**| A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. | [optional]
|
||||
**start_date** | **datetime**| Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. | [optional]
|
||||
**end_date** | **datetime**| Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
[**LocalProblemAgentResults**](LocalProblemAgentResults.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[BearerAuth](../README.md#BearerAuth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **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)
|
||||
|
||||
32
thousandeyes-sdk-agents/docs/NetworkProviderInfo.md
Normal file
32
thousandeyes-sdk-agents/docs/NetworkProviderInfo.md
Normal file
@ -0,0 +1,32 @@
|
||||
# NetworkProviderInfo
|
||||
|
||||
Information about the network provider that owns the agent's public IP prefix.
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**asn** | **int** | Autonomous System Number (ASN) announcing the agent's public IP prefix. | [optional] [readonly]
|
||||
**name** | **str** | Name of the network provider organization. | [optional] [readonly]
|
||||
**type** | [**NetworkProviderType**](NetworkProviderType.md) | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from thousandeyes_sdk.agents.models.network_provider_info import NetworkProviderInfo
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of NetworkProviderInfo from a JSON string
|
||||
network_provider_info_instance = NetworkProviderInfo.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(NetworkProviderInfo.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
network_provider_info_dict = network_provider_info_instance.to_dict()
|
||||
# create an instance of NetworkProviderInfo from a dict
|
||||
network_provider_info_from_dict = NetworkProviderInfo.from_dict(network_provider_info_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)
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# ApiWidgetSortProperty
|
||||
# NetworkProviderType
|
||||
|
||||
Determines the card sorting criterion.
|
||||
Classification of the agent's network provider.
|
||||
|
||||
## Properties
|
||||
|
||||
@ -13,9 +13,10 @@ Name | Type | Description | Notes
|
||||
**location** | **str** | Location of the agent. | [optional] [readonly]
|
||||
**country_id** | **str** | 2-digit ISO country code | [optional] [readonly]
|
||||
**coordinates** | [**Coordinates**](Coordinates.md) | | [optional]
|
||||
**network_provider_info** | [**SimpleAgentAllOfNetworkProviderInfo**](SimpleAgentAllOfNetworkProviderInfo.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's set to ignore SSL errors on browserbot-based tests. | [optional] [readonly]
|
||||
**prefix** | **str** | Prefix containing agents public IP address. | [optional] [readonly]
|
||||
|
||||
## Example
|
||||
|
||||
|
||||
@ -0,0 +1,31 @@
|
||||
# SimpleAgentAllOfNetworkProviderInfo
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**asn** | **int** | Autonomous System Number (ASN) announcing the agent's public IP prefix. | [optional] [readonly]
|
||||
**name** | **str** | Name of the network provider organization. | [optional] [readonly]
|
||||
**type** | [**NetworkProviderType**](NetworkProviderType.md) | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from thousandeyes_sdk.agents.models.simple_agent_all_of_network_provider_info import SimpleAgentAllOfNetworkProviderInfo
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of SimpleAgentAllOfNetworkProviderInfo from a JSON string
|
||||
simple_agent_all_of_network_provider_info_instance = SimpleAgentAllOfNetworkProviderInfo.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(SimpleAgentAllOfNetworkProviderInfo.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
simple_agent_all_of_network_provider_info_dict = simple_agent_all_of_network_provider_info_instance.to_dict()
|
||||
# create an instance of SimpleAgentAllOfNetworkProviderInfo from a dict
|
||||
simple_agent_all_of_network_provider_info_from_dict = SimpleAgentAllOfNetworkProviderInfo.from_dict(simple_agent_all_of_network_provider_info_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)
|
||||
|
||||
|
||||
@ -13,9 +13,10 @@ Name | Type | Description | Notes
|
||||
**location** | **str** | Location of the agent. | [optional] [readonly]
|
||||
**country_id** | **str** | 2-digit ISO country code | [optional] [readonly]
|
||||
**coordinates** | [**Coordinates**](Coordinates.md) | | [optional]
|
||||
**network_provider_info** | [**SimpleAgentAllOfNetworkProviderInfo**](SimpleAgentAllOfNetworkProviderInfo.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's set to ignore SSL errors on browserbot-based tests. | [optional] [readonly]
|
||||
**prefix** | **str** | Prefix containing agents public IP address. | [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 `/tests` 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]
|
||||
@ -29,6 +30,7 @@ Name | Type | Description | Notes
|
||||
**keep_browser_cache** | **bool** | Flag indicating if the agent retains cache. | [optional]
|
||||
**created_date** | **datetime** | UTC Agent creation date (ISO date-time format). | [optional] [readonly]
|
||||
**target_for_tests** | **str** | Test target IP address. | [optional]
|
||||
**serial_number** | **str** | Serial number of an enterprise agent or cluster member device. This field is not available for Cloud Agents. | [optional] [readonly]
|
||||
**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_mapping** | [**List[InterfaceIpMapping]**](InterfaceIpMapping.md) | | [optional] [readonly]
|
||||
|
||||
|
||||
@ -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.local_problems_api import LocalProblemsApi
|
||||
from thousandeyes_sdk.agents.api.tests_assignment_on_agents_api import TestsAssignmentOnAgentsApi
|
||||
|
||||
|
||||
@ -60,6 +61,11 @@ from thousandeyes_sdk.agents.models.error_detail_code import ErrorDetailCode
|
||||
from thousandeyes_sdk.agents.models.interface_ip_mapping import InterfaceIpMapping
|
||||
from thousandeyes_sdk.agents.models.link import Link
|
||||
from thousandeyes_sdk.agents.models.list_notification_rules_response import ListNotificationRulesResponse
|
||||
from thousandeyes_sdk.agents.models.local_problem import LocalProblem
|
||||
from thousandeyes_sdk.agents.models.local_problem_agent import LocalProblemAgent
|
||||
from thousandeyes_sdk.agents.models.local_problem_agent_results import LocalProblemAgentResults
|
||||
from thousandeyes_sdk.agents.models.network_provider_info import NetworkProviderInfo
|
||||
from thousandeyes_sdk.agents.models.network_provider_type import NetworkProviderType
|
||||
from thousandeyes_sdk.agents.models.notification_rule import NotificationRule
|
||||
from thousandeyes_sdk.agents.models.notification_rule_detail import NotificationRuleDetail
|
||||
from thousandeyes_sdk.agents.models.notification_rules import NotificationRules
|
||||
@ -67,6 +73,7 @@ from thousandeyes_sdk.agents.models.proxy_auth_type import ProxyAuthType
|
||||
from thousandeyes_sdk.agents.models.proxy_type import ProxyType
|
||||
from thousandeyes_sdk.agents.models.self_links import SelfLinks
|
||||
from thousandeyes_sdk.agents.models.simple_agent import SimpleAgent
|
||||
from thousandeyes_sdk.agents.models.simple_agent_all_of_network_provider_info import SimpleAgentAllOfNetworkProviderInfo
|
||||
from thousandeyes_sdk.agents.models.simple_enterprise_agent import SimpleEnterpriseAgent
|
||||
from thousandeyes_sdk.agents.models.simple_test import SimpleTest
|
||||
from thousandeyes_sdk.agents.models.test_interval import TestInterval
|
||||
|
||||
@ -5,5 +5,6 @@ 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.local_problems_api import LocalProblemsApi
|
||||
from thousandeyes_sdk.agents.api.tests_assignment_on_agents_api import TestsAssignmentOnAgentsApi
|
||||
|
||||
|
||||
@ -0,0 +1,398 @@
|
||||
# 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 warnings
|
||||
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
||||
from typing import Any, Dict, List, Optional, Tuple, Union
|
||||
from typing_extensions import Annotated
|
||||
from importlib.metadata import version
|
||||
|
||||
import thousandeyes_sdk.agents.models
|
||||
|
||||
from datetime import datetime
|
||||
from pydantic import Field, StrictStr, field_validator
|
||||
from typing import Optional
|
||||
from typing_extensions import Annotated
|
||||
from thousandeyes_sdk.agents.models.local_problem_agent_results import LocalProblemAgentResults
|
||||
|
||||
from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized
|
||||
from thousandeyes_sdk.core.api_response import ApiResponse
|
||||
|
||||
from thousandeyes_sdk.core.rest import RESTResponseType
|
||||
|
||||
|
||||
class LocalProblemsApi:
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator
|
||||
Ref: https://openapi-generator.tech
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
def __init__(self, api_client=None) -> None:
|
||||
if api_client is None:
|
||||
api_client = ApiClient.get_default()
|
||||
api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(version("thousandeyes-sdk-agents"))
|
||||
self.api_client = api_client
|
||||
|
||||
|
||||
@validate_call
|
||||
def get_agents_local_problems(
|
||||
self,
|
||||
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
|
||||
window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None,
|
||||
start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None,
|
||||
end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
Tuple[
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
Annotated[StrictFloat, Field(gt=0)]
|
||||
]
|
||||
] = None,
|
||||
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
||||
_content_type: Optional[StrictStr] = None,
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> LocalProblemAgentResults:
|
||||
"""List Cloud agents with local problems
|
||||
|
||||
Returns local problem intervals for Cloud Agents available to your account in ThousandEyes. FedRAMP Cloud Agents are not included. Local problems indicate agent-side impairment detected by ThousandEyes and do not indicate that a monitored target or service was down. If no time range is specified, this operation returns active local problems.
|
||||
|
||||
:param aid: 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.
|
||||
:type aid: str
|
||||
:param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.
|
||||
:type window: str
|
||||
:param start_date: Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.
|
||||
:type start_date: datetime
|
||||
:param end_date: Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.
|
||||
:type end_date: datetime
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
timeout. It can also be a pair (tuple) of
|
||||
(connection, read) timeouts.
|
||||
:type _request_timeout: int, tuple(int, int), optional
|
||||
:param _request_auth: set to override the auth_settings for an a single
|
||||
request; this effectively ignores the
|
||||
authentication in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:param _content_type: force content-type for the request.
|
||||
:type _content_type: str, Optional
|
||||
:param _headers: set to override the headers for a single
|
||||
request; this effectively ignores the headers
|
||||
in the spec for a single request.
|
||||
:type _headers: dict, optional
|
||||
:param _host_index: set to override the host_index for a single
|
||||
request; this effectively ignores the host_index
|
||||
in the spec for a single request.
|
||||
:type _host_index: int, optional
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._get_agents_local_problems_serialize(
|
||||
aid=aid,
|
||||
window=window,
|
||||
start_date=start_date,
|
||||
end_date=end_date,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "LocalProblemAgentResults",
|
||||
'400': "ValidationError",
|
||||
'401': "UnauthorizedError",
|
||||
'403': "Error",
|
||||
'404': "Error",
|
||||
'429': "Error",
|
||||
'500': "Error",
|
||||
'502': "Error",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
_request_timeout=_request_timeout
|
||||
)
|
||||
response_data.read()
|
||||
return self.api_client.response_deserialize(
|
||||
response_data=response_data,
|
||||
response_types_map=_response_types_map,
|
||||
models=thousandeyes_sdk.agents.models,
|
||||
).data
|
||||
|
||||
|
||||
@validate_call
|
||||
def get_agents_local_problems_with_http_info(
|
||||
self,
|
||||
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
|
||||
window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None,
|
||||
start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None,
|
||||
end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
Tuple[
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
Annotated[StrictFloat, Field(gt=0)]
|
||||
]
|
||||
] = None,
|
||||
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
||||
_content_type: Optional[StrictStr] = None,
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[LocalProblemAgentResults]:
|
||||
"""List Cloud agents with local problems
|
||||
|
||||
Returns local problem intervals for Cloud Agents available to your account in ThousandEyes. FedRAMP Cloud Agents are not included. Local problems indicate agent-side impairment detected by ThousandEyes and do not indicate that a monitored target or service was down. If no time range is specified, this operation returns active local problems.
|
||||
|
||||
:param aid: 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.
|
||||
:type aid: str
|
||||
:param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.
|
||||
:type window: str
|
||||
:param start_date: Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.
|
||||
:type start_date: datetime
|
||||
:param end_date: Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.
|
||||
:type end_date: datetime
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
timeout. It can also be a pair (tuple) of
|
||||
(connection, read) timeouts.
|
||||
:type _request_timeout: int, tuple(int, int), optional
|
||||
:param _request_auth: set to override the auth_settings for an a single
|
||||
request; this effectively ignores the
|
||||
authentication in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:param _content_type: force content-type for the request.
|
||||
:type _content_type: str, Optional
|
||||
:param _headers: set to override the headers for a single
|
||||
request; this effectively ignores the headers
|
||||
in the spec for a single request.
|
||||
:type _headers: dict, optional
|
||||
:param _host_index: set to override the host_index for a single
|
||||
request; this effectively ignores the host_index
|
||||
in the spec for a single request.
|
||||
:type _host_index: int, optional
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._get_agents_local_problems_serialize(
|
||||
aid=aid,
|
||||
window=window,
|
||||
start_date=start_date,
|
||||
end_date=end_date,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "LocalProblemAgentResults",
|
||||
'400': "ValidationError",
|
||||
'401': "UnauthorizedError",
|
||||
'403': "Error",
|
||||
'404': "Error",
|
||||
'429': "Error",
|
||||
'500': "Error",
|
||||
'502': "Error",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
_request_timeout=_request_timeout
|
||||
)
|
||||
response_data.read()
|
||||
return self.api_client.response_deserialize(
|
||||
response_data=response_data,
|
||||
response_types_map=_response_types_map,
|
||||
models=thousandeyes_sdk.agents.models,
|
||||
)
|
||||
|
||||
|
||||
@validate_call
|
||||
def get_agents_local_problems_without_preload_content(
|
||||
self,
|
||||
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
|
||||
window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None,
|
||||
start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None,
|
||||
end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
Tuple[
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
Annotated[StrictFloat, Field(gt=0)]
|
||||
]
|
||||
] = None,
|
||||
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
||||
_content_type: Optional[StrictStr] = None,
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""List Cloud agents with local problems
|
||||
|
||||
Returns local problem intervals for Cloud Agents available to your account in ThousandEyes. FedRAMP Cloud Agents are not included. Local problems indicate agent-side impairment detected by ThousandEyes and do not indicate that a monitored target or service was down. If no time range is specified, this operation returns active local problems.
|
||||
|
||||
:param aid: 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.
|
||||
:type aid: str
|
||||
:param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.
|
||||
:type window: str
|
||||
:param start_date: Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.
|
||||
:type start_date: datetime
|
||||
:param end_date: Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.
|
||||
:type end_date: datetime
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
timeout. It can also be a pair (tuple) of
|
||||
(connection, read) timeouts.
|
||||
:type _request_timeout: int, tuple(int, int), optional
|
||||
:param _request_auth: set to override the auth_settings for an a single
|
||||
request; this effectively ignores the
|
||||
authentication in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:param _content_type: force content-type for the request.
|
||||
:type _content_type: str, Optional
|
||||
:param _headers: set to override the headers for a single
|
||||
request; this effectively ignores the headers
|
||||
in the spec for a single request.
|
||||
:type _headers: dict, optional
|
||||
:param _host_index: set to override the host_index for a single
|
||||
request; this effectively ignores the host_index
|
||||
in the spec for a single request.
|
||||
:type _host_index: int, optional
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._get_agents_local_problems_serialize(
|
||||
aid=aid,
|
||||
window=window,
|
||||
start_date=start_date,
|
||||
end_date=end_date,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "LocalProblemAgentResults",
|
||||
'400': "ValidationError",
|
||||
'401': "UnauthorizedError",
|
||||
'403': "Error",
|
||||
'404': "Error",
|
||||
'429': "Error",
|
||||
'500': "Error",
|
||||
'502': "Error",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
_request_timeout=_request_timeout
|
||||
)
|
||||
return response_data.response
|
||||
|
||||
|
||||
def _get_agents_local_problems_serialize(
|
||||
self,
|
||||
aid,
|
||||
window,
|
||||
start_date,
|
||||
end_date,
|
||||
_request_auth,
|
||||
_content_type,
|
||||
_headers,
|
||||
_host_index,
|
||||
) -> RequestSerialized:
|
||||
|
||||
_host = None
|
||||
|
||||
_collection_formats: Dict[str, str] = {
|
||||
}
|
||||
|
||||
_path_params: Dict[str, str] = {}
|
||||
_query_params: List[Tuple[str, str]] = []
|
||||
_header_params: Dict[str, Optional[str]] = _headers or {}
|
||||
_form_params: List[Tuple[str, str]] = []
|
||||
_files: Dict[str, Union[str, bytes]] = {}
|
||||
_body_params: Optional[bytes] = None
|
||||
|
||||
# process the path parameters
|
||||
# process the query parameters
|
||||
if aid is not None:
|
||||
|
||||
_query_params.append(('aid', aid))
|
||||
|
||||
if window is not None:
|
||||
|
||||
_query_params.append(('window', window))
|
||||
|
||||
if start_date is not None:
|
||||
if isinstance(start_date, datetime):
|
||||
_query_params.append(
|
||||
(
|
||||
'startDate',
|
||||
start_date.strftime(
|
||||
self.api_client.configuration.datetime_format
|
||||
)
|
||||
)
|
||||
)
|
||||
else:
|
||||
_query_params.append(('startDate', start_date))
|
||||
|
||||
if end_date is not None:
|
||||
if isinstance(end_date, datetime):
|
||||
_query_params.append(
|
||||
(
|
||||
'endDate',
|
||||
end_date.strftime(
|
||||
self.api_client.configuration.datetime_format
|
||||
)
|
||||
)
|
||||
)
|
||||
else:
|
||||
_query_params.append(('endDate', end_date))
|
||||
|
||||
# process the header parameters
|
||||
# process the form parameters
|
||||
# process the body parameter
|
||||
|
||||
|
||||
# set the HTTP header `Accept`
|
||||
_header_params['Accept'] = self.api_client.select_header_accept(
|
||||
[
|
||||
'application/hal+json',
|
||||
'application/json',
|
||||
'application/problem+json'
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
# authentication setting
|
||||
_auth_settings: List[str] = [
|
||||
'BearerAuth'
|
||||
]
|
||||
|
||||
return self.api_client.param_serialize(
|
||||
method='GET',
|
||||
resource_path='/agents/local-problems',
|
||||
path_params=_path_params,
|
||||
query_params=_query_params,
|
||||
header_params=_header_params,
|
||||
body=_body_params,
|
||||
post_params=_form_params,
|
||||
files=_files,
|
||||
auth_settings=_auth_settings,
|
||||
collection_formats=_collection_formats,
|
||||
_host=_host,
|
||||
_request_auth=_request_auth
|
||||
)
|
||||
|
||||
|
||||
@ -51,6 +51,11 @@ from thousandeyes_sdk.agents.models.error_detail_code import ErrorDetailCode
|
||||
from thousandeyes_sdk.agents.models.interface_ip_mapping import InterfaceIpMapping
|
||||
from thousandeyes_sdk.agents.models.link import Link
|
||||
from thousandeyes_sdk.agents.models.list_notification_rules_response import ListNotificationRulesResponse
|
||||
from thousandeyes_sdk.agents.models.local_problem import LocalProblem
|
||||
from thousandeyes_sdk.agents.models.local_problem_agent import LocalProblemAgent
|
||||
from thousandeyes_sdk.agents.models.local_problem_agent_results import LocalProblemAgentResults
|
||||
from thousandeyes_sdk.agents.models.network_provider_info import NetworkProviderInfo
|
||||
from thousandeyes_sdk.agents.models.network_provider_type import NetworkProviderType
|
||||
from thousandeyes_sdk.agents.models.notification_rule import NotificationRule
|
||||
from thousandeyes_sdk.agents.models.notification_rule_detail import NotificationRuleDetail
|
||||
from thousandeyes_sdk.agents.models.notification_rules import NotificationRules
|
||||
@ -58,6 +63,7 @@ from thousandeyes_sdk.agents.models.proxy_auth_type import ProxyAuthType
|
||||
from thousandeyes_sdk.agents.models.proxy_type import ProxyType
|
||||
from thousandeyes_sdk.agents.models.self_links import SelfLinks
|
||||
from thousandeyes_sdk.agents.models.simple_agent import SimpleAgent
|
||||
from thousandeyes_sdk.agents.models.simple_agent_all_of_network_provider_info import SimpleAgentAllOfNetworkProviderInfo
|
||||
from thousandeyes_sdk.agents.models.simple_enterprise_agent import SimpleEnterpriseAgent
|
||||
from thousandeyes_sdk.agents.models.simple_test import SimpleTest
|
||||
from thousandeyes_sdk.agents.models.test_interval import TestInterval
|
||||
|
||||
@ -20,6 +20,7 @@ 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 thousandeyes_sdk.agents.models.simple_agent_all_of_network_provider_info import SimpleAgentAllOfNetworkProviderInfo
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
@ -35,11 +36,12 @@ class AgentResponse(BaseModel):
|
||||
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
|
||||
network_provider_info: Optional[SimpleAgentAllOfNetworkProviderInfo] = Field(default=None, alias="networkProviderInfo")
|
||||
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")
|
||||
prefix: Optional[StrictStr] = Field(default=None, description="Prefix containing agents public IP address.")
|
||||
agent_type: CloudEnterpriseAgentType = Field(alias="agentType")
|
||||
__properties: ClassVar[List[str]] = ["ipAddresses", "publicIpAddresses", "network", "agentId", "agentName", "location", "countryId", "coordinates", "enabled", "prefix", "verifySslCertificates", "agentType"]
|
||||
__properties: ClassVar[List[str]] = ["ipAddresses", "publicIpAddresses", "network", "agentId", "agentName", "location", "countryId", "coordinates", "networkProviderInfo", "enabled", "verifySslCertificates", "prefix", "agentType"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
@ -88,8 +90,8 @@ class AgentResponse(BaseModel):
|
||||
"agent_id",
|
||||
"location",
|
||||
"country_id",
|
||||
"prefix",
|
||||
"verify_ssl_certificates",
|
||||
"prefix",
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
@ -100,6 +102,9 @@ class AgentResponse(BaseModel):
|
||||
# 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 network_provider_info
|
||||
if self.network_provider_info:
|
||||
_dict['networkProviderInfo'] = self.network_provider_info.to_dict()
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
@ -120,9 +125,10 @@ class AgentResponse(BaseModel):
|
||||
"location": obj.get("location"),
|
||||
"countryId": obj.get("countryId"),
|
||||
"coordinates": Coordinates.from_dict(obj["coordinates"]) if obj.get("coordinates") is not None else None,
|
||||
"networkProviderInfo": SimpleAgentAllOfNetworkProviderInfo.from_dict(obj["networkProviderInfo"]) if obj.get("networkProviderInfo") is not None else None,
|
||||
"enabled": obj.get("enabled"),
|
||||
"prefix": obj.get("prefix"),
|
||||
"verifySslCertificates": obj.get("verifySslCertificates"),
|
||||
"prefix": obj.get("prefix"),
|
||||
"agentType": obj.get("agentType")
|
||||
})
|
||||
return _obj
|
||||
|
||||
@ -23,6 +23,7 @@ from thousandeyes_sdk.agents.models.agent_label import AgentLabel
|
||||
from thousandeyes_sdk.agents.models.agent_tag import AgentTag
|
||||
from thousandeyes_sdk.agents.models.coordinates import Coordinates
|
||||
from thousandeyes_sdk.agents.models.self_links import SelfLinks
|
||||
from thousandeyes_sdk.agents.models.simple_agent_all_of_network_provider_info import SimpleAgentAllOfNetworkProviderInfo
|
||||
from thousandeyes_sdk.agents.models.simple_test import SimpleTest
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
@ -39,15 +40,16 @@ class CloudAgentDetail(BaseModel):
|
||||
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
|
||||
network_provider_info: Optional[SimpleAgentAllOfNetworkProviderInfo] = Field(default=None, alias="networkProviderInfo")
|
||||
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")
|
||||
prefix: Optional[StrictStr] = Field(default=None, description="Prefix containing agents public IP address.")
|
||||
agent_type: Annotated[str, Field(strict=True)] = Field(description="Cloud agent type.", alias="agentType")
|
||||
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.")
|
||||
tags: Optional[List[AgentTag]] = Field(default=None, description="List of tags. See `/tags` for more information.")
|
||||
links: Optional[SelfLinks] = Field(default=None, alias="_links")
|
||||
__properties: ClassVar[List[str]] = ["ipAddresses", "publicIpAddresses", "network", "agentId", "agentName", "location", "countryId", "coordinates", "enabled", "prefix", "verifySslCertificates", "agentType", "tests", "labels", "tags", "_links"]
|
||||
__properties: ClassVar[List[str]] = ["ipAddresses", "publicIpAddresses", "network", "agentId", "agentName", "location", "countryId", "coordinates", "networkProviderInfo", "enabled", "verifySslCertificates", "prefix", "agentType", "tests", "labels", "tags", "_links"]
|
||||
|
||||
@field_validator('agent_type')
|
||||
def agent_type_validate_regular_expression(cls, value):
|
||||
@ -105,8 +107,8 @@ class CloudAgentDetail(BaseModel):
|
||||
"agent_id",
|
||||
"location",
|
||||
"country_id",
|
||||
"prefix",
|
||||
"verify_ssl_certificates",
|
||||
"prefix",
|
||||
"labels",
|
||||
"tags",
|
||||
])
|
||||
@ -119,6 +121,9 @@ class CloudAgentDetail(BaseModel):
|
||||
# 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 network_provider_info
|
||||
if self.network_provider_info:
|
||||
_dict['networkProviderInfo'] = self.network_provider_info.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of each item in tests (list)
|
||||
_items = []
|
||||
if self.tests:
|
||||
@ -163,9 +168,10 @@ class CloudAgentDetail(BaseModel):
|
||||
"location": obj.get("location"),
|
||||
"countryId": obj.get("countryId"),
|
||||
"coordinates": Coordinates.from_dict(obj["coordinates"]) if obj.get("coordinates") is not None else None,
|
||||
"networkProviderInfo": SimpleAgentAllOfNetworkProviderInfo.from_dict(obj["networkProviderInfo"]) if obj.get("networkProviderInfo") is not None else None,
|
||||
"enabled": obj.get("enabled"),
|
||||
"prefix": obj.get("prefix"),
|
||||
"verifySslCertificates": obj.get("verifySslCertificates"),
|
||||
"prefix": obj.get("prefix"),
|
||||
"agentType": obj.get("agentType"),
|
||||
"tests": [SimpleTest.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None,
|
||||
"labels": [AgentLabel.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None,
|
||||
|
||||
@ -37,8 +37,9 @@ class ClusterMember(BaseModel):
|
||||
last_seen: Optional[datetime] = Field(default=None, description="UTC last seen date (ISO date-time format).", alias="lastSeen")
|
||||
agent_state: Optional[EnterpriseAgentState] = Field(default=None, alias="agentState")
|
||||
target_for_tests: Optional[StrictStr] = Field(default=None, description="Test target IP address.", alias="targetForTests")
|
||||
serial_number: Optional[StrictStr] = Field(default=None, description="Serial number of an enterprise agent or cluster member device. This field is not available for Cloud Agents.", alias="serialNumber")
|
||||
utilization: Optional[StrictInt] = Field(default=None, description="Shows overall utilization percentage (online Enterprise Agents and Enterprise Clusters only).")
|
||||
__properties: ClassVar[List[str]] = ["ipAddresses", "publicIpAddresses", "network", "memberId", "name", "errorDetails", "lastSeen", "agentState", "targetForTests", "utilization"]
|
||||
__properties: ClassVar[List[str]] = ["ipAddresses", "publicIpAddresses", "network", "memberId", "name", "errorDetails", "lastSeen", "agentState", "targetForTests", "serialNumber", "utilization"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
@ -79,6 +80,7 @@ class ClusterMember(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",
|
||||
@ -88,6 +90,7 @@ class ClusterMember(BaseModel):
|
||||
"name",
|
||||
"error_details",
|
||||
"last_seen",
|
||||
"serial_number",
|
||||
"utilization",
|
||||
])
|
||||
|
||||
@ -124,6 +127,7 @@ class ClusterMember(BaseModel):
|
||||
"lastSeen": obj.get("lastSeen"),
|
||||
"agentState": obj.get("agentState"),
|
||||
"targetForTests": obj.get("targetForTests"),
|
||||
"serialNumber": obj.get("serialNumber"),
|
||||
"utilization": obj.get("utilization")
|
||||
})
|
||||
return _obj
|
||||
|
||||
@ -27,6 +27,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_agent_all_of_network_provider_info import SimpleAgentAllOfNetworkProviderInfo
|
||||
from thousandeyes_sdk.agents.models.simple_test import SimpleTest
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
@ -44,9 +45,10 @@ class EnterpriseAgent(BaseModel):
|
||||
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
|
||||
network_provider_info: Optional[SimpleAgentAllOfNetworkProviderInfo] = Field(default=None, alias="networkProviderInfo")
|
||||
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")
|
||||
prefix: Optional[StrictStr] = Field(default=None, description="Prefix containing agents public IP address.")
|
||||
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")
|
||||
@ -60,9 +62,10 @@ class EnterpriseAgent(BaseModel):
|
||||
keep_browser_cache: Optional[StrictBool] = Field(default=None, description="Flag indicating if the agent retains cache.", alias="keepBrowserCache")
|
||||
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")
|
||||
serial_number: Optional[StrictStr] = Field(default=None, description="Serial number of an enterprise agent or cluster member device. This field is not available for Cloud Agents.", alias="serialNumber")
|
||||
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_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"]
|
||||
__properties: ClassVar[List[str]] = ["agentType", "ipAddresses", "publicIpAddresses", "network", "agentId", "agentName", "location", "countryId", "coordinates", "networkProviderInfo", "enabled", "verifySslCertificates", "prefix", "testIds", "tests", "clusterMembers", "utilization", "accountGroups", "ipv6Policy", "errorDetails", "hostname", "lastSeen", "agentState", "keepBrowserCache", "createdDate", "targetForTests", "serialNumber", "localResolutionPrefixes", "interfaceIpMapping"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
@ -111,6 +114,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",
|
||||
@ -119,8 +123,8 @@ class EnterpriseAgent(BaseModel):
|
||||
"agent_id",
|
||||
"location",
|
||||
"country_id",
|
||||
"prefix",
|
||||
"verify_ssl_certificates",
|
||||
"prefix",
|
||||
"test_ids",
|
||||
"cluster_members",
|
||||
"utilization",
|
||||
@ -128,6 +132,7 @@ class EnterpriseAgent(BaseModel):
|
||||
"hostname",
|
||||
"last_seen",
|
||||
"created_date",
|
||||
"serial_number",
|
||||
"interface_ip_mapping",
|
||||
])
|
||||
|
||||
@ -139,6 +144,9 @@ class EnterpriseAgent(BaseModel):
|
||||
# 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 network_provider_info
|
||||
if self.network_provider_info:
|
||||
_dict['networkProviderInfo'] = self.network_provider_info.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of each item in tests (list)
|
||||
_items = []
|
||||
if self.tests:
|
||||
@ -195,9 +203,10 @@ class EnterpriseAgent(BaseModel):
|
||||
"location": obj.get("location"),
|
||||
"countryId": obj.get("countryId"),
|
||||
"coordinates": Coordinates.from_dict(obj["coordinates"]) if obj.get("coordinates") is not None else None,
|
||||
"networkProviderInfo": SimpleAgentAllOfNetworkProviderInfo.from_dict(obj["networkProviderInfo"]) if obj.get("networkProviderInfo") is not None else None,
|
||||
"enabled": obj.get("enabled"),
|
||||
"prefix": obj.get("prefix"),
|
||||
"verifySslCertificates": obj.get("verifySslCertificates"),
|
||||
"prefix": obj.get("prefix"),
|
||||
"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,
|
||||
@ -211,6 +220,7 @@ class EnterpriseAgent(BaseModel):
|
||||
"keepBrowserCache": obj.get("keepBrowserCache"),
|
||||
"createdDate": obj.get("createdDate"),
|
||||
"targetForTests": obj.get("targetForTests"),
|
||||
"serialNumber": obj.get("serialNumber"),
|
||||
"localResolutionPrefixes": obj.get("localResolutionPrefixes"),
|
||||
"interfaceIpMapping": [InterfaceIpMapping.from_dict(_item) for _item in obj["interfaceIpMapping"]] if obj.get("interfaceIpMapping") is not None else None
|
||||
})
|
||||
|
||||
@ -31,6 +31,7 @@ from thousandeyes_sdk.agents.models.error_detail import ErrorDetail
|
||||
from thousandeyes_sdk.agents.models.interface_ip_mapping import InterfaceIpMapping
|
||||
from thousandeyes_sdk.agents.models.notification_rules import NotificationRules
|
||||
from thousandeyes_sdk.agents.models.self_links import SelfLinks
|
||||
from thousandeyes_sdk.agents.models.simple_agent_all_of_network_provider_info import SimpleAgentAllOfNetworkProviderInfo
|
||||
from thousandeyes_sdk.agents.models.simple_test import SimpleTest
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
@ -47,9 +48,10 @@ class EnterpriseAgentClusterDetail(BaseModel):
|
||||
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
|
||||
network_provider_info: Optional[SimpleAgentAllOfNetworkProviderInfo] = Field(default=None, alias="networkProviderInfo")
|
||||
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")
|
||||
prefix: Optional[StrictStr] = Field(default=None, description="Prefix containing agents public IP address.")
|
||||
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")
|
||||
@ -63,6 +65,7 @@ class EnterpriseAgentClusterDetail(BaseModel):
|
||||
keep_browser_cache: Optional[StrictBool] = Field(default=None, description="Flag indicating if the agent retains cache.", alias="keepBrowserCache")
|
||||
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")
|
||||
serial_number: Optional[StrictStr] = Field(default=None, description="Serial number of an enterprise agent or cluster member device. This field is not available for Cloud Agents.", alias="serialNumber")
|
||||
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_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")
|
||||
@ -70,7 +73,7 @@ class EnterpriseAgentClusterDetail(BaseModel):
|
||||
tags: Optional[List[AgentTag]] = Field(default=None, description="List of tags. See `/tags` 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", "coordinates", "enabled", "prefix", "verifySslCertificates", "testIds", "tests", "clusterMembers", "utilization", "accountGroups", "ipv6Policy", "errorDetails", "hostname", "lastSeen", "agentState", "keepBrowserCache", "createdDate", "targetForTests", "localResolutionPrefixes", "interfaceIpMapping", "notificationRules", "labels", "tags", "agentType", "_links"]
|
||||
__properties: ClassVar[List[str]] = ["ipAddresses", "publicIpAddresses", "network", "agentId", "agentName", "location", "countryId", "coordinates", "networkProviderInfo", "enabled", "verifySslCertificates", "prefix", "testIds", "tests", "clusterMembers", "utilization", "accountGroups", "ipv6Policy", "errorDetails", "hostname", "lastSeen", "agentState", "keepBrowserCache", "createdDate", "targetForTests", "serialNumber", "localResolutionPrefixes", "interfaceIpMapping", "notificationRules", "labels", "tags", "agentType", "_links"]
|
||||
|
||||
@field_validator('agent_type')
|
||||
def agent_type_validate_regular_expression(cls, value):
|
||||
@ -128,6 +131,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",
|
||||
@ -136,8 +140,8 @@ class EnterpriseAgentClusterDetail(BaseModel):
|
||||
"agent_id",
|
||||
"location",
|
||||
"country_id",
|
||||
"prefix",
|
||||
"verify_ssl_certificates",
|
||||
"prefix",
|
||||
"test_ids",
|
||||
"cluster_members",
|
||||
"utilization",
|
||||
@ -145,6 +149,7 @@ class EnterpriseAgentClusterDetail(BaseModel):
|
||||
"hostname",
|
||||
"last_seen",
|
||||
"created_date",
|
||||
"serial_number",
|
||||
"interface_ip_mapping",
|
||||
"labels",
|
||||
"tags",
|
||||
@ -158,6 +163,9 @@ class EnterpriseAgentClusterDetail(BaseModel):
|
||||
# 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 network_provider_info
|
||||
if self.network_provider_info:
|
||||
_dict['networkProviderInfo'] = self.network_provider_info.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of each item in tests (list)
|
||||
_items = []
|
||||
if self.tests:
|
||||
@ -237,9 +245,10 @@ class EnterpriseAgentClusterDetail(BaseModel):
|
||||
"location": obj.get("location"),
|
||||
"countryId": obj.get("countryId"),
|
||||
"coordinates": Coordinates.from_dict(obj["coordinates"]) if obj.get("coordinates") is not None else None,
|
||||
"networkProviderInfo": SimpleAgentAllOfNetworkProviderInfo.from_dict(obj["networkProviderInfo"]) if obj.get("networkProviderInfo") is not None else None,
|
||||
"enabled": obj.get("enabled"),
|
||||
"prefix": obj.get("prefix"),
|
||||
"verifySslCertificates": obj.get("verifySslCertificates"),
|
||||
"prefix": obj.get("prefix"),
|
||||
"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,
|
||||
@ -253,6 +262,7 @@ class EnterpriseAgentClusterDetail(BaseModel):
|
||||
"keepBrowserCache": obj.get("keepBrowserCache"),
|
||||
"createdDate": obj.get("createdDate"),
|
||||
"targetForTests": obj.get("targetForTests"),
|
||||
"serialNumber": obj.get("serialNumber"),
|
||||
"localResolutionPrefixes": obj.get("localResolutionPrefixes"),
|
||||
"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,
|
||||
|
||||
@ -46,9 +46,10 @@ class EnterpriseAgentData(BaseModel):
|
||||
keep_browser_cache: Optional[StrictBool] = Field(default=None, description="Flag indicating if the agent retains cache.", alias="keepBrowserCache")
|
||||
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")
|
||||
serial_number: Optional[StrictStr] = Field(default=None, description="Serial number of an enterprise agent or cluster member device. This field is not available for Cloud Agents.", alias="serialNumber")
|
||||
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_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"]
|
||||
__properties: ClassVar[List[str]] = ["testIds", "tests", "clusterMembers", "utilization", "accountGroups", "ipv6Policy", "errorDetails", "hostname", "lastSeen", "agentState", "keepBrowserCache", "createdDate", "targetForTests", "serialNumber", "localResolutionPrefixes", "interfaceIpMapping"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
@ -89,6 +90,7 @@ 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",
|
||||
@ -98,6 +100,7 @@ class EnterpriseAgentData(BaseModel):
|
||||
"hostname",
|
||||
"last_seen",
|
||||
"created_date",
|
||||
"serial_number",
|
||||
"interface_ip_mapping",
|
||||
])
|
||||
|
||||
@ -166,6 +169,7 @@ class EnterpriseAgentData(BaseModel):
|
||||
"keepBrowserCache": obj.get("keepBrowserCache"),
|
||||
"createdDate": obj.get("createdDate"),
|
||||
"targetForTests": obj.get("targetForTests"),
|
||||
"serialNumber": obj.get("serialNumber"),
|
||||
"localResolutionPrefixes": obj.get("localResolutionPrefixes"),
|
||||
"interfaceIpMapping": [InterfaceIpMapping.from_dict(_item) for _item in obj["interfaceIpMapping"]] if obj.get("interfaceIpMapping") is not None else None
|
||||
})
|
||||
|
||||
@ -31,6 +31,7 @@ from thousandeyes_sdk.agents.models.error_detail import ErrorDetail
|
||||
from thousandeyes_sdk.agents.models.interface_ip_mapping import InterfaceIpMapping
|
||||
from thousandeyes_sdk.agents.models.notification_rules import NotificationRules
|
||||
from thousandeyes_sdk.agents.models.self_links import SelfLinks
|
||||
from thousandeyes_sdk.agents.models.simple_agent_all_of_network_provider_info import SimpleAgentAllOfNetworkProviderInfo
|
||||
from thousandeyes_sdk.agents.models.simple_test import SimpleTest
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
@ -47,9 +48,10 @@ class EnterpriseAgentDetail(BaseModel):
|
||||
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
|
||||
network_provider_info: Optional[SimpleAgentAllOfNetworkProviderInfo] = Field(default=None, alias="networkProviderInfo")
|
||||
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")
|
||||
prefix: Optional[StrictStr] = Field(default=None, description="Prefix containing agents public IP address.")
|
||||
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")
|
||||
@ -63,6 +65,7 @@ class EnterpriseAgentDetail(BaseModel):
|
||||
keep_browser_cache: Optional[StrictBool] = Field(default=None, description="Flag indicating if the agent retains cache.", alias="keepBrowserCache")
|
||||
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")
|
||||
serial_number: Optional[StrictStr] = Field(default=None, description="Serial number of an enterprise agent or cluster member device. This field is not available for Cloud Agents.", alias="serialNumber")
|
||||
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_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")
|
||||
@ -70,7 +73,7 @@ class EnterpriseAgentDetail(BaseModel):
|
||||
tags: Optional[List[AgentTag]] = Field(default=None, description="List of tags. See `/tags` 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", "coordinates", "enabled", "prefix", "verifySslCertificates", "testIds", "tests", "clusterMembers", "utilization", "accountGroups", "ipv6Policy", "errorDetails", "hostname", "lastSeen", "agentState", "keepBrowserCache", "createdDate", "targetForTests", "localResolutionPrefixes", "interfaceIpMapping", "notificationRules", "labels", "tags", "agentType", "_links"]
|
||||
__properties: ClassVar[List[str]] = ["ipAddresses", "publicIpAddresses", "network", "agentId", "agentName", "location", "countryId", "coordinates", "networkProviderInfo", "enabled", "verifySslCertificates", "prefix", "testIds", "tests", "clusterMembers", "utilization", "accountGroups", "ipv6Policy", "errorDetails", "hostname", "lastSeen", "agentState", "keepBrowserCache", "createdDate", "targetForTests", "serialNumber", "localResolutionPrefixes", "interfaceIpMapping", "notificationRules", "labels", "tags", "agentType", "_links"]
|
||||
|
||||
@field_validator('agent_type')
|
||||
def agent_type_validate_regular_expression(cls, value):
|
||||
@ -128,6 +131,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",
|
||||
@ -136,8 +140,8 @@ class EnterpriseAgentDetail(BaseModel):
|
||||
"agent_id",
|
||||
"location",
|
||||
"country_id",
|
||||
"prefix",
|
||||
"verify_ssl_certificates",
|
||||
"prefix",
|
||||
"test_ids",
|
||||
"cluster_members",
|
||||
"utilization",
|
||||
@ -145,6 +149,7 @@ class EnterpriseAgentDetail(BaseModel):
|
||||
"hostname",
|
||||
"last_seen",
|
||||
"created_date",
|
||||
"serial_number",
|
||||
"interface_ip_mapping",
|
||||
"labels",
|
||||
"tags",
|
||||
@ -158,6 +163,9 @@ class EnterpriseAgentDetail(BaseModel):
|
||||
# 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 network_provider_info
|
||||
if self.network_provider_info:
|
||||
_dict['networkProviderInfo'] = self.network_provider_info.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of each item in tests (list)
|
||||
_items = []
|
||||
if self.tests:
|
||||
@ -237,9 +245,10 @@ class EnterpriseAgentDetail(BaseModel):
|
||||
"location": obj.get("location"),
|
||||
"countryId": obj.get("countryId"),
|
||||
"coordinates": Coordinates.from_dict(obj["coordinates"]) if obj.get("coordinates") is not None else None,
|
||||
"networkProviderInfo": SimpleAgentAllOfNetworkProviderInfo.from_dict(obj["networkProviderInfo"]) if obj.get("networkProviderInfo") is not None else None,
|
||||
"enabled": obj.get("enabled"),
|
||||
"prefix": obj.get("prefix"),
|
||||
"verifySslCertificates": obj.get("verifySslCertificates"),
|
||||
"prefix": obj.get("prefix"),
|
||||
"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,
|
||||
@ -253,6 +262,7 @@ class EnterpriseAgentDetail(BaseModel):
|
||||
"keepBrowserCache": obj.get("keepBrowserCache"),
|
||||
"createdDate": obj.get("createdDate"),
|
||||
"targetForTests": obj.get("targetForTests"),
|
||||
"serialNumber": obj.get("serialNumber"),
|
||||
"localResolutionPrefixes": obj.get("localResolutionPrefixes"),
|
||||
"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,
|
||||
|
||||
@ -0,0 +1,113 @@
|
||||
# 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 datetime import datetime
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from thousandeyes_sdk.agents.models.local_problem_agent import LocalProblemAgent
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class LocalProblem(BaseModel):
|
||||
"""
|
||||
LocalProblem
|
||||
""" # noqa: E501
|
||||
agent: LocalProblemAgent
|
||||
start_date: datetime = Field(description="Date and time when the local problem interval started, in UTC.", alias="startDate")
|
||||
end_date: Optional[datetime] = Field(default=None, description="Date and time when the local problem interval ended, in UTC. This value is `null` when the local problem is active.", alias="endDate")
|
||||
duration: StrictInt = Field(description="Duration of the local problem interval in seconds.")
|
||||
active: StrictBool = Field(description="Indicates whether the local problem is active.")
|
||||
__properties: ClassVar[List[str]] = ["agent", "startDate", "endDate", "duration", "active"]
|
||||
|
||||
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 LocalProblem 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.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
"start_date",
|
||||
"end_date",
|
||||
"duration",
|
||||
"active",
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# override the default output from pydantic by calling `to_dict()` of agent
|
||||
if self.agent:
|
||||
_dict['agent'] = self.agent.to_dict()
|
||||
# set to None if end_date (nullable) is None
|
||||
# and model_fields_set contains the field
|
||||
if self.end_date is None and "end_date" in self.model_fields_set:
|
||||
_dict['endDate'] = None
|
||||
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of LocalProblem from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"agent": LocalProblemAgent.from_dict(obj["agent"]) if obj.get("agent") is not None else None,
|
||||
"startDate": obj.get("startDate"),
|
||||
"endDate": obj.get("endDate"),
|
||||
"duration": obj.get("duration"),
|
||||
"active": obj.get("active")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@ -0,0 +1,106 @@
|
||||
# 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 LocalProblemAgent(BaseModel):
|
||||
"""
|
||||
LocalProblemAgent
|
||||
""" # noqa: E501
|
||||
agent_id: Optional[StrictStr] = Field(default=None, description="Agent ID.", alias="agentId")
|
||||
agent_name: Optional[StrictStr] = Field(default=None, description="Agent name.", alias="agentName")
|
||||
country_id: Optional[StrictStr] = Field(default=None, description="Two-letter ISO country code where the agent is located.", alias="countryId")
|
||||
location: Optional[StrictStr] = Field(default=None, description="Agent location.")
|
||||
__properties: ClassVar[List[str]] = ["agentId", "agentName", "countryId", "location"]
|
||||
|
||||
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 LocalProblemAgent 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.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
"agent_id",
|
||||
"agent_name",
|
||||
"country_id",
|
||||
"location",
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# set to None if location (nullable) is None
|
||||
# and model_fields_set contains the field
|
||||
if self.location is None and "location" in self.model_fields_set:
|
||||
_dict['location'] = None
|
||||
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of LocalProblemAgent from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"agentId": obj.get("agentId"),
|
||||
"agentName": obj.get("agentName"),
|
||||
"countryId": obj.get("countryId"),
|
||||
"location": obj.get("location")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@ -0,0 +1,110 @@
|
||||
# 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 datetime import datetime
|
||||
from pydantic import BaseModel, ConfigDict, Field
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from thousandeyes_sdk.agents.models.local_problem import LocalProblem
|
||||
from thousandeyes_sdk.agents.models.self_links import SelfLinks
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class LocalProblemAgentResults(BaseModel):
|
||||
"""
|
||||
LocalProblemAgentResults
|
||||
""" # noqa: E501
|
||||
local_problems: Optional[List[LocalProblem]] = Field(default=None, alias="localProblems")
|
||||
start_date: Optional[datetime] = Field(default=None, description="(Optional) When passing `window` or `startDate` parameter, the client will also receive the `startDate` field indicating the UTC start date of the data's time range being retrieved (ISO date-time format).", alias="startDate")
|
||||
end_date: Optional[datetime] = Field(default=None, description="(Optional) When passing `window` or `endDate` parameter, the client will also receive the `endDate` field indicating the UTC end date of the data's time range being retrieved (ISO date-time format).", alias="endDate")
|
||||
links: Optional[SelfLinks] = Field(default=None, alias="_links")
|
||||
__properties: ClassVar[List[str]] = ["localProblems", "startDate", "endDate", "_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 LocalProblemAgentResults 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([
|
||||
"start_date",
|
||||
"end_date",
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# override the default output from pydantic by calling `to_dict()` of each item in local_problems (list)
|
||||
_items = []
|
||||
if self.local_problems:
|
||||
for _item in self.local_problems:
|
||||
if _item:
|
||||
_items.append(_item.to_dict())
|
||||
_dict['localProblems'] = _items
|
||||
# override the default output from pydantic by calling `to_dict()` of links
|
||||
if self.links:
|
||||
_dict['_links'] = self.links.to_dict()
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of LocalProblemAgentResults from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"localProblems": [LocalProblem.from_dict(_item) for _item in obj["localProblems"]] if obj.get("localProblems") is not None else None,
|
||||
"startDate": obj.get("startDate"),
|
||||
"endDate": obj.get("endDate"),
|
||||
"_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@ -0,0 +1,96 @@
|
||||
# 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, StrictInt, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from thousandeyes_sdk.agents.models.network_provider_type import NetworkProviderType
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class NetworkProviderInfo(BaseModel):
|
||||
"""
|
||||
Information about the network provider that owns the agent's public IP prefix.
|
||||
""" # noqa: E501
|
||||
asn: Optional[StrictInt] = Field(default=None, description="Autonomous System Number (ASN) announcing the agent's public IP prefix.")
|
||||
name: Optional[StrictStr] = Field(default=None, description="Name of the network provider organization.")
|
||||
type: Optional[NetworkProviderType] = None
|
||||
__properties: ClassVar[List[str]] = ["asn", "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 NetworkProviderInfo 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([
|
||||
"asn",
|
||||
"name",
|
||||
])
|
||||
|
||||
_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 NetworkProviderInfo from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"asn": obj.get("asn"),
|
||||
"name": obj.get("name"),
|
||||
"type": obj.get("type")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Dashboards API
|
||||
Agents API
|
||||
|
||||
Manage ThousandEyes Dashboards.
|
||||
## Overview Manage Cloud and Enterprise Agents available to your account in ThousandEyes.
|
||||
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
@ -17,21 +17,24 @@ from enum import Enum
|
||||
from typing_extensions import Self
|
||||
|
||||
|
||||
class ApiAgentWidgetShow(str, Enum):
|
||||
class NetworkProviderType(str, Enum):
|
||||
"""
|
||||
Ownership of the agent.
|
||||
Classification of the agent's network provider.
|
||||
"""
|
||||
|
||||
"""
|
||||
allowed enum values
|
||||
"""
|
||||
OWNED = 'owned'
|
||||
ALL = 'all'
|
||||
UNKNOWN = 'unknown'
|
||||
ISP = 'isp'
|
||||
CDN = 'cdn'
|
||||
STUB = 'stub'
|
||||
CLOUD_MINUS_PROVIDER = 'cloud-provider'
|
||||
CARRIER = 'carrier'
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Self:
|
||||
"""Create an instance of ApiAgentWidgetShow from a JSON string"""
|
||||
"""Create an instance of NetworkProviderType from a JSON string"""
|
||||
return cls(json.loads(json_str))
|
||||
|
||||
@classmethod
|
||||
@ -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.coordinates import Coordinates
|
||||
from thousandeyes_sdk.agents.models.simple_agent_all_of_network_provider_info import SimpleAgentAllOfNetworkProviderInfo
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
@ -34,10 +35,11 @@ class SimpleAgent(BaseModel):
|
||||
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
|
||||
network_provider_info: Optional[SimpleAgentAllOfNetworkProviderInfo] = Field(default=None, alias="networkProviderInfo")
|
||||
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", "coordinates", "enabled", "prefix", "verifySslCertificates"]
|
||||
prefix: Optional[StrictStr] = Field(default=None, description="Prefix containing agents public IP address.")
|
||||
__properties: ClassVar[List[str]] = ["ipAddresses", "publicIpAddresses", "network", "agentId", "agentName", "location", "countryId", "coordinates", "networkProviderInfo", "enabled", "verifySslCertificates", "prefix"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
@ -86,8 +88,8 @@ class SimpleAgent(BaseModel):
|
||||
"agent_id",
|
||||
"location",
|
||||
"country_id",
|
||||
"prefix",
|
||||
"verify_ssl_certificates",
|
||||
"prefix",
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
@ -98,6 +100,9 @@ class SimpleAgent(BaseModel):
|
||||
# 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 network_provider_info
|
||||
if self.network_provider_info:
|
||||
_dict['networkProviderInfo'] = self.network_provider_info.to_dict()
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
@ -118,9 +123,10 @@ class SimpleAgent(BaseModel):
|
||||
"location": obj.get("location"),
|
||||
"countryId": obj.get("countryId"),
|
||||
"coordinates": Coordinates.from_dict(obj["coordinates"]) if obj.get("coordinates") is not None else None,
|
||||
"networkProviderInfo": SimpleAgentAllOfNetworkProviderInfo.from_dict(obj["networkProviderInfo"]) if obj.get("networkProviderInfo") is not None else None,
|
||||
"enabled": obj.get("enabled"),
|
||||
"prefix": obj.get("prefix"),
|
||||
"verifySslCertificates": obj.get("verifySslCertificates")
|
||||
"verifySslCertificates": obj.get("verifySslCertificates"),
|
||||
"prefix": obj.get("prefix")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@ -0,0 +1,96 @@
|
||||
# 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, StrictInt, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from thousandeyes_sdk.agents.models.network_provider_type import NetworkProviderType
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class SimpleAgentAllOfNetworkProviderInfo(BaseModel):
|
||||
"""
|
||||
SimpleAgentAllOfNetworkProviderInfo
|
||||
""" # noqa: E501
|
||||
asn: Optional[StrictInt] = Field(default=None, description="Autonomous System Number (ASN) announcing the agent's public IP prefix.")
|
||||
name: Optional[StrictStr] = Field(default=None, description="Name of the network provider organization.")
|
||||
type: Optional[NetworkProviderType] = None
|
||||
__properties: ClassVar[List[str]] = ["asn", "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 SimpleAgentAllOfNetworkProviderInfo 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([
|
||||
"asn",
|
||||
"name",
|
||||
])
|
||||
|
||||
_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 SimpleAgentAllOfNetworkProviderInfo from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"asn": obj.get("asn"),
|
||||
"name": obj.get("name"),
|
||||
"type": obj.get("type")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@ -26,6 +26,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_agent_all_of_network_provider_info import SimpleAgentAllOfNetworkProviderInfo
|
||||
from thousandeyes_sdk.agents.models.simple_test import SimpleTest
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
@ -42,9 +43,10 @@ class SimpleEnterpriseAgent(BaseModel):
|
||||
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
|
||||
network_provider_info: Optional[SimpleAgentAllOfNetworkProviderInfo] = Field(default=None, alias="networkProviderInfo")
|
||||
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")
|
||||
prefix: Optional[StrictStr] = Field(default=None, description="Prefix containing agents public IP address.")
|
||||
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")
|
||||
@ -58,9 +60,10 @@ class SimpleEnterpriseAgent(BaseModel):
|
||||
keep_browser_cache: Optional[StrictBool] = Field(default=None, description="Flag indicating if the agent retains cache.", alias="keepBrowserCache")
|
||||
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")
|
||||
serial_number: Optional[StrictStr] = Field(default=None, description="Serial number of an enterprise agent or cluster member device. This field is not available for Cloud Agents.", alias="serialNumber")
|
||||
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_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"]
|
||||
__properties: ClassVar[List[str]] = ["ipAddresses", "publicIpAddresses", "network", "agentId", "agentName", "location", "countryId", "coordinates", "networkProviderInfo", "enabled", "verifySslCertificates", "prefix", "testIds", "tests", "clusterMembers", "utilization", "accountGroups", "ipv6Policy", "errorDetails", "hostname", "lastSeen", "agentState", "keepBrowserCache", "createdDate", "targetForTests", "serialNumber", "localResolutionPrefixes", "interfaceIpMapping"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
@ -109,6 +112,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",
|
||||
@ -117,8 +121,8 @@ class SimpleEnterpriseAgent(BaseModel):
|
||||
"agent_id",
|
||||
"location",
|
||||
"country_id",
|
||||
"prefix",
|
||||
"verify_ssl_certificates",
|
||||
"prefix",
|
||||
"test_ids",
|
||||
"cluster_members",
|
||||
"utilization",
|
||||
@ -126,6 +130,7 @@ class SimpleEnterpriseAgent(BaseModel):
|
||||
"hostname",
|
||||
"last_seen",
|
||||
"created_date",
|
||||
"serial_number",
|
||||
"interface_ip_mapping",
|
||||
])
|
||||
|
||||
@ -137,6 +142,9 @@ class SimpleEnterpriseAgent(BaseModel):
|
||||
# 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 network_provider_info
|
||||
if self.network_provider_info:
|
||||
_dict['networkProviderInfo'] = self.network_provider_info.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of each item in tests (list)
|
||||
_items = []
|
||||
if self.tests:
|
||||
@ -192,9 +200,10 @@ class SimpleEnterpriseAgent(BaseModel):
|
||||
"location": obj.get("location"),
|
||||
"countryId": obj.get("countryId"),
|
||||
"coordinates": Coordinates.from_dict(obj["coordinates"]) if obj.get("coordinates") is not None else None,
|
||||
"networkProviderInfo": SimpleAgentAllOfNetworkProviderInfo.from_dict(obj["networkProviderInfo"]) if obj.get("networkProviderInfo") is not None else None,
|
||||
"enabled": obj.get("enabled"),
|
||||
"prefix": obj.get("prefix"),
|
||||
"verifySslCertificates": obj.get("verifySslCertificates"),
|
||||
"prefix": obj.get("prefix"),
|
||||
"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,
|
||||
@ -208,6 +217,7 @@ class SimpleEnterpriseAgent(BaseModel):
|
||||
"keepBrowserCache": obj.get("keepBrowserCache"),
|
||||
"createdDate": obj.get("createdDate"),
|
||||
"targetForTests": obj.get("targetForTests"),
|
||||
"serialNumber": obj.get("serialNumber"),
|
||||
"localResolutionPrefixes": obj.get("localResolutionPrefixes"),
|
||||
"interfaceIpMapping": [InterfaceIpMapping.from_dict(_item) for _item in obj["interfaceIpMapping"]] if obj.get("interfaceIpMapping") is not None else None
|
||||
})
|
||||
|
||||
@ -97,34 +97,44 @@ class TestCloudAndEnterpriseAgentNotificationRulesApi(unittest.TestCase):
|
||||
"agents" : [ {
|
||||
"agentId" : "281474976710706",
|
||||
"agentType" : "enterprise-cluster",
|
||||
"publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ],
|
||||
"prefix" : "99.128.0.0/11",
|
||||
"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",
|
||||
"networkProviderInfo" : {
|
||||
"asn" : 7018,
|
||||
"name" : "AT&T Services, Inc.",
|
||||
"type" : "isp"
|
||||
},
|
||||
"countryId" : "US",
|
||||
"enabled" : true,
|
||||
"network" : "AT&T Services, Inc. (AS 7018)",
|
||||
"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
|
||||
}, {
|
||||
"agentId" : "281474976710706",
|
||||
"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",
|
||||
"networkProviderInfo" : {
|
||||
"asn" : 7018,
|
||||
"name" : "AT&T Services, Inc.",
|
||||
"type" : "isp"
|
||||
},
|
||||
"countryId" : "US",
|
||||
"enabled" : true,
|
||||
"network" : "AT&T Services, Inc. (AS 7018)",
|
||||
"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
|
||||
} ]
|
||||
}"""
|
||||
|
||||
@ -57,6 +57,11 @@ class TestCloudAndEnterpriseAgentsApi(unittest.TestCase):
|
||||
"longitude" : -122.41942
|
||||
},
|
||||
"agentName" : "thousandeyes-stg-va-254",
|
||||
"networkProviderInfo" : {
|
||||
"asn" : 7018,
|
||||
"name" : "AT&T Services, Inc.",
|
||||
"type" : "isp"
|
||||
},
|
||||
"countryId" : "US",
|
||||
"enabled" : true,
|
||||
"network" : "AT&T Services, Inc. (AS 7018)",
|
||||
@ -169,34 +174,44 @@ class TestCloudAndEnterpriseAgentsApi(unittest.TestCase):
|
||||
"agents" : [ {
|
||||
"agentId" : "281474976710706",
|
||||
"agentType" : "enterprise-cluster",
|
||||
"publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ],
|
||||
"prefix" : "99.128.0.0/11",
|
||||
"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",
|
||||
"networkProviderInfo" : {
|
||||
"asn" : 7018,
|
||||
"name" : "AT&T Services, Inc.",
|
||||
"type" : "isp"
|
||||
},
|
||||
"countryId" : "US",
|
||||
"enabled" : true,
|
||||
"network" : "AT&T Services, Inc. (AS 7018)",
|
||||
"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
|
||||
}, {
|
||||
"agentId" : "281474976710706",
|
||||
"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",
|
||||
"networkProviderInfo" : {
|
||||
"asn" : 7018,
|
||||
"name" : "AT&T Services, Inc.",
|
||||
"type" : "isp"
|
||||
},
|
||||
"countryId" : "US",
|
||||
"enabled" : true,
|
||||
"network" : "AT&T Services, Inc. (AS 7018)",
|
||||
"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
|
||||
} ]
|
||||
}"""
|
||||
@ -246,6 +261,11 @@ class TestCloudAndEnterpriseAgentsApi(unittest.TestCase):
|
||||
"longitude" : -122.41942
|
||||
},
|
||||
"agentName" : "thousandeyes-stg-va-254",
|
||||
"networkProviderInfo" : {
|
||||
"asn" : 7018,
|
||||
"name" : "AT&T Services, Inc.",
|
||||
"type" : "isp"
|
||||
},
|
||||
"countryId" : "US",
|
||||
"enabled" : true,
|
||||
"network" : "AT&T Services, Inc. (AS 7018)",
|
||||
|
||||
@ -62,6 +62,11 @@ class TestEnterpriseAgentClusterApi(unittest.TestCase):
|
||||
"longitude" : -122.41942
|
||||
},
|
||||
"agentName" : "thousandeyes-stg-va-254",
|
||||
"networkProviderInfo" : {
|
||||
"asn" : 7018,
|
||||
"name" : "AT&T Services, Inc.",
|
||||
"type" : "isp"
|
||||
},
|
||||
"countryId" : "US",
|
||||
"enabled" : true,
|
||||
"network" : "AT&T Services, Inc. (AS 7018)",
|
||||
@ -183,34 +188,44 @@ class TestEnterpriseAgentClusterApi(unittest.TestCase):
|
||||
"agents" : [ {
|
||||
"agentId" : "281474976710706",
|
||||
"agentType" : "enterprise-cluster",
|
||||
"publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ],
|
||||
"prefix" : "99.128.0.0/11",
|
||||
"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",
|
||||
"networkProviderInfo" : {
|
||||
"asn" : 7018,
|
||||
"name" : "AT&T Services, Inc.",
|
||||
"type" : "isp"
|
||||
},
|
||||
"countryId" : "US",
|
||||
"enabled" : true,
|
||||
"network" : "AT&T Services, Inc. (AS 7018)",
|
||||
"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
|
||||
}, {
|
||||
"agentId" : "281474976710706",
|
||||
"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",
|
||||
"networkProviderInfo" : {
|
||||
"asn" : 7018,
|
||||
"name" : "AT&T Services, Inc.",
|
||||
"type" : "isp"
|
||||
},
|
||||
"countryId" : "US",
|
||||
"enabled" : true,
|
||||
"network" : "AT&T Services, Inc. (AS 7018)",
|
||||
"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
|
||||
} ]
|
||||
}"""
|
||||
|
||||
81
thousandeyes-sdk-agents/test/test_local_problems_api.py
Normal file
81
thousandeyes-sdk-agents/test/test_local_problems_api.py
Normal file
@ -0,0 +1,81 @@
|
||||
# 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.local_problems_api import LocalProblemsApi
|
||||
|
||||
|
||||
class TestLocalProblemsApi(unittest.TestCase):
|
||||
"""LocalProblemsApi unit test stubs"""
|
||||
|
||||
def setUp(self) -> None:
|
||||
self.api = LocalProblemsApi()
|
||||
|
||||
def tearDown(self) -> None:
|
||||
pass
|
||||
|
||||
def test_get_agents_local_problems_models_validation(self) -> None:
|
||||
"""Test case for get_agents_local_problems request and response models"""
|
||||
|
||||
response_body_json = """
|
||||
{
|
||||
"endDate" : "2022-07-18T22:00:54Z",
|
||||
"_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"
|
||||
}
|
||||
},
|
||||
"localProblems" : [ {
|
||||
"duration" : 480,
|
||||
"agent" : {
|
||||
"agentId" : "281474976710706",
|
||||
"agentName" : "thousandeyes-stg-va-254",
|
||||
"location" : "San Francisco Bay Area",
|
||||
"countryId" : "US"
|
||||
},
|
||||
"endDate" : "2026-05-18T03:22:00Z",
|
||||
"active" : false,
|
||||
"startDate" : "2026-05-18T03:14:00Z"
|
||||
}, {
|
||||
"duration" : 480,
|
||||
"agent" : {
|
||||
"agentId" : "281474976710706",
|
||||
"agentName" : "thousandeyes-stg-va-254",
|
||||
"location" : "San Francisco Bay Area",
|
||||
"countryId" : "US"
|
||||
},
|
||||
"endDate" : "2026-05-18T03:22:00Z",
|
||||
"active" : false,
|
||||
"startDate" : "2026-05-18T03:14:00Z"
|
||||
} ],
|
||||
"startDate" : "2022-07-17T22:00:54Z"
|
||||
}"""
|
||||
|
||||
response_loaded_json = json.loads(response_body_json)
|
||||
response_from_json = thousandeyes_sdk.agents.models.LocalProblemAgentResults.from_json(response_body_json)
|
||||
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
@ -62,6 +62,11 @@ class TestTestsAssignmentOnAgentsApi(unittest.TestCase):
|
||||
"longitude" : -122.41942
|
||||
},
|
||||
"agentName" : "thousandeyes-stg-va-254",
|
||||
"networkProviderInfo" : {
|
||||
"asn" : 7018,
|
||||
"name" : "AT&T Services, Inc.",
|
||||
"type" : "isp"
|
||||
},
|
||||
"countryId" : "US",
|
||||
"enabled" : true,
|
||||
"network" : "AT&T Services, Inc. (AS 7018)",
|
||||
@ -188,6 +193,11 @@ class TestTestsAssignmentOnAgentsApi(unittest.TestCase):
|
||||
"longitude" : -122.41942
|
||||
},
|
||||
"agentName" : "thousandeyes-stg-va-254",
|
||||
"networkProviderInfo" : {
|
||||
"asn" : 7018,
|
||||
"name" : "AT&T Services, Inc.",
|
||||
"type" : "isp"
|
||||
},
|
||||
"countryId" : "US",
|
||||
"enabled" : true,
|
||||
"network" : "AT&T Services, Inc. (AS 7018)",
|
||||
@ -314,6 +324,11 @@ class TestTestsAssignmentOnAgentsApi(unittest.TestCase):
|
||||
"longitude" : -122.41942
|
||||
},
|
||||
"agentName" : "thousandeyes-stg-va-254",
|
||||
"networkProviderInfo" : {
|
||||
"asn" : 7018,
|
||||
"name" : "AT&T Services, Inc.",
|
||||
"type" : "isp"
|
||||
},
|
||||
"countryId" : "US",
|
||||
"enabled" : true,
|
||||
"network" : "AT&T Services, Inc. (AS 7018)",
|
||||
|
||||
@ -14,7 +14,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.84
|
||||
- API version: 7.0.92
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
|
||||
@ -10,7 +10,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.84
|
||||
- API version: 7.0.92
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
|
||||
@ -5,7 +5,15 @@ docs/Assignments.md
|
||||
docs/AuthenticationType.md
|
||||
docs/BasicAuthentication.md
|
||||
docs/BearerTokenAuthentication.md
|
||||
docs/ConjurConnector.md
|
||||
docs/ConjurConnectors.md
|
||||
docs/ConjurHostAuthentication.md
|
||||
docs/ConnectorType.md
|
||||
docs/CredentialVaultOperation.md
|
||||
docs/CredentialVaultOperations.md
|
||||
docs/CredentialVaultOperationsApi.md
|
||||
docs/CredentialVaultSecret.md
|
||||
docs/CyberArkConjurConnectorsApi.md
|
||||
docs/Error.md
|
||||
docs/GenericConnector.md
|
||||
docs/GenericConnectorAuth.md
|
||||
@ -31,6 +39,8 @@ pyproject.toml
|
||||
setup.cfg
|
||||
src/thousandeyes_sdk/connectors/__init__.py
|
||||
src/thousandeyes_sdk/connectors/api/__init__.py
|
||||
src/thousandeyes_sdk/connectors/api/credential_vault_operations_api.py
|
||||
src/thousandeyes_sdk/connectors/api/cyber_ark_conjur_connectors_api.py
|
||||
src/thousandeyes_sdk/connectors/api/generic_connectors_api.py
|
||||
src/thousandeyes_sdk/connectors/api/operation_connectors_api.py
|
||||
src/thousandeyes_sdk/connectors/api/webhook_operations_api.py
|
||||
@ -39,7 +49,13 @@ src/thousandeyes_sdk/connectors/models/assignments.py
|
||||
src/thousandeyes_sdk/connectors/models/authentication_type.py
|
||||
src/thousandeyes_sdk/connectors/models/basic_authentication.py
|
||||
src/thousandeyes_sdk/connectors/models/bearer_token_authentication.py
|
||||
src/thousandeyes_sdk/connectors/models/conjur_connector.py
|
||||
src/thousandeyes_sdk/connectors/models/conjur_connectors.py
|
||||
src/thousandeyes_sdk/connectors/models/conjur_host_authentication.py
|
||||
src/thousandeyes_sdk/connectors/models/connector_type.py
|
||||
src/thousandeyes_sdk/connectors/models/credential_vault_operation.py
|
||||
src/thousandeyes_sdk/connectors/models/credential_vault_operations.py
|
||||
src/thousandeyes_sdk/connectors/models/credential_vault_secret.py
|
||||
src/thousandeyes_sdk/connectors/models/error.py
|
||||
src/thousandeyes_sdk/connectors/models/generic_connector.py
|
||||
src/thousandeyes_sdk/connectors/models/generic_connector_auth.py
|
||||
@ -60,6 +76,8 @@ src/thousandeyes_sdk/connectors/models/webhook_operation.py
|
||||
src/thousandeyes_sdk/connectors/models/webhook_operations.py
|
||||
src/thousandeyes_sdk/connectors/py.typed
|
||||
test/__init__.py
|
||||
test/test_credential_vault_operations_api.py
|
||||
test/test_cyber_ark_conjur_connectors_api.py
|
||||
test/test_generic_connectors_api.py
|
||||
test/test_operation_connectors_api.py
|
||||
test/test_utils.py
|
||||
|
||||
@ -6,7 +6,7 @@ Manage connectors and operations.
|
||||
|
||||
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||
|
||||
- API version: 7.0.84
|
||||
- API version: 7.0.92
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
@ -78,17 +78,17 @@ configuration = thousandeyes_sdk.core.Configuration(
|
||||
# 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.connectors.GenericConnectorsApi(api_client)
|
||||
generic_connector = thousandeyes_sdk.connectors.GenericConnector() # GenericConnector |
|
||||
api_instance = thousandeyes_sdk.connectors.CredentialVaultOperationsApi(api_client)
|
||||
credential_vault_operation = thousandeyes_sdk.connectors.CredentialVaultOperation() # CredentialVaultOperation |
|
||||
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:
|
||||
# Create connector
|
||||
api_response = api_instance.create_generic_connector(generic_connector, aid=aid)
|
||||
print("The response of GenericConnectorsApi->create_generic_connector:\n")
|
||||
# Create Credential Vault operation
|
||||
api_response = api_instance.create_credential_vault_operation(credential_vault_operation, aid=aid)
|
||||
print("The response of CredentialVaultOperationsApi->create_credential_vault_operation:\n")
|
||||
pprint(api_response)
|
||||
except ApiException as e:
|
||||
print("Exception when calling GenericConnectorsApi->create_generic_connector: %s\n" % e)
|
||||
print("Exception when calling CredentialVaultOperationsApi->create_credential_vault_operation: %s\n" % e)
|
||||
|
||||
```
|
||||
|
||||
@ -98,11 +98,23 @@ All URIs are relative to *https://api.thousandeyes.com/v7*
|
||||
|
||||
Class | Method | HTTP request | Description
|
||||
------------ | ------------- | ------------- | -------------
|
||||
*CredentialVaultOperationsApi* | [**create_credential_vault_operation**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/CredentialVaultOperationsApi.md#create_credential_vault_operation) | **POST** /operations/credential-vault | Create Credential Vault operation
|
||||
*CredentialVaultOperationsApi* | [**delete_credential_vault_operation**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/CredentialVaultOperationsApi.md#delete_credential_vault_operation) | **DELETE** /operations/credential-vault/{id} | Delete Credential Vault operation
|
||||
*CredentialVaultOperationsApi* | [**get_credential_vault_operation**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/CredentialVaultOperationsApi.md#get_credential_vault_operation) | **GET** /operations/credential-vault/{id} | Get Credential Vault operation
|
||||
*CredentialVaultOperationsApi* | [**get_credential_vault_operations**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/CredentialVaultOperationsApi.md#get_credential_vault_operations) | **GET** /operations/credential-vault | List Credential Vault operations
|
||||
*CredentialVaultOperationsApi* | [**update_credential_vault_operation**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/CredentialVaultOperationsApi.md#update_credential_vault_operation) | **PUT** /operations/credential-vault/{id} | Update Credential Vault operation
|
||||
*CyberArkConjurConnectorsApi* | [**create_conjur_connector**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/CyberArkConjurConnectorsApi.md#create_conjur_connector) | **POST** /connectors/conjur | Create Conjur connector
|
||||
*CyberArkConjurConnectorsApi* | [**delete_conjur_connector**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/CyberArkConjurConnectorsApi.md#delete_conjur_connector) | **DELETE** /connectors/conjur/{id} | Delete a Conjur connector
|
||||
*CyberArkConjurConnectorsApi* | [**get_conjur_connector**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/CyberArkConjurConnectorsApi.md#get_conjur_connector) | **GET** /connectors/conjur/{id} | Retrieve a Conjur connector
|
||||
*CyberArkConjurConnectorsApi* | [**get_conjur_connector_operations**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/CyberArkConjurConnectorsApi.md#get_conjur_connector_operations) | **GET** /connectors/conjur/{id}/operations | List operation IDs for a Conjur connector
|
||||
*CyberArkConjurConnectorsApi* | [**get_conjur_connectors**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/CyberArkConjurConnectorsApi.md#get_conjur_connectors) | **GET** /connectors/conjur | List Conjur connectors
|
||||
*CyberArkConjurConnectorsApi* | [**set_conjur_connector_operations**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/CyberArkConjurConnectorsApi.md#set_conjur_connector_operations) | **PUT** /connectors/conjur/{id}/operations | Assign operations to a Conjur connector
|
||||
*CyberArkConjurConnectorsApi* | [**update_conjur_connector**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/CyberArkConjurConnectorsApi.md#update_conjur_connector) | **PUT** /connectors/conjur/{id} | Update a Conjur connector
|
||||
*GenericConnectorsApi* | [**create_generic_connector**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/GenericConnectorsApi.md#create_generic_connector) | **POST** /connectors/generic | Create connector
|
||||
*GenericConnectorsApi* | [**delete_generic_connector**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/GenericConnectorsApi.md#delete_generic_connector) | **DELETE** /connectors/generic/{id} | Delete connector
|
||||
*GenericConnectorsApi* | [**get_generic_connector**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/GenericConnectorsApi.md#get_generic_connector) | **GET** /connectors/generic/{id} | Retrieve connector
|
||||
*GenericConnectorsApi* | [**get_generic_connectors**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/GenericConnectorsApi.md#get_generic_connectors) | **GET** /connectors/generic | List connectors
|
||||
*GenericConnectorsApi* | [**list_generic_connector_operations**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/GenericConnectorsApi.md#list_generic_connector_operations) | **GET** /connectors/generic/{id}/operations | List operation IDs assigned to a connector
|
||||
*GenericConnectorsApi* | [**list_generic_connector_operations**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/GenericConnectorsApi.md#list_generic_connector_operations) | **GET** /connectors/generic/{id}/operations | List operation IDs for a connector
|
||||
*GenericConnectorsApi* | [**set_generic_connector_operations**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/GenericConnectorsApi.md#set_generic_connector_operations) | **PUT** /connectors/generic/{id}/operations | Assign operations to a connector
|
||||
*GenericConnectorsApi* | [**update_generic_connector**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/GenericConnectorsApi.md#update_generic_connector) | **PUT** /connectors/generic/{id} | Update connector
|
||||
*OperationConnectorsApi* | [**get_operation_connectors**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/OperationConnectorsApi.md#get_operation_connectors) | **GET** /operations/{type}/{id}/connectors | Retrieve connectors assigned to an operation
|
||||
@ -120,7 +132,13 @@ Class | Method | HTTP request | Description
|
||||
- [AuthenticationType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/AuthenticationType.md)
|
||||
- [BasicAuthentication](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/BasicAuthentication.md)
|
||||
- [BearerTokenAuthentication](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/BearerTokenAuthentication.md)
|
||||
- [ConjurConnector](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/ConjurConnector.md)
|
||||
- [ConjurConnectors](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/ConjurConnectors.md)
|
||||
- [ConjurHostAuthentication](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/ConjurHostAuthentication.md)
|
||||
- [ConnectorType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/ConnectorType.md)
|
||||
- [CredentialVaultOperation](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/CredentialVaultOperation.md)
|
||||
- [CredentialVaultOperations](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/CredentialVaultOperations.md)
|
||||
- [CredentialVaultSecret](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/CredentialVaultSecret.md)
|
||||
- [Error](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/Error.md)
|
||||
- [GenericConnector](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/GenericConnector.md)
|
||||
- [GenericConnectorAuth](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/GenericConnectorAuth.md)
|
||||
|
||||
36
thousandeyes-sdk-connectors/docs/ConjurConnector.md
Normal file
36
thousandeyes-sdk-connectors/docs/ConjurConnector.md
Normal file
@ -0,0 +1,36 @@
|
||||
# ConjurConnector
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **str** | | [optional] [readonly]
|
||||
**type** | [**ConnectorType**](ConnectorType.md) | |
|
||||
**name** | **str** | |
|
||||
**target** | **str** | |
|
||||
**last_modified_date** | **int** | The date when the connector was last modified (Unix timestamp in milliseconds). | [optional] [readonly]
|
||||
**account** | **str** | |
|
||||
**authentication** | [**ConjurHostAuthentication**](ConjurHostAuthentication.md) | |
|
||||
**links** | [**SelfLinks**](SelfLinks.md) | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from thousandeyes_sdk.connectors.models.conjur_connector import ConjurConnector
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of ConjurConnector from a JSON string
|
||||
conjur_connector_instance = ConjurConnector.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(ConjurConnector.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
conjur_connector_dict = conjur_connector_instance.to_dict()
|
||||
# create an instance of ConjurConnector from a dict
|
||||
conjur_connector_from_dict = ConjurConnector.from_dict(conjur_connector_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)
|
||||
|
||||
|
||||
30
thousandeyes-sdk-connectors/docs/ConjurConnectors.md
Normal file
30
thousandeyes-sdk-connectors/docs/ConjurConnectors.md
Normal file
@ -0,0 +1,30 @@
|
||||
# ConjurConnectors
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**items** | [**List[ConjurConnector]**](ConjurConnector.md) | | [optional]
|
||||
**links** | [**SelfLinks**](SelfLinks.md) | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from thousandeyes_sdk.connectors.models.conjur_connectors import ConjurConnectors
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of ConjurConnectors from a JSON string
|
||||
conjur_connectors_instance = ConjurConnectors.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(ConjurConnectors.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
conjur_connectors_dict = conjur_connectors_instance.to_dict()
|
||||
# create an instance of ConjurConnectors from a dict
|
||||
conjur_connectors_from_dict = ConjurConnectors.from_dict(conjur_connectors_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)
|
||||
|
||||
|
||||
31
thousandeyes-sdk-connectors/docs/ConjurHostAuthentication.md
Normal file
31
thousandeyes-sdk-connectors/docs/ConjurHostAuthentication.md
Normal file
@ -0,0 +1,31 @@
|
||||
# ConjurHostAuthentication
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**host_id** | **str** | |
|
||||
**api_key** | **str** | |
|
||||
**type** | [**AuthenticationType**](AuthenticationType.md) | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from thousandeyes_sdk.connectors.models.conjur_host_authentication import ConjurHostAuthentication
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of ConjurHostAuthentication from a JSON string
|
||||
conjur_host_authentication_instance = ConjurHostAuthentication.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(ConjurHostAuthentication.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
conjur_host_authentication_dict = conjur_host_authentication_instance.to_dict()
|
||||
# create an instance of ConjurHostAuthentication from a dict
|
||||
conjur_host_authentication_from_dict = ConjurHostAuthentication.from_dict(conjur_host_authentication_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)
|
||||
|
||||
|
||||
34
thousandeyes-sdk-connectors/docs/CredentialVaultOperation.md
Normal file
34
thousandeyes-sdk-connectors/docs/CredentialVaultOperation.md
Normal file
@ -0,0 +1,34 @@
|
||||
# CredentialVaultOperation
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **str** | | [optional] [readonly]
|
||||
**name** | **str** | |
|
||||
**secrets** | [**List[CredentialVaultSecret]**](CredentialVaultSecret.md) | |
|
||||
**type** | [**OperationType**](OperationType.md) | | [optional]
|
||||
**status** | [**OperationStatus**](OperationStatus.md) | | [optional]
|
||||
**links** | [**SelfLinks**](SelfLinks.md) | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from thousandeyes_sdk.connectors.models.credential_vault_operation import CredentialVaultOperation
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of CredentialVaultOperation from a JSON string
|
||||
credential_vault_operation_instance = CredentialVaultOperation.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(CredentialVaultOperation.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
credential_vault_operation_dict = credential_vault_operation_instance.to_dict()
|
||||
# create an instance of CredentialVaultOperation from a dict
|
||||
credential_vault_operation_from_dict = CredentialVaultOperation.from_dict(credential_vault_operation_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)
|
||||
|
||||
|
||||
@ -0,0 +1,30 @@
|
||||
# CredentialVaultOperations
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**items** | [**List[CredentialVaultOperation]**](CredentialVaultOperation.md) | | [optional]
|
||||
**links** | [**SelfLinks**](SelfLinks.md) | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from thousandeyes_sdk.connectors.models.credential_vault_operations import CredentialVaultOperations
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of CredentialVaultOperations from a JSON string
|
||||
credential_vault_operations_instance = CredentialVaultOperations.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(CredentialVaultOperations.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
credential_vault_operations_dict = credential_vault_operations_instance.to_dict()
|
||||
# create an instance of CredentialVaultOperations from a dict
|
||||
credential_vault_operations_from_dict = CredentialVaultOperations.from_dict(credential_vault_operations_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)
|
||||
|
||||
|
||||
437
thousandeyes-sdk-connectors/docs/CredentialVaultOperationsApi.md
Normal file
437
thousandeyes-sdk-connectors/docs/CredentialVaultOperationsApi.md
Normal file
@ -0,0 +1,437 @@
|
||||
# thousandeyes_sdk.connectors.CredentialVaultOperationsApi
|
||||
|
||||
All URIs are relative to *https://api.thousandeyes.com/v7*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**create_credential_vault_operation**](CredentialVaultOperationsApi.md#create_credential_vault_operation) | **POST** /operations/credential-vault | Create Credential Vault operation
|
||||
[**delete_credential_vault_operation**](CredentialVaultOperationsApi.md#delete_credential_vault_operation) | **DELETE** /operations/credential-vault/{id} | Delete Credential Vault operation
|
||||
[**get_credential_vault_operation**](CredentialVaultOperationsApi.md#get_credential_vault_operation) | **GET** /operations/credential-vault/{id} | Get Credential Vault operation
|
||||
[**get_credential_vault_operations**](CredentialVaultOperationsApi.md#get_credential_vault_operations) | **GET** /operations/credential-vault | List Credential Vault operations
|
||||
[**update_credential_vault_operation**](CredentialVaultOperationsApi.md#update_credential_vault_operation) | **PUT** /operations/credential-vault/{id} | Update Credential Vault operation
|
||||
|
||||
|
||||
# **create_credential_vault_operation**
|
||||
> CredentialVaultOperation create_credential_vault_operation(credential_vault_operation, aid=aid)
|
||||
|
||||
Create Credential Vault operation
|
||||
|
||||
Create a new Credential Vault operation.
|
||||
|
||||
### Example
|
||||
|
||||
* Bearer Authentication (BearerAuth):
|
||||
|
||||
```python
|
||||
import thousandeyes_sdk.connectors
|
||||
from thousandeyes_sdk.connectors.models.credential_vault_operation import CredentialVaultOperation
|
||||
from thousandeyes_sdk.connectors.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.connectors.CredentialVaultOperationsApi(api_client)
|
||||
credential_vault_operation = thousandeyes_sdk.connectors.CredentialVaultOperation() # CredentialVaultOperation |
|
||||
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:
|
||||
# Create Credential Vault operation
|
||||
api_response = api_instance.create_credential_vault_operation(credential_vault_operation, aid=aid)
|
||||
print("The response of CredentialVaultOperationsApi->create_credential_vault_operation:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling CredentialVaultOperationsApi->create_credential_vault_operation: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**credential_vault_operation** | [**CredentialVaultOperation**](CredentialVaultOperation.md)| |
|
||||
**aid** | **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]
|
||||
|
||||
### Return type
|
||||
|
||||
[**CredentialVaultOperation**](CredentialVaultOperation.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 |
|
||||
|-------------|-------------|------------------|
|
||||
**201** | The created Credential Vault operation. | - |
|
||||
**400** | Bad Request | - |
|
||||
**401** | Unauthorized | - |
|
||||
**403** | Insufficient permissions to query endpoint | - |
|
||||
**404** | Not found | - |
|
||||
**500** | Internal server error | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **delete_credential_vault_operation**
|
||||
> delete_credential_vault_operation(id, confirm_disabled_objects, aid=aid)
|
||||
|
||||
Delete Credential Vault operation
|
||||
|
||||
Delete a single Credential Vault operation by its ID. Note: This operation may disable affected objects (such as tests).
|
||||
|
||||
### Example
|
||||
|
||||
* Bearer Authentication (BearerAuth):
|
||||
|
||||
```python
|
||||
import thousandeyes_sdk.connectors
|
||||
from thousandeyes_sdk.connectors.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.connectors.CredentialVaultOperationsApi(api_client)
|
||||
id = 'cb1b8033-ea2d-4e9b-a920-fe87850693cf' # str | The operation ID.
|
||||
confirm_disabled_objects = False # bool | Confirmation to disable affected objects (for example, tests) for credential-vault operations. (default to False)
|
||||
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:
|
||||
# Delete Credential Vault operation
|
||||
api_instance.delete_credential_vault_operation(id, confirm_disabled_objects, aid=aid)
|
||||
except Exception as e:
|
||||
print("Exception when calling CredentialVaultOperationsApi->delete_credential_vault_operation: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **str**| The operation ID. |
|
||||
**confirm_disabled_objects** | **bool**| Confirmation to disable affected objects (for example, tests) for credential-vault operations. | [default to False]
|
||||
**aid** | **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]
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[BearerAuth](../README.md#BearerAuth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/problem+json
|
||||
|
||||
### HTTP response details
|
||||
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**204** | No Content. | - |
|
||||
**400** | Bad Request | - |
|
||||
**401** | Unauthorized | - |
|
||||
**403** | Insufficient permissions to query endpoint | - |
|
||||
**404** | Not found | - |
|
||||
**500** | Internal server error | - |
|
||||
|
||||
[[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_credential_vault_operation**
|
||||
> CredentialVaultOperation get_credential_vault_operation(id, aid=aid)
|
||||
|
||||
Get Credential Vault operation
|
||||
|
||||
Retrieve a single Credential Vault operation by its ID.
|
||||
|
||||
### Example
|
||||
|
||||
* Bearer Authentication (BearerAuth):
|
||||
|
||||
```python
|
||||
import thousandeyes_sdk.connectors
|
||||
from thousandeyes_sdk.connectors.models.credential_vault_operation import CredentialVaultOperation
|
||||
from thousandeyes_sdk.connectors.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.connectors.CredentialVaultOperationsApi(api_client)
|
||||
id = 'cb1b8033-ea2d-4e9b-a920-fe87850693cf' # str | The operation ID.
|
||||
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:
|
||||
# Get Credential Vault operation
|
||||
api_response = api_instance.get_credential_vault_operation(id, aid=aid)
|
||||
print("The response of CredentialVaultOperationsApi->get_credential_vault_operation:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling CredentialVaultOperationsApi->get_credential_vault_operation: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **str**| The operation ID. |
|
||||
**aid** | **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]
|
||||
|
||||
### Return type
|
||||
|
||||
[**CredentialVaultOperation**](CredentialVaultOperation.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[BearerAuth](../README.md#BearerAuth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/hal+json, application/json, application/problem+json
|
||||
|
||||
### HTTP response details
|
||||
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**200** | Credential Vault operation details. | - |
|
||||
**400** | Bad Request | - |
|
||||
**401** | Unauthorized | - |
|
||||
**403** | Insufficient permissions to query endpoint | - |
|
||||
**404** | Not found | - |
|
||||
**500** | Internal server error | - |
|
||||
|
||||
[[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_credential_vault_operations**
|
||||
> CredentialVaultOperations get_credential_vault_operations(aid=aid)
|
||||
|
||||
List Credential Vault operations
|
||||
|
||||
Returns a list of Credential Vault operations in the specified account group. If no account group is specified, the user's default account group is used.
|
||||
|
||||
### Example
|
||||
|
||||
* Bearer Authentication (BearerAuth):
|
||||
|
||||
```python
|
||||
import thousandeyes_sdk.connectors
|
||||
from thousandeyes_sdk.connectors.models.credential_vault_operations import CredentialVaultOperations
|
||||
from thousandeyes_sdk.connectors.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.connectors.CredentialVaultOperationsApi(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)
|
||||
|
||||
try:
|
||||
# List Credential Vault operations
|
||||
api_response = api_instance.get_credential_vault_operations(aid=aid)
|
||||
print("The response of CredentialVaultOperationsApi->get_credential_vault_operations:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling CredentialVaultOperationsApi->get_credential_vault_operations: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**aid** | **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]
|
||||
|
||||
### Return type
|
||||
|
||||
[**CredentialVaultOperations**](CredentialVaultOperations.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[BearerAuth](../README.md#BearerAuth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/hal+json, application/json, application/problem+json
|
||||
|
||||
### HTTP response details
|
||||
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**200** | A list of Credential Vault operations. | - |
|
||||
**400** | Bad Request | - |
|
||||
**401** | Unauthorized | - |
|
||||
**403** | Insufficient permissions to query endpoint | - |
|
||||
**404** | Not found | - |
|
||||
**500** | Internal server error | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **update_credential_vault_operation**
|
||||
> CredentialVaultOperation update_credential_vault_operation(id, credential_vault_operation, aid=aid)
|
||||
|
||||
Update Credential Vault operation
|
||||
|
||||
Update a single existing Credential Vault operation.
|
||||
|
||||
### Example
|
||||
|
||||
* Bearer Authentication (BearerAuth):
|
||||
|
||||
```python
|
||||
import thousandeyes_sdk.connectors
|
||||
from thousandeyes_sdk.connectors.models.credential_vault_operation import CredentialVaultOperation
|
||||
from thousandeyes_sdk.connectors.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.connectors.CredentialVaultOperationsApi(api_client)
|
||||
id = 'cb1b8033-ea2d-4e9b-a920-fe87850693cf' # str | The operation ID.
|
||||
credential_vault_operation = thousandeyes_sdk.connectors.CredentialVaultOperation() # CredentialVaultOperation |
|
||||
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:
|
||||
# Update Credential Vault operation
|
||||
api_response = api_instance.update_credential_vault_operation(id, credential_vault_operation, aid=aid)
|
||||
print("The response of CredentialVaultOperationsApi->update_credential_vault_operation:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling CredentialVaultOperationsApi->update_credential_vault_operation: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **str**| The operation ID. |
|
||||
**credential_vault_operation** | [**CredentialVaultOperation**](CredentialVaultOperation.md)| |
|
||||
**aid** | **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]
|
||||
|
||||
### Return type
|
||||
|
||||
[**CredentialVaultOperation**](CredentialVaultOperation.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** | The updated Credential Vault operation. | - |
|
||||
**400** | Bad Request | - |
|
||||
**401** | Unauthorized | - |
|
||||
**403** | Insufficient permissions to query endpoint | - |
|
||||
**404** | Not found | - |
|
||||
**500** | Internal server error | - |
|
||||
|
||||
[[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)
|
||||
|
||||
31
thousandeyes-sdk-connectors/docs/CredentialVaultSecret.md
Normal file
31
thousandeyes-sdk-connectors/docs/CredentialVaultSecret.md
Normal file
@ -0,0 +1,31 @@
|
||||
# CredentialVaultSecret
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **str** | | [optional]
|
||||
**name** | **str** | |
|
||||
**secret_key** | **str** | |
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from thousandeyes_sdk.connectors.models.credential_vault_secret import CredentialVaultSecret
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of CredentialVaultSecret from a JSON string
|
||||
credential_vault_secret_instance = CredentialVaultSecret.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(CredentialVaultSecret.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
credential_vault_secret_dict = credential_vault_secret_instance.to_dict()
|
||||
# create an instance of CredentialVaultSecret from a dict
|
||||
credential_vault_secret_from_dict = CredentialVaultSecret.from_dict(credential_vault_secret_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)
|
||||
|
||||
|
||||
613
thousandeyes-sdk-connectors/docs/CyberArkConjurConnectorsApi.md
Normal file
613
thousandeyes-sdk-connectors/docs/CyberArkConjurConnectorsApi.md
Normal file
@ -0,0 +1,613 @@
|
||||
# thousandeyes_sdk.connectors.CyberArkConjurConnectorsApi
|
||||
|
||||
All URIs are relative to *https://api.thousandeyes.com/v7*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**create_conjur_connector**](CyberArkConjurConnectorsApi.md#create_conjur_connector) | **POST** /connectors/conjur | Create Conjur connector
|
||||
[**delete_conjur_connector**](CyberArkConjurConnectorsApi.md#delete_conjur_connector) | **DELETE** /connectors/conjur/{id} | Delete a Conjur connector
|
||||
[**get_conjur_connector**](CyberArkConjurConnectorsApi.md#get_conjur_connector) | **GET** /connectors/conjur/{id} | Retrieve a Conjur connector
|
||||
[**get_conjur_connector_operations**](CyberArkConjurConnectorsApi.md#get_conjur_connector_operations) | **GET** /connectors/conjur/{id}/operations | List operation IDs for a Conjur connector
|
||||
[**get_conjur_connectors**](CyberArkConjurConnectorsApi.md#get_conjur_connectors) | **GET** /connectors/conjur | List Conjur connectors
|
||||
[**set_conjur_connector_operations**](CyberArkConjurConnectorsApi.md#set_conjur_connector_operations) | **PUT** /connectors/conjur/{id}/operations | Assign operations to a Conjur connector
|
||||
[**update_conjur_connector**](CyberArkConjurConnectorsApi.md#update_conjur_connector) | **PUT** /connectors/conjur/{id} | Update a Conjur connector
|
||||
|
||||
|
||||
# **create_conjur_connector**
|
||||
> ConjurConnector create_conjur_connector(conjur_connector, aid=aid)
|
||||
|
||||
Create Conjur connector
|
||||
|
||||
Creates a new CyberArk Conjur connector.
|
||||
|
||||
### Example
|
||||
|
||||
* Bearer Authentication (BearerAuth):
|
||||
|
||||
```python
|
||||
import thousandeyes_sdk.connectors
|
||||
from thousandeyes_sdk.connectors.models.conjur_connector import ConjurConnector
|
||||
from thousandeyes_sdk.connectors.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.connectors.CyberArkConjurConnectorsApi(api_client)
|
||||
conjur_connector = thousandeyes_sdk.connectors.ConjurConnector() # ConjurConnector |
|
||||
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:
|
||||
# Create Conjur connector
|
||||
api_response = api_instance.create_conjur_connector(conjur_connector, aid=aid)
|
||||
print("The response of CyberArkConjurConnectorsApi->create_conjur_connector:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling CyberArkConjurConnectorsApi->create_conjur_connector: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**conjur_connector** | [**ConjurConnector**](ConjurConnector.md)| |
|
||||
**aid** | **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]
|
||||
|
||||
### Return type
|
||||
|
||||
[**ConjurConnector**](ConjurConnector.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 |
|
||||
|-------------|-------------|------------------|
|
||||
**201** | The created Conjur connector. | - |
|
||||
**400** | Bad Request | - |
|
||||
**401** | Unauthorized | - |
|
||||
**403** | Insufficient permissions to query endpoint | - |
|
||||
**404** | Not found | - |
|
||||
**500** | Internal server error | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **delete_conjur_connector**
|
||||
> delete_conjur_connector(id, confirm_disabled_objects, aid=aid)
|
||||
|
||||
Delete a Conjur connector
|
||||
|
||||
Deleted the CyberArk Conjur connector specified by ID. Note: This operation may disable affected objects (such as tests).
|
||||
|
||||
### Example
|
||||
|
||||
* Bearer Authentication (BearerAuth):
|
||||
|
||||
```python
|
||||
import thousandeyes_sdk.connectors
|
||||
from thousandeyes_sdk.connectors.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.connectors.CyberArkConjurConnectorsApi(api_client)
|
||||
id = 'cb1b8033-ea2d-4e9b-a920-fe87850693cf' # str | The connector ID.
|
||||
confirm_disabled_objects = False # bool | Confirmation to disable affected objects (for example, tests) for Conjur connectors. (default to False)
|
||||
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:
|
||||
# Delete a Conjur connector
|
||||
api_instance.delete_conjur_connector(id, confirm_disabled_objects, aid=aid)
|
||||
except Exception as e:
|
||||
print("Exception when calling CyberArkConjurConnectorsApi->delete_conjur_connector: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **str**| The connector ID. |
|
||||
**confirm_disabled_objects** | **bool**| Confirmation to disable affected objects (for example, tests) for Conjur connectors. | [default to False]
|
||||
**aid** | **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]
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[BearerAuth](../README.md#BearerAuth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/problem+json
|
||||
|
||||
### HTTP response details
|
||||
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**204** | No Content. | - |
|
||||
**400** | Bad Request | - |
|
||||
**401** | Unauthorized | - |
|
||||
**403** | Insufficient permissions to query endpoint | - |
|
||||
**404** | Not found | - |
|
||||
**500** | Internal server error | - |
|
||||
|
||||
[[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_conjur_connector**
|
||||
> ConjurConnector get_conjur_connector(id, aid=aid)
|
||||
|
||||
Retrieve a Conjur connector
|
||||
|
||||
Retrieves details of a CyberArk Conjur connector by its ID.
|
||||
|
||||
### Example
|
||||
|
||||
* Bearer Authentication (BearerAuth):
|
||||
|
||||
```python
|
||||
import thousandeyes_sdk.connectors
|
||||
from thousandeyes_sdk.connectors.models.conjur_connector import ConjurConnector
|
||||
from thousandeyes_sdk.connectors.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.connectors.CyberArkConjurConnectorsApi(api_client)
|
||||
id = 'cb1b8033-ea2d-4e9b-a920-fe87850693cf' # str | The connector ID.
|
||||
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:
|
||||
# Retrieve a Conjur connector
|
||||
api_response = api_instance.get_conjur_connector(id, aid=aid)
|
||||
print("The response of CyberArkConjurConnectorsApi->get_conjur_connector:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling CyberArkConjurConnectorsApi->get_conjur_connector: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **str**| The connector ID. |
|
||||
**aid** | **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]
|
||||
|
||||
### Return type
|
||||
|
||||
[**ConjurConnector**](ConjurConnector.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[BearerAuth](../README.md#BearerAuth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/hal+json, application/json, application/problem+json
|
||||
|
||||
### HTTP response details
|
||||
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**200** | CyberArk Conjur Connector details. | - |
|
||||
**400** | Bad Request | - |
|
||||
**401** | Unauthorized | - |
|
||||
**403** | Insufficient permissions to query endpoint | - |
|
||||
**404** | Not found | - |
|
||||
**500** | Internal server error | - |
|
||||
|
||||
[[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_conjur_connector_operations**
|
||||
> Assignments get_conjur_connector_operations(id, aid=aid)
|
||||
|
||||
List operation IDs for a Conjur connector
|
||||
|
||||
Returns a list of operation IDs assigned to a CyberArk Conjur connector.
|
||||
|
||||
### Example
|
||||
|
||||
* Bearer Authentication (BearerAuth):
|
||||
|
||||
```python
|
||||
import thousandeyes_sdk.connectors
|
||||
from thousandeyes_sdk.connectors.models.assignments import Assignments
|
||||
from thousandeyes_sdk.connectors.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.connectors.CyberArkConjurConnectorsApi(api_client)
|
||||
id = 'cb1b8033-ea2d-4e9b-a920-fe87850693cf' # str | The connector ID.
|
||||
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:
|
||||
# List operation IDs for a Conjur connector
|
||||
api_response = api_instance.get_conjur_connector_operations(id, aid=aid)
|
||||
print("The response of CyberArkConjurConnectorsApi->get_conjur_connector_operations:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling CyberArkConjurConnectorsApi->get_conjur_connector_operations: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **str**| The connector ID. |
|
||||
**aid** | **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]
|
||||
|
||||
### Return type
|
||||
|
||||
[**Assignments**](Assignments.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[BearerAuth](../README.md#BearerAuth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/hal+json, application/json, application/problem+json
|
||||
|
||||
### HTTP response details
|
||||
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**200** | A list of assigned operation IDs. | - |
|
||||
**400** | Bad Request | - |
|
||||
**401** | Unauthorized | - |
|
||||
**403** | Insufficient permissions to query endpoint | - |
|
||||
**404** | Not found | - |
|
||||
**500** | Internal server error | - |
|
||||
|
||||
[[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_conjur_connectors**
|
||||
> ConjurConnectors get_conjur_connectors(aid=aid)
|
||||
|
||||
List Conjur connectors
|
||||
|
||||
Returns a list of CyberArk Conjur connectors in the specified account group. If no account group is specified, the user’s default account group is used.
|
||||
|
||||
### Example
|
||||
|
||||
* Bearer Authentication (BearerAuth):
|
||||
|
||||
```python
|
||||
import thousandeyes_sdk.connectors
|
||||
from thousandeyes_sdk.connectors.models.conjur_connectors import ConjurConnectors
|
||||
from thousandeyes_sdk.connectors.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.connectors.CyberArkConjurConnectorsApi(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)
|
||||
|
||||
try:
|
||||
# List Conjur connectors
|
||||
api_response = api_instance.get_conjur_connectors(aid=aid)
|
||||
print("The response of CyberArkConjurConnectorsApi->get_conjur_connectors:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling CyberArkConjurConnectorsApi->get_conjur_connectors: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**aid** | **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]
|
||||
|
||||
### Return type
|
||||
|
||||
[**ConjurConnectors**](ConjurConnectors.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[BearerAuth](../README.md#BearerAuth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/hal+json, application/json, application/problem+json
|
||||
|
||||
### HTTP response details
|
||||
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**200** | A list of Conjur connectors. | - |
|
||||
**400** | Bad Request | - |
|
||||
**401** | Unauthorized | - |
|
||||
**403** | Insufficient permissions to query endpoint | - |
|
||||
**404** | Not found | - |
|
||||
**500** | Internal server error | - |
|
||||
|
||||
[[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)
|
||||
|
||||
# **set_conjur_connector_operations**
|
||||
> Assignments set_conjur_connector_operations(id, confirm_disabled_objects, request_body, aid=aid)
|
||||
|
||||
Assign operations to a Conjur connector
|
||||
|
||||
Assigns operations to a CyberArk Conjur connector. This replaces any existing assignments. Note: This operation may disable affected objects (such as tests) if operations are changed.
|
||||
|
||||
### Example
|
||||
|
||||
* Bearer Authentication (BearerAuth):
|
||||
|
||||
```python
|
||||
import thousandeyes_sdk.connectors
|
||||
from thousandeyes_sdk.connectors.models.assignments import Assignments
|
||||
from thousandeyes_sdk.connectors.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.connectors.CyberArkConjurConnectorsApi(api_client)
|
||||
id = 'cb1b8033-ea2d-4e9b-a920-fe87850693cf' # str | The connector ID.
|
||||
confirm_disabled_objects = False # bool | Confirmation to disable affected objects (for example, tests) for Conjur connectors. (default to False)
|
||||
request_body = ["ca39314d-eb4f-496f-9435-b5d20b1bfbff","a32cfbab-32f6-41d8-9027-7127cba965dd"] # List[str] | List of operation IDs to assign to the connector.
|
||||
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 operations to a Conjur connector
|
||||
api_response = api_instance.set_conjur_connector_operations(id, confirm_disabled_objects, request_body, aid=aid)
|
||||
print("The response of CyberArkConjurConnectorsApi->set_conjur_connector_operations:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling CyberArkConjurConnectorsApi->set_conjur_connector_operations: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **str**| The connector ID. |
|
||||
**confirm_disabled_objects** | **bool**| Confirmation to disable affected objects (for example, tests) for Conjur connectors. | [default to False]
|
||||
**request_body** | [**List[str]**](str.md)| List of operation IDs to assign to the connector. |
|
||||
**aid** | **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]
|
||||
|
||||
### Return type
|
||||
|
||||
[**Assignments**](Assignments.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** | Operations assigned successfully. | - |
|
||||
**400** | Bad Request | - |
|
||||
**401** | Unauthorized | - |
|
||||
**403** | Insufficient permissions to query endpoint | - |
|
||||
**404** | Not found | - |
|
||||
**500** | Internal server error | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **update_conjur_connector**
|
||||
> ConjurConnector update_conjur_connector(id, conjur_connector, aid=aid)
|
||||
|
||||
Update a Conjur connector
|
||||
|
||||
Updates the CyberArk Conjur connector specified by ID.
|
||||
|
||||
### Example
|
||||
|
||||
* Bearer Authentication (BearerAuth):
|
||||
|
||||
```python
|
||||
import thousandeyes_sdk.connectors
|
||||
from thousandeyes_sdk.connectors.models.conjur_connector import ConjurConnector
|
||||
from thousandeyes_sdk.connectors.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.connectors.CyberArkConjurConnectorsApi(api_client)
|
||||
id = 'cb1b8033-ea2d-4e9b-a920-fe87850693cf' # str | The connector ID.
|
||||
conjur_connector = thousandeyes_sdk.connectors.ConjurConnector() # ConjurConnector |
|
||||
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:
|
||||
# Update a Conjur connector
|
||||
api_response = api_instance.update_conjur_connector(id, conjur_connector, aid=aid)
|
||||
print("The response of CyberArkConjurConnectorsApi->update_conjur_connector:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
print("Exception when calling CyberArkConjurConnectorsApi->update_conjur_connector: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **str**| The connector ID. |
|
||||
**conjur_connector** | [**ConjurConnector**](ConjurConnector.md)| |
|
||||
**aid** | **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]
|
||||
|
||||
### Return type
|
||||
|
||||
[**ConjurConnector**](ConjurConnector.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** | The updated connector. | - |
|
||||
**400** | Bad Request | - |
|
||||
**401** | Unauthorized | - |
|
||||
**403** | Insufficient permissions to query endpoint | - |
|
||||
**404** | Not found | - |
|
||||
**500** | Internal server error | - |
|
||||
|
||||
[[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)
|
||||
|
||||
@ -9,9 +9,10 @@ Name | Type | Description | Notes
|
||||
**type** | [**ConnectorType**](ConnectorType.md) | |
|
||||
**name** | **str** | |
|
||||
**target** | **str** | |
|
||||
**authentication** | [**GenericConnectorAuth**](GenericConnectorAuth.md) | | [optional]
|
||||
**last_modified_date** | **int** | The date when the connector was last modified (Unix timestamp in milliseconds). | [optional] [readonly]
|
||||
**authentication** | [**GenericConnectorAuth**](GenericConnectorAuth.md) | | [optional]
|
||||
**headers** | [**List[Header]**](Header.md) | | [optional]
|
||||
**links** | [**SelfLinks**](SelfLinks.md) | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
|
||||
@ -16,6 +16,7 @@ Name | Type | Description | Notes
|
||||
**oauth_client_secret** | **str** | |
|
||||
**code** | **str** | |
|
||||
**redirect_uri** | **str** | |
|
||||
**scope** | **str** | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ Method | HTTP request | Description
|
||||
[**delete_generic_connector**](GenericConnectorsApi.md#delete_generic_connector) | **DELETE** /connectors/generic/{id} | Delete connector
|
||||
[**get_generic_connector**](GenericConnectorsApi.md#get_generic_connector) | **GET** /connectors/generic/{id} | Retrieve connector
|
||||
[**get_generic_connectors**](GenericConnectorsApi.md#get_generic_connectors) | **GET** /connectors/generic | List connectors
|
||||
[**list_generic_connector_operations**](GenericConnectorsApi.md#list_generic_connector_operations) | **GET** /connectors/generic/{id}/operations | List operation IDs assigned to a connector
|
||||
[**list_generic_connector_operations**](GenericConnectorsApi.md#list_generic_connector_operations) | **GET** /connectors/generic/{id}/operations | List operation IDs for a connector
|
||||
[**set_generic_connector_operations**](GenericConnectorsApi.md#set_generic_connector_operations) | **PUT** /connectors/generic/{id}/operations | Assign operations to a connector
|
||||
[**update_generic_connector**](GenericConnectorsApi.md#update_generic_connector) | **PUT** /connectors/generic/{id} | Update connector
|
||||
|
||||
@ -171,7 +171,7 @@ void (empty response body)
|
||||
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**204** | No Content | - |
|
||||
**204** | No Content. | - |
|
||||
**400** | Bad Request | - |
|
||||
**401** | Unauthorized | - |
|
||||
**403** | Insufficient permissions to query endpoint | - |
|
||||
@ -351,7 +351,7 @@ Name | Type | Description | Notes
|
||||
# **list_generic_connector_operations**
|
||||
> Assignments list_generic_connector_operations(id, aid=aid)
|
||||
|
||||
List operation IDs assigned to a connector
|
||||
List operation IDs for a connector
|
||||
|
||||
Returns a list of operation IDs assigned to a connector.
|
||||
|
||||
@ -389,7 +389,7 @@ 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)
|
||||
|
||||
try:
|
||||
# List operation IDs assigned to a connector
|
||||
# List operation IDs for a connector
|
||||
api_response = api_instance.list_generic_connector_operations(id, aid=aid)
|
||||
print("The response of GenericConnectorsApi->list_generic_connector_operations:\n")
|
||||
pprint(api_response)
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **str** | |
|
||||
**value** | **str** | The value of the header. Note that this value is obfuscated in the response, even when overwritten. |
|
||||
**value** | **str** | |
|
||||
|
||||
## Example
|
||||
|
||||
|
||||
@ -9,6 +9,7 @@ Name | Type | Description | Notes
|
||||
**oauth_client_id** | **str** | |
|
||||
**oauth_token_url** | **str** | |
|
||||
**oauth_client_secret** | **str** | |
|
||||
**scope** | **str** | | [optional]
|
||||
**type** | [**AuthenticationType**](AuthenticationType.md) | |
|
||||
|
||||
## Example
|
||||
|
||||
@ -80,27 +80,27 @@ Name | Type | Description | Notes
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/problem+json, application/hal+json, application/json
|
||||
- **Accept**: application/hal+json, application/json, application/problem+json
|
||||
|
||||
### HTTP response details
|
||||
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**404** | Not found | - |
|
||||
**200** | A list of assigned connectors. | - |
|
||||
**400** | Bad Request | - |
|
||||
**401** | Unauthorized | - |
|
||||
**403** | Insufficient permissions to query endpoint | - |
|
||||
**404** | Not found | - |
|
||||
**500** | Internal server error | - |
|
||||
|
||||
[[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)
|
||||
|
||||
# **set_operation_connectors**
|
||||
> Assignments set_operation_connectors(type, id, request_body, aid=aid)
|
||||
> Assignments set_operation_connectors(type, id, request_body, confirm_disabled_objects=confirm_disabled_objects, aid=aid)
|
||||
|
||||
Assign connectors to an operation
|
||||
|
||||
Assigns one or more connectors to an operation. This replaces any existing assignments.
|
||||
Assigns one or more connectors to an operation. This replaces any existing assignments. Note: This operation may disable affected objects (such as tests) if connectors are changed.
|
||||
|
||||
### Example
|
||||
|
||||
@ -135,11 +135,12 @@ with thousandeyes_sdk.core.ApiClient(configuration) as api_client:
|
||||
type = 'webhooks' # str | The operation type.
|
||||
id = 'cb1b8033-ea2d-4e9b-a920-fe87850693cf' # str | The operation ID.
|
||||
request_body = ["ca39314d-eb4f-496f-9435-b5d20b1bfbff"] # List[str] | List of connector IDs to assign to the operation.
|
||||
confirm_disabled_objects = False # bool | Confirmation to disable affected objects (for example, tests) for credential-vault operations. (optional) (default to False)
|
||||
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 connectors to an operation
|
||||
api_response = api_instance.set_operation_connectors(type, id, request_body, aid=aid)
|
||||
api_response = api_instance.set_operation_connectors(type, id, request_body, confirm_disabled_objects=confirm_disabled_objects, aid=aid)
|
||||
print("The response of OperationConnectorsApi->set_operation_connectors:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
@ -156,6 +157,7 @@ Name | Type | Description | Notes
|
||||
**type** | **str**| The operation type. |
|
||||
**id** | **str**| The operation ID. |
|
||||
**request_body** | [**List[str]**](str.md)| List of connector IDs to assign to the operation. |
|
||||
**confirm_disabled_objects** | **bool**| Confirmation to disable affected objects (for example, tests) for credential-vault operations. | [optional] [default to False]
|
||||
**aid** | **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]
|
||||
|
||||
### Return type
|
||||
@ -169,17 +171,17 @@ Name | Type | Description | Notes
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/problem+json, application/hal+json, application/json
|
||||
- **Accept**: application/hal+json, application/json, application/problem+json
|
||||
|
||||
### HTTP response details
|
||||
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**404** | Not found | - |
|
||||
**200** | Operation Connectors updated successfully. | - |
|
||||
**400** | Bad Request | - |
|
||||
**401** | Unauthorized | - |
|
||||
**403** | Insufficient permissions to query endpoint | - |
|
||||
**404** | Not found | - |
|
||||
**500** | Internal server error | - |
|
||||
|
||||
[[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)
|
||||
|
||||
@ -169,7 +169,7 @@ void (empty response body)
|
||||
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**204** | No Content | - |
|
||||
**204** | No Content. | - |
|
||||
**400** | Bad Request | - |
|
||||
**401** | Unauthorized | - |
|
||||
**403** | Insufficient permissions to query endpoint | - |
|
||||
|
||||
@ -14,6 +14,8 @@
|
||||
|
||||
|
||||
# import apis into sdk package
|
||||
from thousandeyes_sdk.connectors.api.credential_vault_operations_api import CredentialVaultOperationsApi
|
||||
from thousandeyes_sdk.connectors.api.cyber_ark_conjur_connectors_api import CyberArkConjurConnectorsApi
|
||||
from thousandeyes_sdk.connectors.api.generic_connectors_api import GenericConnectorsApi
|
||||
from thousandeyes_sdk.connectors.api.operation_connectors_api import OperationConnectorsApi
|
||||
from thousandeyes_sdk.connectors.api.webhook_operations_api import WebhookOperationsApi
|
||||
@ -24,7 +26,13 @@ from thousandeyes_sdk.connectors.models.assignments import Assignments
|
||||
from thousandeyes_sdk.connectors.models.authentication_type import AuthenticationType
|
||||
from thousandeyes_sdk.connectors.models.basic_authentication import BasicAuthentication
|
||||
from thousandeyes_sdk.connectors.models.bearer_token_authentication import BearerTokenAuthentication
|
||||
from thousandeyes_sdk.connectors.models.conjur_connector import ConjurConnector
|
||||
from thousandeyes_sdk.connectors.models.conjur_connectors import ConjurConnectors
|
||||
from thousandeyes_sdk.connectors.models.conjur_host_authentication import ConjurHostAuthentication
|
||||
from thousandeyes_sdk.connectors.models.connector_type import ConnectorType
|
||||
from thousandeyes_sdk.connectors.models.credential_vault_operation import CredentialVaultOperation
|
||||
from thousandeyes_sdk.connectors.models.credential_vault_operations import CredentialVaultOperations
|
||||
from thousandeyes_sdk.connectors.models.credential_vault_secret import CredentialVaultSecret
|
||||
from thousandeyes_sdk.connectors.models.error import Error
|
||||
from thousandeyes_sdk.connectors.models.generic_connector import GenericConnector
|
||||
from thousandeyes_sdk.connectors.models.generic_connector_auth import GenericConnectorAuth
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
# flake8: noqa
|
||||
|
||||
# import apis into api package
|
||||
from thousandeyes_sdk.connectors.api.credential_vault_operations_api import CredentialVaultOperationsApi
|
||||
from thousandeyes_sdk.connectors.api.cyber_ark_conjur_connectors_api import CyberArkConjurConnectorsApi
|
||||
from thousandeyes_sdk.connectors.api.generic_connectors_api import GenericConnectorsApi
|
||||
from thousandeyes_sdk.connectors.api.operation_connectors_api import OperationConnectorsApi
|
||||
from thousandeyes_sdk.connectors.api.webhook_operations_api import WebhookOperationsApi
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1236,7 +1236,7 @@ class GenericConnectorsApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> Assignments:
|
||||
"""List operation IDs assigned to a connector
|
||||
"""List operation IDs for a connector
|
||||
|
||||
Returns a list of operation IDs assigned to a connector.
|
||||
|
||||
@ -1313,7 +1313,7 @@ class GenericConnectorsApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[Assignments]:
|
||||
"""List operation IDs assigned to a connector
|
||||
"""List operation IDs for a connector
|
||||
|
||||
Returns a list of operation IDs assigned to a connector.
|
||||
|
||||
@ -1390,7 +1390,7 @@ class GenericConnectorsApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""List operation IDs assigned to a connector
|
||||
"""List operation IDs for a connector
|
||||
|
||||
Returns a list of operation IDs assigned to a connector.
|
||||
|
||||
|
||||
@ -18,7 +18,7 @@ from importlib.metadata import version
|
||||
|
||||
import thousandeyes_sdk.connectors.models
|
||||
|
||||
from pydantic import Field, StrictStr
|
||||
from pydantic import Field, StrictBool, StrictStr
|
||||
from typing import List, Optional
|
||||
from typing_extensions import Annotated
|
||||
from thousandeyes_sdk.connectors.models.assignments import Assignments
|
||||
@ -105,11 +105,11 @@ class OperationConnectorsApi:
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'404': "Error",
|
||||
'200': "Assignments",
|
||||
'400': "ValidationError",
|
||||
'401': "UnauthorizedError",
|
||||
'403': "Error",
|
||||
'404': "Error",
|
||||
'500': "Error",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
@ -186,11 +186,11 @@ class OperationConnectorsApi:
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'404': "Error",
|
||||
'200': "Assignments",
|
||||
'400': "ValidationError",
|
||||
'401': "UnauthorizedError",
|
||||
'403': "Error",
|
||||
'404': "Error",
|
||||
'500': "Error",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
@ -267,11 +267,11 @@ class OperationConnectorsApi:
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'404': "Error",
|
||||
'200': "Assignments",
|
||||
'400': "ValidationError",
|
||||
'401': "UnauthorizedError",
|
||||
'403': "Error",
|
||||
'404': "Error",
|
||||
'500': "Error",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
@ -322,9 +322,9 @@ class OperationConnectorsApi:
|
||||
# set the HTTP header `Accept`
|
||||
_header_params['Accept'] = self.api_client.select_header_accept(
|
||||
[
|
||||
'application/problem+json',
|
||||
'application/hal+json',
|
||||
'application/json'
|
||||
'application/json',
|
||||
'application/problem+json'
|
||||
]
|
||||
)
|
||||
|
||||
@ -358,6 +358,7 @@ class OperationConnectorsApi:
|
||||
type: Annotated[StrictStr, Field(description="The operation type.")],
|
||||
id: Annotated[StrictStr, Field(description="The operation ID.")],
|
||||
request_body: Annotated[List[StrictStr], Field(min_length=0, max_length=1, description="List of connector IDs to assign to the operation.")],
|
||||
confirm_disabled_objects: Annotated[Optional[StrictBool], Field(description="Confirmation to disable affected objects (for example, tests) for credential-vault operations.")] = None,
|
||||
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
@ -374,7 +375,7 @@ class OperationConnectorsApi:
|
||||
) -> Assignments:
|
||||
"""Assign connectors to an operation
|
||||
|
||||
Assigns one or more connectors to an operation. This replaces any existing assignments.
|
||||
Assigns one or more connectors to an operation. This replaces any existing assignments. Note: This operation may disable affected objects (such as tests) if connectors are changed.
|
||||
|
||||
:param type: The operation type. (required)
|
||||
:type type: str
|
||||
@ -382,6 +383,8 @@ class OperationConnectorsApi:
|
||||
:type id: str
|
||||
:param request_body: List of connector IDs to assign to the operation. (required)
|
||||
:type request_body: List[str]
|
||||
:param confirm_disabled_objects: Confirmation to disable affected objects (for example, tests) for credential-vault operations.
|
||||
:type confirm_disabled_objects: bool
|
||||
:param aid: 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.
|
||||
:type aid: str
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
@ -410,6 +413,7 @@ class OperationConnectorsApi:
|
||||
type=type,
|
||||
id=id,
|
||||
request_body=request_body,
|
||||
confirm_disabled_objects=confirm_disabled_objects,
|
||||
aid=aid,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
@ -418,11 +422,11 @@ class OperationConnectorsApi:
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'404': "Error",
|
||||
'200': "Assignments",
|
||||
'400': "ValidationError",
|
||||
'401': "UnauthorizedError",
|
||||
'403': "Error",
|
||||
'404': "Error",
|
||||
'500': "Error",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
@ -443,6 +447,7 @@ class OperationConnectorsApi:
|
||||
type: Annotated[StrictStr, Field(description="The operation type.")],
|
||||
id: Annotated[StrictStr, Field(description="The operation ID.")],
|
||||
request_body: Annotated[List[StrictStr], Field(min_length=0, max_length=1, description="List of connector IDs to assign to the operation.")],
|
||||
confirm_disabled_objects: Annotated[Optional[StrictBool], Field(description="Confirmation to disable affected objects (for example, tests) for credential-vault operations.")] = None,
|
||||
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
@ -459,7 +464,7 @@ class OperationConnectorsApi:
|
||||
) -> ApiResponse[Assignments]:
|
||||
"""Assign connectors to an operation
|
||||
|
||||
Assigns one or more connectors to an operation. This replaces any existing assignments.
|
||||
Assigns one or more connectors to an operation. This replaces any existing assignments. Note: This operation may disable affected objects (such as tests) if connectors are changed.
|
||||
|
||||
:param type: The operation type. (required)
|
||||
:type type: str
|
||||
@ -467,6 +472,8 @@ class OperationConnectorsApi:
|
||||
:type id: str
|
||||
:param request_body: List of connector IDs to assign to the operation. (required)
|
||||
:type request_body: List[str]
|
||||
:param confirm_disabled_objects: Confirmation to disable affected objects (for example, tests) for credential-vault operations.
|
||||
:type confirm_disabled_objects: bool
|
||||
:param aid: 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.
|
||||
:type aid: str
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
@ -495,6 +502,7 @@ class OperationConnectorsApi:
|
||||
type=type,
|
||||
id=id,
|
||||
request_body=request_body,
|
||||
confirm_disabled_objects=confirm_disabled_objects,
|
||||
aid=aid,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
@ -503,11 +511,11 @@ class OperationConnectorsApi:
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'404': "Error",
|
||||
'200': "Assignments",
|
||||
'400': "ValidationError",
|
||||
'401': "UnauthorizedError",
|
||||
'403': "Error",
|
||||
'404': "Error",
|
||||
'500': "Error",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
@ -528,6 +536,7 @@ class OperationConnectorsApi:
|
||||
type: Annotated[StrictStr, Field(description="The operation type.")],
|
||||
id: Annotated[StrictStr, Field(description="The operation ID.")],
|
||||
request_body: Annotated[List[StrictStr], Field(min_length=0, max_length=1, description="List of connector IDs to assign to the operation.")],
|
||||
confirm_disabled_objects: Annotated[Optional[StrictBool], Field(description="Confirmation to disable affected objects (for example, tests) for credential-vault operations.")] = None,
|
||||
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
@ -544,7 +553,7 @@ class OperationConnectorsApi:
|
||||
) -> RESTResponseType:
|
||||
"""Assign connectors to an operation
|
||||
|
||||
Assigns one or more connectors to an operation. This replaces any existing assignments.
|
||||
Assigns one or more connectors to an operation. This replaces any existing assignments. Note: This operation may disable affected objects (such as tests) if connectors are changed.
|
||||
|
||||
:param type: The operation type. (required)
|
||||
:type type: str
|
||||
@ -552,6 +561,8 @@ class OperationConnectorsApi:
|
||||
:type id: str
|
||||
:param request_body: List of connector IDs to assign to the operation. (required)
|
||||
:type request_body: List[str]
|
||||
:param confirm_disabled_objects: Confirmation to disable affected objects (for example, tests) for credential-vault operations.
|
||||
:type confirm_disabled_objects: bool
|
||||
:param aid: 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.
|
||||
:type aid: str
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
@ -580,6 +591,7 @@ class OperationConnectorsApi:
|
||||
type=type,
|
||||
id=id,
|
||||
request_body=request_body,
|
||||
confirm_disabled_objects=confirm_disabled_objects,
|
||||
aid=aid,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
@ -588,11 +600,11 @@ class OperationConnectorsApi:
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'404': "Error",
|
||||
'200': "Assignments",
|
||||
'400': "ValidationError",
|
||||
'401': "UnauthorizedError",
|
||||
'403': "Error",
|
||||
'404': "Error",
|
||||
'500': "Error",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
@ -607,6 +619,7 @@ class OperationConnectorsApi:
|
||||
type,
|
||||
id,
|
||||
request_body,
|
||||
confirm_disabled_objects,
|
||||
aid,
|
||||
_request_auth,
|
||||
_content_type,
|
||||
@ -633,6 +646,10 @@ class OperationConnectorsApi:
|
||||
if id is not None:
|
||||
_path_params['id'] = id
|
||||
# process the query parameters
|
||||
if confirm_disabled_objects is not None:
|
||||
|
||||
_query_params.append(('confirmDisabledObjects', confirm_disabled_objects))
|
||||
|
||||
if aid is not None:
|
||||
|
||||
_query_params.append(('aid', aid))
|
||||
@ -647,9 +664,9 @@ class OperationConnectorsApi:
|
||||
# set the HTTP header `Accept`
|
||||
_header_params['Accept'] = self.api_client.select_header_accept(
|
||||
[
|
||||
'application/problem+json',
|
||||
'application/hal+json',
|
||||
'application/json'
|
||||
'application/json',
|
||||
'application/problem+json'
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
@ -17,7 +17,13 @@ from thousandeyes_sdk.connectors.models.assignments import Assignments
|
||||
from thousandeyes_sdk.connectors.models.authentication_type import AuthenticationType
|
||||
from thousandeyes_sdk.connectors.models.basic_authentication import BasicAuthentication
|
||||
from thousandeyes_sdk.connectors.models.bearer_token_authentication import BearerTokenAuthentication
|
||||
from thousandeyes_sdk.connectors.models.conjur_connector import ConjurConnector
|
||||
from thousandeyes_sdk.connectors.models.conjur_connectors import ConjurConnectors
|
||||
from thousandeyes_sdk.connectors.models.conjur_host_authentication import ConjurHostAuthentication
|
||||
from thousandeyes_sdk.connectors.models.connector_type import ConnectorType
|
||||
from thousandeyes_sdk.connectors.models.credential_vault_operation import CredentialVaultOperation
|
||||
from thousandeyes_sdk.connectors.models.credential_vault_operations import CredentialVaultOperations
|
||||
from thousandeyes_sdk.connectors.models.credential_vault_secret import CredentialVaultSecret
|
||||
from thousandeyes_sdk.connectors.models.error import Error
|
||||
from thousandeyes_sdk.connectors.models.generic_connector import GenericConnector
|
||||
from thousandeyes_sdk.connectors.models.generic_connector_auth import GenericConnectorAuth
|
||||
|
||||
@ -0,0 +1,114 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Integrations API
|
||||
|
||||
**Note:** The Webhook Operations APIs are not available for ThousandEyes for Government instance. Manage connectors and operations.
|
||||
|
||||
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, StrictInt, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from thousandeyes_sdk.connectors.models.conjur_host_authentication import ConjurHostAuthentication
|
||||
from thousandeyes_sdk.connectors.models.connector_type import ConnectorType
|
||||
from thousandeyes_sdk.connectors.models.self_links import SelfLinks
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class ConjurConnector(BaseModel):
|
||||
"""
|
||||
ConjurConnector
|
||||
""" # noqa: E501
|
||||
id: Optional[StrictStr] = None
|
||||
type: ConnectorType
|
||||
name: StrictStr
|
||||
target: StrictStr
|
||||
last_modified_date: Optional[StrictInt] = Field(default=None, description="The date when the connector was last modified (Unix timestamp in milliseconds).", alias="lastModifiedDate")
|
||||
account: StrictStr
|
||||
authentication: ConjurHostAuthentication
|
||||
links: Optional[SelfLinks] = Field(default=None, alias="_links")
|
||||
__properties: ClassVar[List[str]] = ["id", "type", "name", "target", "lastModifiedDate", "account", "authentication", "_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 ConjurConnector 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([
|
||||
"id",
|
||||
"last_modified_date",
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# override the default output from pydantic by calling `to_dict()` of authentication
|
||||
if self.authentication:
|
||||
_dict['authentication'] = self.authentication.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of links
|
||||
if self.links:
|
||||
_dict['_links'] = self.links.to_dict()
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of ConjurConnector 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"),
|
||||
"type": obj.get("type"),
|
||||
"name": obj.get("name"),
|
||||
"target": obj.get("target"),
|
||||
"lastModifiedDate": obj.get("lastModifiedDate"),
|
||||
"account": obj.get("account"),
|
||||
"authentication": ConjurHostAuthentication.from_dict(obj["authentication"]) if obj.get("authentication") is not None else None,
|
||||
"_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@ -0,0 +1,101 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Integrations API
|
||||
|
||||
**Note:** The Webhook Operations APIs are not available for ThousandEyes for Government instance. Manage connectors and operations.
|
||||
|
||||
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.connectors.models.conjur_connector import ConjurConnector
|
||||
from thousandeyes_sdk.connectors.models.self_links import SelfLinks
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class ConjurConnectors(BaseModel):
|
||||
"""
|
||||
ConjurConnectors
|
||||
""" # noqa: E501
|
||||
items: Optional[List[ConjurConnector]] = None
|
||||
links: Optional[SelfLinks] = Field(default=None, alias="_links")
|
||||
__properties: ClassVar[List[str]] = ["items", "_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 ConjurConnectors 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 each item in items (list)
|
||||
_items = []
|
||||
if self.items:
|
||||
for _item in self.items:
|
||||
if _item:
|
||||
_items.append(_item.to_dict())
|
||||
_dict['items'] = _items
|
||||
# override the default output from pydantic by calling `to_dict()` of links
|
||||
if self.links:
|
||||
_dict['_links'] = self.links.to_dict()
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of ConjurConnectors from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"items": [ConjurConnector.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None,
|
||||
"_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@ -0,0 +1,92 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Integrations API
|
||||
|
||||
**Note:** The Webhook Operations APIs are not available for ThousandEyes for Government instance. Manage connectors and operations.
|
||||
|
||||
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
|
||||
from thousandeyes_sdk.connectors.models.authentication_type import AuthenticationType
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class ConjurHostAuthentication(BaseModel):
|
||||
"""
|
||||
ConjurHostAuthentication
|
||||
""" # noqa: E501
|
||||
host_id: StrictStr = Field(alias="hostId")
|
||||
api_key: StrictStr = Field(alias="apiKey")
|
||||
type: AuthenticationType
|
||||
__properties: ClassVar[List[str]] = ["hostId", "apiKey", "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 ConjurHostAuthentication 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 ConjurHostAuthentication from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"hostId": obj.get("hostId"),
|
||||
"apiKey": obj.get("apiKey"),
|
||||
"type": obj.get("type")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@ -0,0 +1,113 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Integrations API
|
||||
|
||||
**Note:** The Webhook Operations APIs are not available for ThousandEyes for Government instance. Manage connectors and operations.
|
||||
|
||||
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 thousandeyes_sdk.connectors.models.credential_vault_secret import CredentialVaultSecret
|
||||
from thousandeyes_sdk.connectors.models.operation_status import OperationStatus
|
||||
from thousandeyes_sdk.connectors.models.operation_type import OperationType
|
||||
from thousandeyes_sdk.connectors.models.self_links import SelfLinks
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class CredentialVaultOperation(BaseModel):
|
||||
"""
|
||||
CredentialVaultOperation
|
||||
""" # noqa: E501
|
||||
id: Optional[StrictStr] = None
|
||||
name: StrictStr
|
||||
secrets: List[CredentialVaultSecret]
|
||||
type: Optional[OperationType] = None
|
||||
status: Optional[OperationStatus] = None
|
||||
links: Optional[SelfLinks] = Field(default=None, alias="_links")
|
||||
__properties: ClassVar[List[str]] = ["id", "name", "secrets", "type", "status", "_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 CredentialVaultOperation 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.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
"id",
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# override the default output from pydantic by calling `to_dict()` of each item in secrets (list)
|
||||
_items = []
|
||||
if self.secrets:
|
||||
for _item in self.secrets:
|
||||
if _item:
|
||||
_items.append(_item.to_dict())
|
||||
_dict['secrets'] = _items
|
||||
# override the default output from pydantic by calling `to_dict()` of links
|
||||
if self.links:
|
||||
_dict['_links'] = self.links.to_dict()
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of CredentialVaultOperation 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"),
|
||||
"secrets": [CredentialVaultSecret.from_dict(_item) for _item in obj["secrets"]] if obj.get("secrets") is not None else None,
|
||||
"type": obj.get("type"),
|
||||
"status": obj.get("status"),
|
||||
"_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@ -0,0 +1,101 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Integrations API
|
||||
|
||||
**Note:** The Webhook Operations APIs are not available for ThousandEyes for Government instance. Manage connectors and operations.
|
||||
|
||||
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.connectors.models.credential_vault_operation import CredentialVaultOperation
|
||||
from thousandeyes_sdk.connectors.models.self_links import SelfLinks
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class CredentialVaultOperations(BaseModel):
|
||||
"""
|
||||
CredentialVaultOperations
|
||||
""" # noqa: E501
|
||||
items: Optional[List[CredentialVaultOperation]] = None
|
||||
links: Optional[SelfLinks] = Field(default=None, alias="_links")
|
||||
__properties: ClassVar[List[str]] = ["items", "_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 CredentialVaultOperations 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 each item in items (list)
|
||||
_items = []
|
||||
if self.items:
|
||||
for _item in self.items:
|
||||
if _item:
|
||||
_items.append(_item.to_dict())
|
||||
_dict['items'] = _items
|
||||
# override the default output from pydantic by calling `to_dict()` of links
|
||||
if self.links:
|
||||
_dict['_links'] = self.links.to_dict()
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of CredentialVaultOperations from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"items": [CredentialVaultOperation.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None,
|
||||
"_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@ -0,0 +1,91 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Integrations API
|
||||
|
||||
**Note:** The Webhook Operations APIs are not available for ThousandEyes for Government instance. Manage connectors and operations.
|
||||
|
||||
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 CredentialVaultSecret(BaseModel):
|
||||
"""
|
||||
CredentialVaultSecret
|
||||
""" # noqa: E501
|
||||
id: Optional[StrictStr] = None
|
||||
name: StrictStr
|
||||
secret_key: StrictStr = Field(alias="secretKey")
|
||||
__properties: ClassVar[List[str]] = ["id", "name", "secretKey"]
|
||||
|
||||
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 CredentialVaultSecret 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 CredentialVaultSecret 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"),
|
||||
"secretKey": obj.get("secretKey")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@ -21,6 +21,7 @@ from typing import Any, ClassVar, Dict, List, Optional
|
||||
from thousandeyes_sdk.connectors.models.connector_type import ConnectorType
|
||||
from thousandeyes_sdk.connectors.models.generic_connector_auth import GenericConnectorAuth
|
||||
from thousandeyes_sdk.connectors.models.header import Header
|
||||
from thousandeyes_sdk.connectors.models.self_links import SelfLinks
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
@ -32,10 +33,11 @@ class GenericConnector(BaseModel):
|
||||
type: ConnectorType
|
||||
name: StrictStr
|
||||
target: StrictStr
|
||||
authentication: Optional[GenericConnectorAuth] = None
|
||||
last_modified_date: Optional[StrictInt] = Field(default=None, description="The date when the connector was last modified (Unix timestamp in milliseconds).", alias="lastModifiedDate")
|
||||
authentication: Optional[GenericConnectorAuth] = None
|
||||
headers: Optional[List[Header]] = None
|
||||
__properties: ClassVar[List[str]] = ["id", "type", "name", "target", "authentication", "lastModifiedDate", "headers"]
|
||||
links: Optional[SelfLinks] = Field(default=None, alias="_links")
|
||||
__properties: ClassVar[List[str]] = ["id", "type", "name", "target", "lastModifiedDate", "authentication", "headers", "_links"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
@ -91,6 +93,9 @@ class GenericConnector(BaseModel):
|
||||
if _item:
|
||||
_items.append(_item.to_dict())
|
||||
_dict['headers'] = _items
|
||||
# override the default output from pydantic by calling `to_dict()` of links
|
||||
if self.links:
|
||||
_dict['_links'] = self.links.to_dict()
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
@ -107,9 +112,10 @@ class GenericConnector(BaseModel):
|
||||
"type": obj.get("type"),
|
||||
"name": obj.get("name"),
|
||||
"target": obj.get("target"),
|
||||
"authentication": GenericConnectorAuth.from_dict(obj["authentication"]) if obj.get("authentication") is not None else None,
|
||||
"lastModifiedDate": obj.get("lastModifiedDate"),
|
||||
"headers": [Header.from_dict(_item) for _item in obj["headers"]] if obj.get("headers") is not None else None
|
||||
"authentication": GenericConnectorAuth.from_dict(obj["authentication"]) if obj.get("authentication") is not None else None,
|
||||
"headers": [Header.from_dict(_item) for _item in obj["headers"]] if obj.get("headers") is not None else None,
|
||||
"_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@ import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
||||
from pydantic import BaseModel, ConfigDict, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
@ -26,7 +26,7 @@ class Header(BaseModel):
|
||||
Header
|
||||
""" # noqa: E501
|
||||
name: StrictStr
|
||||
value: StrictStr = Field(description="The value of the header. Note that this value is obfuscated in the response, even when overwritten.")
|
||||
value: StrictStr
|
||||
__properties: ClassVar[List[str]] = ["name", "value"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
|
||||
@ -30,8 +30,9 @@ class OauthClientCredentialsAuthentication(BaseModel):
|
||||
oauth_client_id: StrictStr = Field(alias="oauthClientId")
|
||||
oauth_token_url: StrictStr = Field(alias="oauthTokenUrl")
|
||||
oauth_client_secret: StrictStr = Field(alias="oauthClientSecret")
|
||||
scope: Optional[StrictStr] = None
|
||||
type: AuthenticationType
|
||||
__properties: ClassVar[List[str]] = ["token", "oauthClientId", "oauthTokenUrl", "oauthClientSecret", "type"]
|
||||
__properties: ClassVar[List[str]] = ["token", "oauthClientId", "oauthTokenUrl", "oauthClientSecret", "scope", "type"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
@ -89,6 +90,7 @@ class OauthClientCredentialsAuthentication(BaseModel):
|
||||
"oauthClientId": obj.get("oauthClientId"),
|
||||
"oauthTokenUrl": obj.get("oauthTokenUrl"),
|
||||
"oauthClientSecret": obj.get("oauthClientSecret"),
|
||||
"scope": obj.get("scope"),
|
||||
"type": obj.get("type")
|
||||
})
|
||||
return _obj
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user