diff --git a/thousandeyes-sdk-administrative/README.md b/thousandeyes-sdk-administrative/README.md index 302dc2b31..028ce9697 100644 --- a/thousandeyes-sdk-administrative/README.md +++ b/thousandeyes-sdk-administrative/README.md @@ -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.103 +- API version: 7.0.104 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-administrative/test/test_account_groups_api.py b/thousandeyes-sdk-administrative/test/test_account_groups_api.py index b5412d9a2..78e3c331f 100644 --- a/thousandeyes-sdk-administrative/test/test_account_groups_api.py +++ b/thousandeyes-sdk-administrative/test/test_account_groups_api.py @@ -41,6 +41,7 @@ def test_create_account_group_models_validation(self) -> None: request_from_json = thousandeyes_sdk.administrative.models.AccountGroupRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "isCurrentAccountGroup" : true, @@ -101,14 +102,17 @@ def test_create_account_group_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.administrative.models.CreatedAccountGroup.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_delete_account_group_models_validation(self) -> None: """Test case for delete_account_group request and response models""" + def test_get_account_group_models_validation(self) -> None: """Test case for get_account_group request and response models""" + response_body_json = """ { "isCurrentAccountGroup" : true, @@ -477,10 +481,12 @@ def test_get_account_group_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.administrative.models.AccountGroupDetail.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_account_groups_models_validation(self) -> None: """Test case for get_account_groups request and response models""" + response_body_json = """ { "_links" : { @@ -515,6 +521,7 @@ def test_get_account_groups_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.administrative.models.AccountGroups.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_update_account_group_models_validation(self) -> None: """Test case for update_account_group request and response models""" @@ -529,6 +536,7 @@ def test_update_account_group_models_validation(self) -> None: request_from_json = thousandeyes_sdk.administrative.models.AccountGroupRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "isCurrentAccountGroup" : true, @@ -897,6 +905,7 @@ def test_update_account_group_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.administrative.models.AccountGroupDetail.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-administrative/test/test_permissions_api.py b/thousandeyes-sdk-administrative/test/test_permissions_api.py index 4bf2f2902..19613e183 100644 --- a/thousandeyes-sdk-administrative/test/test_permissions_api.py +++ b/thousandeyes-sdk-administrative/test/test_permissions_api.py @@ -31,6 +31,7 @@ def tearDown(self) -> None: def test_get_permissions_models_validation(self) -> None: """Test case for get_permissions request and response models""" + response_body_json = """ { "_links" : { @@ -61,6 +62,7 @@ def test_get_permissions_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.administrative.models.Permissions.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-administrative/test/test_roles_api.py b/thousandeyes-sdk-administrative/test/test_roles_api.py index 119cabf60..02819fafe 100644 --- a/thousandeyes-sdk-administrative/test/test_roles_api.py +++ b/thousandeyes-sdk-administrative/test/test_roles_api.py @@ -41,6 +41,7 @@ def test_create_role_models_validation(self) -> None: request_from_json = thousandeyes_sdk.administrative.models.RoleRequestBody.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "_links" : { @@ -74,14 +75,17 @@ def test_create_role_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.administrative.models.RoleDetail.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_delete_role_models_validation(self) -> None: """Test case for delete_role request and response models""" + def test_get_role_models_validation(self) -> None: """Test case for get_role request and response models""" + response_body_json = """ { "_links" : { @@ -115,10 +119,12 @@ def test_get_role_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.administrative.models.RoleDetail.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_roles_models_validation(self) -> None: """Test case for get_roles request and response models""" + response_body_json = """ { "_links" : { @@ -149,6 +155,7 @@ def test_get_roles_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.administrative.models.Roles.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_update_role_models_validation(self) -> None: """Test case for update_role request and response models""" @@ -163,6 +170,7 @@ def test_update_role_models_validation(self) -> None: request_from_json = thousandeyes_sdk.administrative.models.RoleRequestBody.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "_links" : { @@ -196,6 +204,7 @@ def test_update_role_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.administrative.models.RoleDetail.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-administrative/test/test_user_events_api.py b/thousandeyes-sdk-administrative/test/test_user_events_api.py index e1d02122f..35d72bddc 100644 --- a/thousandeyes-sdk-administrative/test/test_user_events_api.py +++ b/thousandeyes-sdk-administrative/test/test_user_events_api.py @@ -31,6 +31,7 @@ def tearDown(self) -> None: def test_get_user_events_models_validation(self) -> None: """Test case for get_user_events request and response models""" + response_body_json = """ { "endDate" : "2022-07-18T22:00:54Z", @@ -96,6 +97,7 @@ def test_get_user_events_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.administrative.models.AuditUserEvents.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-administrative/test/test_users_api.py b/thousandeyes-sdk-administrative/test/test_users_api.py index b61773d23..b940e108f 100644 --- a/thousandeyes-sdk-administrative/test/test_users_api.py +++ b/thousandeyes-sdk-administrative/test/test_users_api.py @@ -50,6 +50,7 @@ def test_create_user_models_validation(self) -> None: request_from_json = thousandeyes_sdk.administrative.models.UserRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "loginAccountGroup" : { @@ -121,14 +122,17 @@ def test_create_user_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.administrative.models.CreatedUser.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_delete_user_models_validation(self) -> None: """Test case for delete_user request and response models""" + def test_get_current_user_models_validation(self) -> None: """Test case for get_current_user request and response models""" + response_body_json = """ { "loginAccountGroup" : { @@ -201,10 +205,12 @@ def test_get_current_user_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.administrative.models.UserDetail.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_user_models_validation(self) -> None: """Test case for get_user request and response models""" + response_body_json = """ { "loginAccountGroup" : { @@ -277,10 +283,12 @@ def test_get_user_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.administrative.models.UserDetail.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_users_models_validation(self) -> None: """Test case for get_users request and response models""" + response_body_json = """ { "_links" : { @@ -321,6 +329,7 @@ def test_get_users_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.administrative.models.Users.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_update_user_models_validation(self) -> None: """Test case for update_user request and response models""" @@ -344,6 +353,7 @@ def test_update_user_models_validation(self) -> None: request_from_json = thousandeyes_sdk.administrative.models.UserRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "loginAccountGroup" : { @@ -416,6 +426,7 @@ def test_update_user_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.administrative.models.UserDetail.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-agents/README.md b/thousandeyes-sdk-agents/README.md index b5d939a7c..e78c73808 100644 --- a/thousandeyes-sdk-agents/README.md +++ b/thousandeyes-sdk-agents/README.md @@ -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.103 +- API version: 7.0.104 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-agents/docs/CloudAndEnterpriseAgentsApi.md b/thousandeyes-sdk-agents/docs/CloudAndEnterpriseAgentsApi.md index e29ecff10..2523689ec 100644 --- a/thousandeyes-sdk-agents/docs/CloudAndEnterpriseAgentsApi.md +++ b/thousandeyes-sdk-agents/docs/CloudAndEnterpriseAgentsApi.md @@ -226,8 +226,10 @@ with thousandeyes_sdk.core.ApiClient(configuration) as api_client: aid = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional) expand = ["cluster-member"] # List[AgentListExpand] | Optional parameter, off by default. Indicates which agent sub-resource to expand. For example, if you wish to expand the `clusterMembers` sub-resource, pass the `?expand=cluster-member` query. (optional) agent_types = ["enterprise"] # List[CloudEnterpriseAgentType] | Specifies the type of agent to request. (optional) - labels = ['[\"myCustomLabeledAgent\"]'] # List[str] | Specifies the labels of the agents to request. (optional) - tag_keys = ['tag_keys_example'] # List[str] | Specifies which tag keys to request from the agents. (optional) + labels = ["myCustomLabeledAgent"] # List[str] | Specifies the labels of the agents to request. (optional) + tag_keys = [ + 'myCustomTagKeyForAgent' + ] # List[str] | Specifies which tag keys to request from the agents. (optional) try: # List Cloud and Enterprise Agents diff --git a/thousandeyes-sdk-agents/test/test_agent_proxies_api.py b/thousandeyes-sdk-agents/test/test_agent_proxies_api.py index dca8f2d0d..de7fca290 100644 --- a/thousandeyes-sdk-agents/test/test_agent_proxies_api.py +++ b/thousandeyes-sdk-agents/test/test_agent_proxies_api.py @@ -31,6 +31,7 @@ def tearDown(self) -> None: def test_get_agents_proxies_models_validation(self) -> None: """Test case for get_agents_proxies request and response models""" + response_body_json = """ { "_links" : { @@ -75,6 +76,7 @@ def test_get_agents_proxies_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.agents.models.AgentProxies.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-agents/test/test_cloud_and_enterprise_agent_notification_rules_api.py b/thousandeyes-sdk-agents/test/test_cloud_and_enterprise_agent_notification_rules_api.py index 961f02c00..b9f65679b 100644 --- a/thousandeyes-sdk-agents/test/test_cloud_and_enterprise_agent_notification_rules_api.py +++ b/thousandeyes-sdk-agents/test/test_cloud_and_enterprise_agent_notification_rules_api.py @@ -31,6 +31,7 @@ def tearDown(self) -> None: def test_get_agents_notification_rule_models_validation(self) -> None: """Test case for get_agents_notification_rule request and response models""" + response_body_json = """ { "isDefault" : false, @@ -142,10 +143,12 @@ def test_get_agents_notification_rule_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.agents.models.NotificationRuleDetail.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_agents_notification_rules_models_validation(self) -> None: """Test case for get_agents_notification_rules request and response models""" + response_body_json = """ { "agentAlertRules" : [ { @@ -178,6 +181,7 @@ def test_get_agents_notification_rules_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.agents.models.ListNotificationRulesResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-agents/test/test_cloud_and_enterprise_agents_api.py b/thousandeyes-sdk-agents/test/test_cloud_and_enterprise_agents_api.py index 3dac2e71d..f7a07eb80 100644 --- a/thousandeyes-sdk-agents/test/test_cloud_and_enterprise_agents_api.py +++ b/thousandeyes-sdk-agents/test/test_cloud_and_enterprise_agents_api.py @@ -31,10 +31,12 @@ def tearDown(self) -> None: def test_delete_agent_models_validation(self) -> None: """Test case for delete_agent request and response models""" + def test_get_agent_models_validation(self) -> None: """Test case for get_agent request and response models""" + response_body_json = """ { "agentId" : "281474976710706", @@ -153,10 +155,12 @@ def test_get_agent_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.agents.models.AgentDetails.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_agents_models_validation(self) -> None: """Test case for get_agents request and response models""" + response_body_json = """ { "_links" : { @@ -219,6 +223,7 @@ def test_get_agents_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.agents.models.CloudEnterpriseAgents.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_update_agent_models_validation(self) -> None: """Test case for update_agent request and response models""" @@ -239,6 +244,7 @@ def test_update_agent_models_validation(self) -> None: request_from_json = thousandeyes_sdk.agents.models.AgentRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "agentId" : "281474976710706", @@ -357,6 +363,7 @@ def test_update_agent_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.agents.models.AgentDetails.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-agents/test/test_cloud_and_enterprise_agents_api_integration.py b/thousandeyes-sdk-agents/test/test_cloud_and_enterprise_agents_api_integration.py index 752db7bb3..a5c418a21 100644 --- a/thousandeyes-sdk-agents/test/test_cloud_and_enterprise_agents_api_integration.py +++ b/thousandeyes-sdk-agents/test/test_cloud_and_enterprise_agents_api_integration.py @@ -536,8 +536,10 @@ def test_get_agents_happy_path(self) -> None: aid = '1234' expand = ["cluster-member"] agent_types = ["enterprise"] - labels = ['[\"myCustomLabeledAgent\"]'] - tag_keys = ['tag_keys_example'] + labels = ["myCustomLabeledAgent"] + tag_keys = [ + 'myCustomTagKeyForAgent' + ] response_body_json = """ { "_links" : { @@ -620,8 +622,10 @@ def test_get_agents_error_401(self) -> None: aid = '1234' expand = ["cluster-member"] agent_types = ["enterprise"] - labels = ['[\"myCustomLabeledAgent\"]'] - tag_keys = ['tag_keys_example'] + labels = ["myCustomLabeledAgent"] + tag_keys = [ + 'myCustomTagKeyForAgent' + ] error_body_json = """ { "error_description" : "Invalid access token", @@ -654,8 +658,10 @@ def test_get_agents_error_403(self) -> None: aid = '1234' expand = ["cluster-member"] agent_types = ["enterprise"] - labels = ['[\"myCustomLabeledAgent\"]'] - tag_keys = ['tag_keys_example'] + labels = ["myCustomLabeledAgent"] + tag_keys = [ + 'myCustomTagKeyForAgent' + ] error_body_json = """ { "instance" : "instance", @@ -691,8 +697,10 @@ def test_get_agents_error_404(self) -> None: aid = '1234' expand = ["cluster-member"] agent_types = ["enterprise"] - labels = ['[\"myCustomLabeledAgent\"]'] - tag_keys = ['tag_keys_example'] + labels = ["myCustomLabeledAgent"] + tag_keys = [ + 'myCustomTagKeyForAgent' + ] error_body_json = """ { "instance" : "instance", @@ -728,8 +736,10 @@ def test_get_agents_error_429(self) -> None: aid = '1234' expand = ["cluster-member"] agent_types = ["enterprise"] - labels = ['[\"myCustomLabeledAgent\"]'] - tag_keys = ['tag_keys_example'] + labels = ["myCustomLabeledAgent"] + tag_keys = [ + 'myCustomTagKeyForAgent' + ] error_body_json = """ { "instance" : "instance", @@ -765,8 +775,10 @@ def test_get_agents_error_500(self) -> None: aid = '1234' expand = ["cluster-member"] agent_types = ["enterprise"] - labels = ['[\"myCustomLabeledAgent\"]'] - tag_keys = ['tag_keys_example'] + labels = ["myCustomLabeledAgent"] + tag_keys = [ + 'myCustomTagKeyForAgent' + ] error_body_json = """ { "instance" : "instance", @@ -802,8 +814,10 @@ def test_get_agents_error_502(self) -> None: aid = '1234' expand = ["cluster-member"] agent_types = ["enterprise"] - labels = ['[\"myCustomLabeledAgent\"]'] - tag_keys = ['tag_keys_example'] + labels = ["myCustomLabeledAgent"] + tag_keys = [ + 'myCustomTagKeyForAgent' + ] error_body_json = """ { "instance" : "instance", diff --git a/thousandeyes-sdk-agents/test/test_enterprise_agent_cluster_api.py b/thousandeyes-sdk-agents/test/test_enterprise_agent_cluster_api.py index d4eec980a..ac83de11d 100644 --- a/thousandeyes-sdk-agents/test/test_enterprise_agent_cluster_api.py +++ b/thousandeyes-sdk-agents/test/test_enterprise_agent_cluster_api.py @@ -40,6 +40,7 @@ def test_assign_agent_to_cluster_models_validation(self) -> None: request_from_json = thousandeyes_sdk.agents.models.AgentClusterAssignRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "agentId" : "281474976710706", @@ -158,6 +159,7 @@ def test_assign_agent_to_cluster_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.agents.models.AgentDetails.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_unassign_agent_from_cluster_models_validation(self) -> None: """Test case for unassign_agent_from_cluster request and response models""" @@ -171,6 +173,7 @@ def test_unassign_agent_from_cluster_models_validation(self) -> None: request_from_json = thousandeyes_sdk.agents.models.AgentClusterUnassignRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "_links" : { @@ -233,6 +236,7 @@ def test_unassign_agent_from_cluster_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.agents.models.CloudEnterpriseAgents.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-agents/test/test_local_problems_api.py b/thousandeyes-sdk-agents/test/test_local_problems_api.py index bec8bfeab..cd6355e19 100644 --- a/thousandeyes-sdk-agents/test/test_local_problems_api.py +++ b/thousandeyes-sdk-agents/test/test_local_problems_api.py @@ -31,6 +31,7 @@ def tearDown(self) -> None: 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", @@ -75,6 +76,7 @@ def test_get_agents_local_problems_models_validation(self) -> None: 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__': diff --git a/thousandeyes-sdk-agents/test/test_tests_assignment_on_agents_api.py b/thousandeyes-sdk-agents/test/test_tests_assignment_on_agents_api.py index bbb3b6565..e533fa145 100644 --- a/thousandeyes-sdk-agents/test/test_tests_assignment_on_agents_api.py +++ b/thousandeyes-sdk-agents/test/test_tests_assignment_on_agents_api.py @@ -40,6 +40,7 @@ def test_assign_tests_models_validation(self) -> None: request_from_json = thousandeyes_sdk.agents.models.AgentTestsAssignRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "agentId" : "281474976710706", @@ -158,6 +159,7 @@ def test_assign_tests_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.agents.models.AgentDetails.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_overwrite_tests_models_validation(self) -> None: """Test case for overwrite_tests request and response models""" @@ -171,6 +173,7 @@ def test_overwrite_tests_models_validation(self) -> None: request_from_json = thousandeyes_sdk.agents.models.AgentTestsAssignRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "agentId" : "281474976710706", @@ -289,6 +292,7 @@ def test_overwrite_tests_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.agents.models.AgentDetails.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_unassign_tests_models_validation(self) -> None: """Test case for unassign_tests request and response models""" @@ -302,6 +306,7 @@ def test_unassign_tests_models_validation(self) -> None: request_from_json = thousandeyes_sdk.agents.models.AgentTestsAssignRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "agentId" : "281474976710706", @@ -420,6 +425,7 @@ def test_unassign_tests_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.agents.models.AgentDetails.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-alerts/README.md b/thousandeyes-sdk-alerts/README.md index 5180b117a..5ad24f8e5 100644 --- a/thousandeyes-sdk-alerts/README.md +++ b/thousandeyes-sdk-alerts/README.md @@ -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.103 +- API version: 7.0.104 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-alerts/test/test_alert_rules_api.py b/thousandeyes-sdk-alerts/test/test_alert_rules_api.py index 014ba11fd..2a484c182 100644 --- a/thousandeyes-sdk-alerts/test/test_alert_rules_api.py +++ b/thousandeyes-sdk-alerts/test/test_alert_rules_api.py @@ -95,6 +95,7 @@ def test_create_alert_rule_models_validation(self) -> None: request_from_json = thousandeyes_sdk.alerts.models.RuleDetailUpdate.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "severity" : "major", @@ -170,14 +171,17 @@ def test_create_alert_rule_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.alerts.models.Rule.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_delete_alert_rule_models_validation(self) -> None: """Test case for delete_alert_rule request and response models""" + def test_get_alert_rule_models_validation(self) -> None: """Test case for get_alert_rule request and response models""" + response_body_json = """ { "severity" : "major", @@ -316,10 +320,12 @@ def test_get_alert_rule_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.alerts.models.RuleDetail.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_alerts_rules_models_validation(self) -> None: """Test case for get_alerts_rules request and response models""" + response_body_json = """ { "_links" : { @@ -382,6 +388,7 @@ def test_get_alerts_rules_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.alerts.models.Rules.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_update_alert_rule_models_validation(self) -> None: """Test case for update_alert_rule request and response models""" @@ -450,6 +457,7 @@ def test_update_alert_rule_models_validation(self) -> None: request_from_json = thousandeyes_sdk.alerts.models.RuleDetailUpdate.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "severity" : "major", @@ -525,6 +533,7 @@ def test_update_alert_rule_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.alerts.models.Rule.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-alerts/test/test_alert_suppression_windows_api.py b/thousandeyes-sdk-alerts/test/test_alert_suppression_windows_api.py index c77c35540..642ab0df6 100644 --- a/thousandeyes-sdk-alerts/test/test_alert_suppression_windows_api.py +++ b/thousandeyes-sdk-alerts/test/test_alert_suppression_windows_api.py @@ -57,6 +57,7 @@ def test_create_alert_suppression_window_models_validation(self) -> None: request_from_json = thousandeyes_sdk.alerts.models.AlertSuppressionWindowRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "duration" : 0, @@ -156,14 +157,17 @@ def test_create_alert_suppression_window_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.alerts.models.AlertSuppressionWindowDetail.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_delete_alert_suppression_window_models_validation(self) -> None: """Test case for delete_alert_suppression_window request and response models""" + def test_get_alert_suppression_window_models_validation(self) -> None: """Test case for get_alert_suppression_window request and response models""" + response_body_json = """ { "duration" : 0, @@ -263,10 +267,12 @@ def test_get_alert_suppression_window_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.alerts.models.AlertSuppressionWindowDetail.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_alert_suppression_windows_models_validation(self) -> None: """Test case for get_alert_suppression_windows request and response models""" + response_body_json = """ { "_links" : { @@ -347,6 +353,7 @@ def test_get_alert_suppression_windows_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.alerts.models.AlertSuppressionWindows.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_update_alert_suppression_window_models_validation(self) -> None: """Test case for update_alert_suppression_window request and response models""" @@ -377,6 +384,7 @@ def test_update_alert_suppression_window_models_validation(self) -> None: request_from_json = thousandeyes_sdk.alerts.models.AlertSuppressionWindowRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "duration" : 0, @@ -476,6 +484,7 @@ def test_update_alert_suppression_window_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.alerts.models.AlertSuppressionWindowDetail.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-alerts/test/test_alerts_api.py b/thousandeyes-sdk-alerts/test/test_alerts_api.py index eeb745b9c..90eae1ee2 100644 --- a/thousandeyes-sdk-alerts/test/test_alerts_api.py +++ b/thousandeyes-sdk-alerts/test/test_alerts_api.py @@ -31,6 +31,7 @@ def tearDown(self) -> None: def test_get_alert_models_validation(self) -> None: """Test case for get_alert request and response models""" + response_body_json = """ { "severity" : "major", @@ -124,10 +125,12 @@ def test_get_alert_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.alerts.models.AlertDetail.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_alerts_models_validation(self) -> None: """Test case for get_alerts request and response models""" + response_body_json = """ { "alerts" : [ { @@ -304,6 +307,7 @@ def test_get_alerts_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.alerts.models.Alerts.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-bgp-monitors/README.md b/thousandeyes-sdk-bgp-monitors/README.md index d772d82c6..8e1a4c42a 100644 --- a/thousandeyes-sdk-bgp-monitors/README.md +++ b/thousandeyes-sdk-bgp-monitors/README.md @@ -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.103 +- API version: 7.0.104 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-bgp-monitors/test/test_bgp_monitors_api.py b/thousandeyes-sdk-bgp-monitors/test/test_bgp_monitors_api.py index 39336a675..3eddffbcc 100644 --- a/thousandeyes-sdk-bgp-monitors/test/test_bgp_monitors_api.py +++ b/thousandeyes-sdk-bgp-monitors/test/test_bgp_monitors_api.py @@ -31,6 +31,7 @@ def tearDown(self) -> None: def test_get_bgp_monitors_models_validation(self) -> None: """Test case for get_bgp_monitors request and response models""" + response_body_json = """ { "_links" : { @@ -65,6 +66,7 @@ def test_get_bgp_monitors_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.bgp_monitors.models.Monitors.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-bgp-updates/.openapi-generator-ignore b/thousandeyes-sdk-bgp-updates/.openapi-generator-ignore new file mode 100644 index 000000000..7484ee590 --- /dev/null +++ b/thousandeyes-sdk-bgp-updates/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/thousandeyes-sdk-bgp-updates/.openapi-generator/FILES b/thousandeyes-sdk-bgp-updates/.openapi-generator/FILES new file mode 100644 index 000000000..34db7b6be --- /dev/null +++ b/thousandeyes-sdk-bgp-updates/.openapi-generator/FILES @@ -0,0 +1,46 @@ +.openapi-generator-ignore +MANIFEST.in +README.md +docs/BGPUpdatesApi.md +docs/BgpDataExpandOption.md +docs/BgpMonitor.md +docs/BgpRpkiStatus.md +docs/BgpUpdate.md +docs/BgpUpdateType.md +docs/BgpUpdates.md +docs/Error.md +docs/Link.md +docs/Monitor.md +docs/MonitorType.md +docs/PaginationLinks.md +docs/UnauthorizedError.md +docs/ValidationError.md +docs/ValidationErrorItem.md +pyproject.toml +setup.cfg +src/thousandeyes_sdk/bgp_updates/__init__.py +src/thousandeyes_sdk/bgp_updates/api/__init__.py +src/thousandeyes_sdk/bgp_updates/api/bgp_updates_api.py +src/thousandeyes_sdk/bgp_updates/models/__init__.py +src/thousandeyes_sdk/bgp_updates/models/bgp_data_expand_option.py +src/thousandeyes_sdk/bgp_updates/models/bgp_monitor.py +src/thousandeyes_sdk/bgp_updates/models/bgp_rpki_status.py +src/thousandeyes_sdk/bgp_updates/models/bgp_update.py +src/thousandeyes_sdk/bgp_updates/models/bgp_update_type.py +src/thousandeyes_sdk/bgp_updates/models/bgp_updates.py +src/thousandeyes_sdk/bgp_updates/models/error.py +src/thousandeyes_sdk/bgp_updates/models/link.py +src/thousandeyes_sdk/bgp_updates/models/monitor.py +src/thousandeyes_sdk/bgp_updates/models/monitor_type.py +src/thousandeyes_sdk/bgp_updates/models/pagination_links.py +src/thousandeyes_sdk/bgp_updates/models/unauthorized_error.py +src/thousandeyes_sdk/bgp_updates/models/validation_error.py +src/thousandeyes_sdk/bgp_updates/models/validation_error_item.py +src/thousandeyes_sdk/bgp_updates/py.typed +test/__init__.py +test/conftest.py +test/integration_test_utils.py +test/mock_manifest.py +test/test_bgp_updates_api.py +test/test_bgp_updates_api_integration.py +test/test_utils.py diff --git a/thousandeyes-sdk-bgp-updates/.openapi-generator/VERSION b/thousandeyes-sdk-bgp-updates/.openapi-generator/VERSION new file mode 100644 index 000000000..93c8ddab9 --- /dev/null +++ b/thousandeyes-sdk-bgp-updates/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.6.0 diff --git a/thousandeyes-sdk-bgp-updates/MANIFEST.in b/thousandeyes-sdk-bgp-updates/MANIFEST.in new file mode 100644 index 000000000..9a2248f55 --- /dev/null +++ b/thousandeyes-sdk-bgp-updates/MANIFEST.in @@ -0,0 +1 @@ +include docs/* diff --git a/thousandeyes-sdk-bgp-updates/README.md b/thousandeyes-sdk-bgp-updates/README.md new file mode 100644 index 000000000..5ea1cec43 --- /dev/null +++ b/thousandeyes-sdk-bgp-updates/README.md @@ -0,0 +1,149 @@ +# thousandeyes-sdk-bgp-updates +Retrieve BGP updates observed by BGP monitors tracking prefixes in your ThousandEyes account group. + +This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: 7.0.104 +- Generator version: 7.6.0 +- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator + +## Requirements. + +Python 3.9+ + +## Installation & Usage +### pip install + +Install directly via PyPi: + +```sh +pip install thousandeyes-sdk-bgp-updates +``` +(you may need to run `pip` with root permission: `sudo pip install thousandeyes-sdk-bgp-updates`) + +Then import the package: +```python +import thousandeyes_sdk.bgp_updates +``` + +### Setuptools + +Install via [Setuptools](http://pypi.python.org/pypi/setuptools). + +```sh +python setup.py install --user +``` +(or `sudo python setup.py install` to install the package for all users) + +Then import the package: +```python +import thousandeyes_sdk.bgp_updates +``` + +### Tests + +Execute `pytest` to run the tests. + +## Getting Started + +Please follow the installation procedure and then run the following: + +```python + +import thousandeyes_sdk.core +import thousandeyes_sdk.bgp_updates +from thousandeyes_sdk.core.exceptions 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.bgp_updates.BGPUpdatesApi(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) + max = 20 # int | Maximum number of BGP updates to return. (optional) (default to 20) + cursor = 'cursor_example' # str | (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. (optional) + expand = ["monitor"] # List[BgpDataExpandOption] | Optional expansions. Pass `expand=monitor` to replace monitor IDs with full BGP monitor objects. (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) + prefixes = ["192.0.2.0/24"] # List[str] | Prefix CIDR filters. Repeat the parameter to filter by multiple prefixes. (optional) + origin_ases = [64512] # List[int] | Origin AS filters. Repeat the parameter to filter by multiple ASNs. (optional) + as_paths = ["64512 64513"] # List[str] | AS path filters, expressed as a space-separated list of ASNs. Repeat the parameter to filter by multiple AS paths. (optional) + rpki_statuses = [ + 'Valid' + ] # List[BgpRpkiStatus] | RPKI status filters. (optional) + update_type = [ + 'announcement' + ] # List[BgpUpdateType] | BGP update type filters. (optional) + monitor_ids = ["101"] # List[str] | BGP monitor ID filters. Repeat the parameter to filter by multiple monitors. Get `monitorId` from the `/monitors` endpoint. (optional) + communities = ["64512:100"] # List[str] | BGP community filters. Repeat the parameter to filter by multiple communities. (optional) + + try: + # List BGP updates + api_response = api_instance.get_bgp_updates(aid=aid, max=max, cursor=cursor, expand=expand, start_date=start_date, end_date=end_date, prefixes=prefixes, origin_ases=origin_ases, as_paths=as_paths, rpki_statuses=rpki_statuses, update_type=update_type, monitor_ids=monitor_ids, communities=communities) + print("The response of BGPUpdatesApi->get_bgp_updates:\n") + pprint(api_response) + except ApiException as e: + print("Exception when calling BGPUpdatesApi->get_bgp_updates: %s\n" % e) + +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.thousandeyes.com/v7* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*BGPUpdatesApi* | [**get_bgp_updates**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-bgp-updates/docs/BGPUpdatesApi.md#get_bgp_updates) | **GET** /bgp/updates | List BGP updates + + +## Documentation For Models + + - [BgpDataExpandOption](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-bgp-updates/docs/BgpDataExpandOption.md) + - [BgpMonitor](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-bgp-updates/docs/BgpMonitor.md) + - [BgpRpkiStatus](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-bgp-updates/docs/BgpRpkiStatus.md) + - [BgpUpdate](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-bgp-updates/docs/BgpUpdate.md) + - [BgpUpdateType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-bgp-updates/docs/BgpUpdateType.md) + - [BgpUpdates](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-bgp-updates/docs/BgpUpdates.md) + - [Error](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-bgp-updates/docs/Error.md) + - [Link](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-bgp-updates/docs/Link.md) + - [Monitor](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-bgp-updates/docs/Monitor.md) + - [MonitorType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-bgp-updates/docs/MonitorType.md) + - [PaginationLinks](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-bgp-updates/docs/PaginationLinks.md) + - [UnauthorizedError](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-bgp-updates/docs/UnauthorizedError.md) + - [ValidationError](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-bgp-updates/docs/ValidationError.md) + - [ValidationErrorItem](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-bgp-updates/docs/ValidationErrorItem.md) + + + +## Documentation For Authorization + + +Authentication schemes defined for the API: + +### BearerAuth + +- **Type**: Bearer authentication + + +## Author + +ThousandEyes API Team + + diff --git a/thousandeyes-sdk-bgp-updates/docs/BGPUpdatesApi.md b/thousandeyes-sdk-bgp-updates/docs/BGPUpdatesApi.md new file mode 100644 index 000000000..72e65292c --- /dev/null +++ b/thousandeyes-sdk-bgp-updates/docs/BGPUpdatesApi.md @@ -0,0 +1,125 @@ +# thousandeyes_sdk.bgp_updates.BGPUpdatesApi + +All URIs are relative to *https://api.thousandeyes.com/v7* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_bgp_updates**](BGPUpdatesApi.md#get_bgp_updates) | **GET** /bgp/updates | List BGP updates + + +# **get_bgp_updates** +> BgpUpdates get_bgp_updates(aid=aid, max=max, cursor=cursor, expand=expand, start_date=start_date, end_date=end_date, prefixes=prefixes, origin_ases=origin_ases, as_paths=as_paths, rpki_statuses=rpki_statuses, update_type=update_type, monitor_ids=monitor_ids, communities=communities) + +List BGP updates + +Retrieves a paginated list of BGP updates for prefixes tracked by the account group. When the `prefixes` filter is omitted, updates are returned for all prefixes currently tracked by the account group. Use the returned pagination links to request subsequent pages. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.bgp_updates +from thousandeyes_sdk.bgp_updates.models.bgp_data_expand_option import BgpDataExpandOption +from thousandeyes_sdk.bgp_updates.models.bgp_rpki_status import BgpRpkiStatus +from thousandeyes_sdk.bgp_updates.models.bgp_update_type import BgpUpdateType +from thousandeyes_sdk.bgp_updates.models.bgp_updates import BgpUpdates +from thousandeyes_sdk.bgp_updates.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.bgp_updates.BGPUpdatesApi(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) + max = 20 # int | Maximum number of BGP updates to return. (optional) (default to 20) + cursor = 'cursor_example' # str | (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. (optional) + expand = ["monitor"] # List[BgpDataExpandOption] | Optional expansions. Pass `expand=monitor` to replace monitor IDs with full BGP monitor objects. (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) + prefixes = ["192.0.2.0/24"] # List[str] | Prefix CIDR filters. Repeat the parameter to filter by multiple prefixes. (optional) + origin_ases = [64512] # List[int] | Origin AS filters. Repeat the parameter to filter by multiple ASNs. (optional) + as_paths = ["64512 64513"] # List[str] | AS path filters, expressed as a space-separated list of ASNs. Repeat the parameter to filter by multiple AS paths. (optional) + rpki_statuses = [ + 'Valid' + ] # List[BgpRpkiStatus] | RPKI status filters. (optional) + update_type = [ + 'announcement' + ] # List[BgpUpdateType] | BGP update type filters. (optional) + monitor_ids = ["101"] # List[str] | BGP monitor ID filters. Repeat the parameter to filter by multiple monitors. Get `monitorId` from the `/monitors` endpoint. (optional) + communities = ["64512:100"] # List[str] | BGP community filters. Repeat the parameter to filter by multiple communities. (optional) + + try: + # List BGP updates + api_response = api_instance.get_bgp_updates(aid=aid, max=max, cursor=cursor, expand=expand, start_date=start_date, end_date=end_date, prefixes=prefixes, origin_ases=origin_ases, as_paths=as_paths, rpki_statuses=rpki_statuses, update_type=update_type, monitor_ids=monitor_ids, communities=communities) + print("The response of BGPUpdatesApi->get_bgp_updates:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BGPUpdatesApi->get_bgp_updates: %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] + **max** | **int**| Maximum number of BGP updates to return. | [optional] [default to 20] + **cursor** | **str**| (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. | [optional] + **expand** | [**List[BgpDataExpandOption]**](BgpDataExpandOption.md)| Optional expansions. Pass `expand=monitor` to replace monitor IDs with full BGP monitor objects. | [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] + **prefixes** | [**List[str]**](str.md)| Prefix CIDR filters. Repeat the parameter to filter by multiple prefixes. | [optional] + **origin_ases** | [**List[int]**](int.md)| Origin AS filters. Repeat the parameter to filter by multiple ASNs. | [optional] + **as_paths** | [**List[str]**](str.md)| AS path filters, expressed as a space-separated list of ASNs. Repeat the parameter to filter by multiple AS paths. | [optional] + **rpki_statuses** | [**List[BgpRpkiStatus]**](BgpRpkiStatus.md)| RPKI status filters. | [optional] + **update_type** | [**List[BgpUpdateType]**](BgpUpdateType.md)| BGP update type filters. | [optional] + **monitor_ids** | [**List[str]**](str.md)| BGP monitor ID filters. Repeat the parameter to filter by multiple monitors. Get `monitorId` from the `/monitors` endpoint. | [optional] + **communities** | [**List[str]**](str.md)| BGP community filters. Repeat the parameter to filter by multiple communities. | [optional] + +### Return type + +[**BgpUpdates**](BgpUpdates.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** | List of BGP updates. | - | +**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 | - | + +[[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) + diff --git a/thousandeyes-sdk-bgp-updates/docs/BgpDataExpandOption.md b/thousandeyes-sdk-bgp-updates/docs/BgpDataExpandOption.md new file mode 100644 index 000000000..39f64ea9e --- /dev/null +++ b/thousandeyes-sdk-bgp-updates/docs/BgpDataExpandOption.md @@ -0,0 +1,12 @@ +# BgpDataExpandOption + +Expandable BGP data response sub-resources. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-bgp-updates/docs/BgpMonitor.md b/thousandeyes-sdk-bgp-updates/docs/BgpMonitor.md new file mode 100644 index 000000000..7a1ebd8aa --- /dev/null +++ b/thousandeyes-sdk-bgp-updates/docs/BgpMonitor.md @@ -0,0 +1,35 @@ +# BgpMonitor + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**country_id** | **str** | Country ID | [optional] [readonly] +**monitor_id** | **str** | BGP monitor ID | [optional] [readonly] +**ip_address** | **str** | IP address of the BGP monitor | [optional] +**network** | **str** | Name of the autonomous system in which the monitor is found | [optional] +**monitor_type** | [**MonitorType**](MonitorType.md) | | [optional] +**monitor_name** | **str** | Display name of the BGP monitor | [optional] +**asn** | **int** | Autonomous system number in which the monitor is found. | [optional] + +## Example + +```python +from thousandeyes_sdk.bgp_updates.models.bgp_monitor import BgpMonitor + +# TODO update the JSON string below +json = "{}" +# create an instance of BgpMonitor from a JSON string +bgp_monitor_instance = BgpMonitor.from_json(json) +# print the JSON string representation of the object +print(BgpMonitor.to_json()) + +# convert the object into a dict +bgp_monitor_dict = bgp_monitor_instance.to_dict() +# create an instance of BgpMonitor from a dict +bgp_monitor_from_dict = BgpMonitor.from_dict(bgp_monitor_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) + + diff --git a/thousandeyes-sdk-bgp-updates/docs/BgpRpkiStatus.md b/thousandeyes-sdk-bgp-updates/docs/BgpRpkiStatus.md new file mode 100644 index 000000000..1981ba2c2 --- /dev/null +++ b/thousandeyes-sdk-bgp-updates/docs/BgpRpkiStatus.md @@ -0,0 +1,12 @@ +# BgpRpkiStatus + +RPKI validation status for BGP data, using the validation states defined in RFC 6811, Section 2. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-bgp-updates/docs/BgpUpdate.md b/thousandeyes-sdk-bgp-updates/docs/BgpUpdate.md new file mode 100644 index 000000000..a54e2dcb1 --- /dev/null +++ b/thousandeyes-sdk-bgp-updates/docs/BgpUpdate.md @@ -0,0 +1,38 @@ +# BgpUpdate + +BGP update observed by a BGP monitor. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**prefix** | **str** | IP prefix in CIDR notation. | +**origin_as** | **int** | Origin autonomous system (AS) number. Null when the update has no origin AS, including withdrawals. | +**as_path** | **List[int]** | AS path for the update. Empty when the update does not carry a path, including withdrawals. | +**communities** | **List[str]** | BGP communities attached to the update. Empty when the update does not carry communities, including withdrawals. | +**rpki_status** | [**BgpRpkiStatus**](BgpRpkiStatus.md) | RPKI validation status for the update, using the validation states defined in RFC 6811, Section 2. Returns NotAvailable when the update has no RPKI state, including withdrawals. | +**update_type** | [**BgpUpdateType**](BgpUpdateType.md) | Type of BGP update. | +**monitor_id** | **str** | BGP monitor ID that observed the update. Returned by default and omitted when `expand=monitor` is requested. | [optional] +**monitor** | [**BgpMonitor**](BgpMonitor.md) | BGP monitor that observed the update. Returned when `expand=monitor` is requested and replaces `monitorId`. | [optional] +**timestamp** | **datetime** | Date and time when the update was observed. | + +## Example + +```python +from thousandeyes_sdk.bgp_updates.models.bgp_update import BgpUpdate + +# TODO update the JSON string below +json = "{}" +# create an instance of BgpUpdate from a JSON string +bgp_update_instance = BgpUpdate.from_json(json) +# print the JSON string representation of the object +print(BgpUpdate.to_json()) + +# convert the object into a dict +bgp_update_dict = bgp_update_instance.to_dict() +# create an instance of BgpUpdate from a dict +bgp_update_from_dict = BgpUpdate.from_dict(bgp_update_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) + + diff --git a/thousandeyes-sdk-bgp-updates/docs/BgpUpdateType.md b/thousandeyes-sdk-bgp-updates/docs/BgpUpdateType.md new file mode 100644 index 000000000..66bc70994 --- /dev/null +++ b/thousandeyes-sdk-bgp-updates/docs/BgpUpdateType.md @@ -0,0 +1,12 @@ +# BgpUpdateType + +Type of BGP update. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-bgp-updates/docs/BgpUpdates.md b/thousandeyes-sdk-bgp-updates/docs/BgpUpdates.md new file mode 100644 index 000000000..5b97e3858 --- /dev/null +++ b/thousandeyes-sdk-bgp-updates/docs/BgpUpdates.md @@ -0,0 +1,30 @@ +# BgpUpdates + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**updates** | [**List[BgpUpdate]**](BgpUpdate.md) | | [optional] +**links** | [**PaginationLinks**](PaginationLinks.md) | | [optional] + +## Example + +```python +from thousandeyes_sdk.bgp_updates.models.bgp_updates import BgpUpdates + +# TODO update the JSON string below +json = "{}" +# create an instance of BgpUpdates from a JSON string +bgp_updates_instance = BgpUpdates.from_json(json) +# print the JSON string representation of the object +print(BgpUpdates.to_json()) + +# convert the object into a dict +bgp_updates_dict = bgp_updates_instance.to_dict() +# create an instance of BgpUpdates from a dict +bgp_updates_from_dict = BgpUpdates.from_dict(bgp_updates_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) + + diff --git a/thousandeyes-sdk-bgp-updates/docs/Error.md b/thousandeyes-sdk-bgp-updates/docs/Error.md new file mode 100644 index 000000000..637f730a9 --- /dev/null +++ b/thousandeyes-sdk-bgp-updates/docs/Error.md @@ -0,0 +1,33 @@ +# Error + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \"about:blank\". | [optional] +**title** | **str** | A short, human-readable summary of the problem type. | [optional] +**status** | **int** | The HTTP status code generated by the origin server for this occurrence of the problem. | [optional] +**detail** | **str** | A human-readable explanation specific to this occurrence of the problem. | [optional] +**instance** | **str** | A URI reference that identifies the specific occurrence of the problem. | [optional] + +## Example + +```python +from thousandeyes_sdk.bgp_updates.models.error import Error + +# TODO update the JSON string below +json = "{}" +# create an instance of Error from a JSON string +error_instance = Error.from_json(json) +# print the JSON string representation of the object +print(Error.to_json()) + +# convert the object into a dict +error_dict = error_instance.to_dict() +# create an instance of Error from a dict +error_from_dict = Error.from_dict(error_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) + + diff --git a/thousandeyes-sdk-bgp-updates/docs/Link.md b/thousandeyes-sdk-bgp-updates/docs/Link.md new file mode 100644 index 000000000..26e647444 --- /dev/null +++ b/thousandeyes-sdk-bgp-updates/docs/Link.md @@ -0,0 +1,37 @@ +# Link + +A hyperlink from the containing resource to a URI. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **str** | Its value is either a URI [RFC3986] or a URI template [RFC6570]. | +**templated** | **bool** | Should be true when the link object's \"href\" property is a URI template. | [optional] +**type** | **str** | Used as a hint to indicate the media type expected when dereferencing the target resource. | [optional] +**deprecation** | **str** | Its presence indicates that the link is to be deprecated at a future date. Its value is a URL that should provide further information about the deprecation. | [optional] +**name** | **str** | Its value may be used as a secondary key for selecting link objects that share the same relation type. | [optional] +**profile** | **str** | A URI that hints about the profile of the target resource. | [optional] +**title** | **str** | Intended for labelling the link with a human-readable identifier | [optional] +**hreflang** | **str** | Indicates the language of the target resource | [optional] + +## Example + +```python +from thousandeyes_sdk.bgp_updates.models.link import Link + +# TODO update the JSON string below +json = "{}" +# create an instance of Link from a JSON string +link_instance = Link.from_json(json) +# print the JSON string representation of the object +print(Link.to_json()) + +# convert the object into a dict +link_dict = link_instance.to_dict() +# create an instance of Link from a dict +link_from_dict = Link.from_dict(link_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-bgp-updates/docs/Monitor.md b/thousandeyes-sdk-bgp-updates/docs/Monitor.md new file mode 100644 index 000000000..7ef153783 --- /dev/null +++ b/thousandeyes-sdk-bgp-updates/docs/Monitor.md @@ -0,0 +1,34 @@ +# Monitor + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**country_id** | **str** | Country ID | [optional] [readonly] +**monitor_id** | **str** | BGP monitor ID | [optional] [readonly] +**ip_address** | **str** | IP address of the BGP monitor | [optional] +**network** | **str** | Name of the autonomous system in which the monitor is found | [optional] +**monitor_type** | [**MonitorType**](MonitorType.md) | | [optional] +**monitor_name** | **str** | Display name of the BGP monitor | [optional] + +## Example + +```python +from thousandeyes_sdk.bgp_updates.models.monitor import Monitor + +# TODO update the JSON string below +json = "{}" +# create an instance of Monitor from a JSON string +monitor_instance = Monitor.from_json(json) +# print the JSON string representation of the object +print(Monitor.to_json()) + +# convert the object into a dict +monitor_dict = monitor_instance.to_dict() +# create an instance of Monitor from a dict +monitor_from_dict = Monitor.from_dict(monitor_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) + + diff --git a/thousandeyes-sdk-bgp-updates/docs/MonitorType.md b/thousandeyes-sdk-bgp-updates/docs/MonitorType.md new file mode 100644 index 000000000..5f7d589bf --- /dev/null +++ b/thousandeyes-sdk-bgp-updates/docs/MonitorType.md @@ -0,0 +1,12 @@ +# MonitorType + +Type of monitor + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-bgp-updates/docs/PaginationLinks.md b/thousandeyes-sdk-bgp-updates/docs/PaginationLinks.md new file mode 100644 index 000000000..4b8128e07 --- /dev/null +++ b/thousandeyes-sdk-bgp-updates/docs/PaginationLinks.md @@ -0,0 +1,32 @@ +# PaginationLinks + +A links object containing pagination related link(s). + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**previous** | [**Link**](Link.md) | | [optional] +**next** | [**Link**](Link.md) | | [optional] +**var_self** | [**Link**](Link.md) | | [optional] + +## Example + +```python +from thousandeyes_sdk.bgp_updates.models.pagination_links import PaginationLinks + +# TODO update the JSON string below +json = "{}" +# create an instance of PaginationLinks from a JSON string +pagination_links_instance = PaginationLinks.from_json(json) +# print the JSON string representation of the object +print(PaginationLinks.to_json()) + +# convert the object into a dict +pagination_links_dict = pagination_links_instance.to_dict() +# create an instance of PaginationLinks from a dict +pagination_links_from_dict = PaginationLinks.from_dict(pagination_links_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-bgp-updates/docs/UnauthorizedError.md b/thousandeyes-sdk-bgp-updates/docs/UnauthorizedError.md new file mode 100644 index 000000000..2da892606 --- /dev/null +++ b/thousandeyes-sdk-bgp-updates/docs/UnauthorizedError.md @@ -0,0 +1,30 @@ +# UnauthorizedError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | | [optional] +**error_description** | **str** | | [optional] + +## Example + +```python +from thousandeyes_sdk.bgp_updates.models.unauthorized_error import UnauthorizedError + +# TODO update the JSON string below +json = "{}" +# create an instance of UnauthorizedError from a JSON string +unauthorized_error_instance = UnauthorizedError.from_json(json) +# print the JSON string representation of the object +print(UnauthorizedError.to_json()) + +# convert the object into a dict +unauthorized_error_dict = unauthorized_error_instance.to_dict() +# create an instance of UnauthorizedError from a dict +unauthorized_error_from_dict = UnauthorizedError.from_dict(unauthorized_error_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) + + diff --git a/thousandeyes-sdk-bgp-updates/docs/ValidationError.md b/thousandeyes-sdk-bgp-updates/docs/ValidationError.md new file mode 100644 index 000000000..74fead00c --- /dev/null +++ b/thousandeyes-sdk-bgp-updates/docs/ValidationError.md @@ -0,0 +1,34 @@ +# ValidationError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \"about:blank\". | [optional] +**title** | **str** | A short, human-readable summary of the problem type. | [optional] +**status** | **int** | The HTTP status code generated by the origin server for this occurrence of the problem. | [optional] +**detail** | **str** | A human-readable explanation specific to this occurrence of the problem. | [optional] +**instance** | **str** | A URI reference that identifies the specific occurrence of the problem. | [optional] +**errors** | [**List[ValidationErrorItem]**](ValidationErrorItem.md) | (Optional) When multiple errors occur, the details for each error are listed. | [optional] + +## Example + +```python +from thousandeyes_sdk.bgp_updates.models.validation_error import ValidationError + +# TODO update the JSON string below +json = "{}" +# create an instance of ValidationError from a JSON string +validation_error_instance = ValidationError.from_json(json) +# print the JSON string representation of the object +print(ValidationError.to_json()) + +# convert the object into a dict +validation_error_dict = validation_error_instance.to_dict() +# create an instance of ValidationError from a dict +validation_error_from_dict = ValidationError.from_dict(validation_error_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) + + diff --git a/thousandeyes-sdk-bgp-updates/docs/ValidationErrorItem.md b/thousandeyes-sdk-bgp-updates/docs/ValidationErrorItem.md new file mode 100644 index 000000000..940e2a346 --- /dev/null +++ b/thousandeyes-sdk-bgp-updates/docs/ValidationErrorItem.md @@ -0,0 +1,31 @@ +# ValidationErrorItem + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **str** | (Optional) A unique error type/code that can be referenced in the documentation for further details. | [optional] +**var_field** | **str** | Identifies the field that triggered this particular error. | [optional] +**message** | **str** | A short, human-readable summary of the error. | [optional] + +## Example + +```python +from thousandeyes_sdk.bgp_updates.models.validation_error_item import ValidationErrorItem + +# TODO update the JSON string below +json = "{}" +# create an instance of ValidationErrorItem from a JSON string +validation_error_item_instance = ValidationErrorItem.from_json(json) +# print the JSON string representation of the object +print(ValidationErrorItem.to_json()) + +# convert the object into a dict +validation_error_item_dict = validation_error_item_instance.to_dict() +# create an instance of ValidationErrorItem from a dict +validation_error_item_from_dict = ValidationErrorItem.from_dict(validation_error_item_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) + + diff --git a/thousandeyes-sdk-bgp-updates/pyproject.toml b/thousandeyes-sdk-bgp-updates/pyproject.toml new file mode 100644 index 000000000..5c727d635 --- /dev/null +++ b/thousandeyes-sdk-bgp-updates/pyproject.toml @@ -0,0 +1,82 @@ +[project] +name = "thousandeyes-sdk-bgp-updates" +dynamic = ["version"] +readme = "README.md" +authors = [ + { name = "ThousandEyes API Team", email = "api-team@thousandeyes.com" } +] +description = "ThousandEyes SDK BGP Updates API" +license = { file = "LICENSE" } +requires-python = ">= 3.9" +dependencies = [ + "urllib3 >= 2.6.3", + "python-dateutil >=2.8.2", + "pydantic >=2.1.0", + "typing-extensions >=4.7.1", + "thousandeyes-sdk-core", +] + +[tool.setuptools.dynamic] +version = {file = ".version"} + +[project.optional-dependencies] +test = [ + "pytest~=7.1.3", + "pytest-cov>=2.8.1", + "pytest-randomly>=3.12.0", + "mypy>=1.4.1", + "types-python-dateutil>=2.8.19", +] +dev = [ + "flake8>=4.0.0", + "mypy>=1.4.1", + "types-python-dateutil>=2.8.19", +] + +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[tool.setuptools] +include-package-data = true + +[tool.pylint.'MESSAGES CONTROL'] +extension-pkg-whitelist = "pydantic" + +[tool.mypy] +files = [ + "src", + #"test", # auto-generated tests + "tests", # hand-written tests +] +# TODO: enable "strict" once all these individual checks are passing +# strict = true + +# List from: https://mypy.readthedocs.io/en/stable/existing_code.html#introduce-stricter-options +warn_unused_configs = true +warn_redundant_casts = true +warn_unused_ignores = true + +## Getting these passing should be easy +strict_equality = true +strict_concatenate = true + +## Strongly recommend enabling this one as soon as you can +check_untyped_defs = true + +## These shouldn't be too much additional work, but may be tricky to +## get passing if you use a lot of untyped libraries +disallow_subclassing_any = true +disallow_untyped_decorators = true +disallow_any_generics = true + +### These next few are various gradations of forcing use of type annotations +#disallow_untyped_calls = true +#disallow_incomplete_defs = true +#disallow_untyped_defs = true +# +### This one isn't too hard to get passing, but return on investment is lower +#no_implicit_reexport = true +# +### This one can be tricky to get passing if you use a lot of untyped libraries +#warn_return_any = true diff --git a/thousandeyes-sdk-bgp-updates/setup.cfg b/thousandeyes-sdk-bgp-updates/setup.cfg new file mode 100644 index 000000000..11433ee87 --- /dev/null +++ b/thousandeyes-sdk-bgp-updates/setup.cfg @@ -0,0 +1,2 @@ +[flake8] +max-line-length=99 diff --git a/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/__init__.py b/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/__init__.py new file mode 100644 index 000000000..ba36205d7 --- /dev/null +++ b/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/__init__.py @@ -0,0 +1,34 @@ +# coding: utf-8 + +# flake8: noqa + +""" + BGP Updates API + + Retrieve BGP updates observed by BGP monitors tracking prefixes in your ThousandEyes account group. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import apis into sdk package +from thousandeyes_sdk.bgp_updates.api.bgp_updates_api import BGPUpdatesApi + + +# import models into sdk package +from thousandeyes_sdk.bgp_updates.models.bgp_data_expand_option import BgpDataExpandOption +from thousandeyes_sdk.bgp_updates.models.bgp_monitor import BgpMonitor +from thousandeyes_sdk.bgp_updates.models.bgp_rpki_status import BgpRpkiStatus +from thousandeyes_sdk.bgp_updates.models.bgp_update import BgpUpdate +from thousandeyes_sdk.bgp_updates.models.bgp_update_type import BgpUpdateType +from thousandeyes_sdk.bgp_updates.models.bgp_updates import BgpUpdates +from thousandeyes_sdk.bgp_updates.models.error import Error +from thousandeyes_sdk.bgp_updates.models.link import Link +from thousandeyes_sdk.bgp_updates.models.monitor import Monitor +from thousandeyes_sdk.bgp_updates.models.monitor_type import MonitorType +from thousandeyes_sdk.bgp_updates.models.pagination_links import PaginationLinks +from thousandeyes_sdk.bgp_updates.models.unauthorized_error import UnauthorizedError +from thousandeyes_sdk.bgp_updates.models.validation_error import ValidationError +from thousandeyes_sdk.bgp_updates.models.validation_error_item import ValidationErrorItem diff --git a/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/api/__init__.py b/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/api/__init__.py new file mode 100644 index 000000000..02d767f3f --- /dev/null +++ b/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/api/__init__.py @@ -0,0 +1,5 @@ +# flake8: noqa + +# import apis into api package +from thousandeyes_sdk.bgp_updates.api.bgp_updates_api import BGPUpdatesApi + diff --git a/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/api/bgp_updates_api.py b/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/api/bgp_updates_api.py new file mode 100644 index 000000000..f1d0baa60 --- /dev/null +++ b/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/api/bgp_updates_api.py @@ -0,0 +1,562 @@ +# coding: utf-8 + +""" + BGP Updates API + + Retrieve BGP updates observed by BGP monitors tracking prefixes in your ThousandEyes account group. + + 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.bgp_updates.models + +from datetime import datetime +from pydantic import Field, StrictInt, StrictStr +from typing import List, Optional +from typing_extensions import Annotated +from thousandeyes_sdk.bgp_updates.models.bgp_data_expand_option import BgpDataExpandOption +from thousandeyes_sdk.bgp_updates.models.bgp_rpki_status import BgpRpkiStatus +from thousandeyes_sdk.bgp_updates.models.bgp_update_type import BgpUpdateType +from thousandeyes_sdk.bgp_updates.models.bgp_updates import BgpUpdates + +from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized +from thousandeyes_sdk.core.api_response import ApiResponse +from thousandeyes_sdk.core.pagination_iterable import PaginationIterable +from thousandeyes_sdk.core.rest import RESTResponseType + + +class BGPUpdatesApi: + """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-bgp-updates")) + self.api_client = api_client + + + @validate_call + def get_bgp_updates( + 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, + max: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Maximum number of BGP updates to return.")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, + expand: Annotated[Optional[List[BgpDataExpandOption]], Field(description="Optional expansions. Pass `expand=monitor` to replace monitor IDs with full BGP monitor objects.")] = 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, + prefixes: Annotated[Optional[Annotated[List[StrictStr], Field(max_length=1000)]], Field(description="Prefix CIDR filters. Repeat the parameter to filter by multiple prefixes.")] = None, + origin_ases: Annotated[Optional[Annotated[List[StrictInt], Field(max_length=1000)]], Field(description="Origin AS filters. Repeat the parameter to filter by multiple ASNs.")] = None, + as_paths: Annotated[Optional[Annotated[List[StrictStr], Field(max_length=1000)]], Field(description="AS path filters, expressed as a space-separated list of ASNs. Repeat the parameter to filter by multiple AS paths.")] = None, + rpki_statuses: Annotated[Optional[Annotated[List[BgpRpkiStatus], Field(max_length=1000)]], Field(description="RPKI status filters.")] = None, + update_type: Annotated[Optional[Annotated[List[BgpUpdateType], Field(max_length=1000)]], Field(description="BGP update type filters.")] = None, + monitor_ids: Annotated[Optional[Annotated[List[StrictStr], Field(max_length=1000)]], Field(description="BGP monitor ID filters. Repeat the parameter to filter by multiple monitors. Get `monitorId` from the `/monitors` endpoint.")] = None, + communities: Annotated[Optional[Annotated[List[StrictStr], Field(max_length=1000)]], Field(description="BGP community filters. Repeat the parameter to filter by multiple communities.")] = 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, + ) -> BgpUpdates: + """List BGP updates + + Retrieves a paginated list of BGP updates for prefixes tracked by the account group. When the `prefixes` filter is omitted, updates are returned for all prefixes currently tracked by the account group. Use the returned pagination links to request subsequent pages. + + :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 max: Maximum number of BGP updates to return. + :type max: int + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. + :type cursor: str + :param expand: Optional expansions. Pass `expand=monitor` to replace monitor IDs with full BGP monitor objects. + :type expand: List[BgpDataExpandOption] + :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 prefixes: Prefix CIDR filters. Repeat the parameter to filter by multiple prefixes. + :type prefixes: List[str] + :param origin_ases: Origin AS filters. Repeat the parameter to filter by multiple ASNs. + :type origin_ases: List[int] + :param as_paths: AS path filters, expressed as a space-separated list of ASNs. Repeat the parameter to filter by multiple AS paths. + :type as_paths: List[str] + :param rpki_statuses: RPKI status filters. + :type rpki_statuses: List[BgpRpkiStatus] + :param update_type: BGP update type filters. + :type update_type: List[BgpUpdateType] + :param monitor_ids: BGP monitor ID filters. Repeat the parameter to filter by multiple monitors. Get `monitorId` from the `/monitors` endpoint. + :type monitor_ids: List[str] + :param communities: BGP community filters. Repeat the parameter to filter by multiple communities. + :type communities: List[str] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (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_bgp_updates_serialize( + aid=aid, + max=max, + cursor=cursor, + expand=expand, + start_date=start_date, + end_date=end_date, + prefixes=prefixes, + origin_ases=origin_ases, + as_paths=as_paths, + rpki_statuses=rpki_statuses, + update_type=update_type, + monitor_ids=monitor_ids, + communities=communities, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BgpUpdates", + '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.bgp_updates.models, + ).data + + + @validate_call + def get_bgp_updates_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, + max: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Maximum number of BGP updates to return.")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, + expand: Annotated[Optional[List[BgpDataExpandOption]], Field(description="Optional expansions. Pass `expand=monitor` to replace monitor IDs with full BGP monitor objects.")] = 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, + prefixes: Annotated[Optional[Annotated[List[StrictStr], Field(max_length=1000)]], Field(description="Prefix CIDR filters. Repeat the parameter to filter by multiple prefixes.")] = None, + origin_ases: Annotated[Optional[Annotated[List[StrictInt], Field(max_length=1000)]], Field(description="Origin AS filters. Repeat the parameter to filter by multiple ASNs.")] = None, + as_paths: Annotated[Optional[Annotated[List[StrictStr], Field(max_length=1000)]], Field(description="AS path filters, expressed as a space-separated list of ASNs. Repeat the parameter to filter by multiple AS paths.")] = None, + rpki_statuses: Annotated[Optional[Annotated[List[BgpRpkiStatus], Field(max_length=1000)]], Field(description="RPKI status filters.")] = None, + update_type: Annotated[Optional[Annotated[List[BgpUpdateType], Field(max_length=1000)]], Field(description="BGP update type filters.")] = None, + monitor_ids: Annotated[Optional[Annotated[List[StrictStr], Field(max_length=1000)]], Field(description="BGP monitor ID filters. Repeat the parameter to filter by multiple monitors. Get `monitorId` from the `/monitors` endpoint.")] = None, + communities: Annotated[Optional[Annotated[List[StrictStr], Field(max_length=1000)]], Field(description="BGP community filters. Repeat the parameter to filter by multiple communities.")] = 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[BgpUpdates]: + """List BGP updates + + Retrieves a paginated list of BGP updates for prefixes tracked by the account group. When the `prefixes` filter is omitted, updates are returned for all prefixes currently tracked by the account group. Use the returned pagination links to request subsequent pages. + + :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 max: Maximum number of BGP updates to return. + :type max: int + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. + :type cursor: str + :param expand: Optional expansions. Pass `expand=monitor` to replace monitor IDs with full BGP monitor objects. + :type expand: List[BgpDataExpandOption] + :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 prefixes: Prefix CIDR filters. Repeat the parameter to filter by multiple prefixes. + :type prefixes: List[str] + :param origin_ases: Origin AS filters. Repeat the parameter to filter by multiple ASNs. + :type origin_ases: List[int] + :param as_paths: AS path filters, expressed as a space-separated list of ASNs. Repeat the parameter to filter by multiple AS paths. + :type as_paths: List[str] + :param rpki_statuses: RPKI status filters. + :type rpki_statuses: List[BgpRpkiStatus] + :param update_type: BGP update type filters. + :type update_type: List[BgpUpdateType] + :param monitor_ids: BGP monitor ID filters. Repeat the parameter to filter by multiple monitors. Get `monitorId` from the `/monitors` endpoint. + :type monitor_ids: List[str] + :param communities: BGP community filters. Repeat the parameter to filter by multiple communities. + :type communities: List[str] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (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_bgp_updates_serialize( + aid=aid, + max=max, + cursor=cursor, + expand=expand, + start_date=start_date, + end_date=end_date, + prefixes=prefixes, + origin_ases=origin_ases, + as_paths=as_paths, + rpki_statuses=rpki_statuses, + update_type=update_type, + monitor_ids=monitor_ids, + communities=communities, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BgpUpdates", + '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.bgp_updates.models, + ) + + + @validate_call + def get_bgp_updates_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, + max: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Maximum number of BGP updates to return.")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, + expand: Annotated[Optional[List[BgpDataExpandOption]], Field(description="Optional expansions. Pass `expand=monitor` to replace monitor IDs with full BGP monitor objects.")] = 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, + prefixes: Annotated[Optional[Annotated[List[StrictStr], Field(max_length=1000)]], Field(description="Prefix CIDR filters. Repeat the parameter to filter by multiple prefixes.")] = None, + origin_ases: Annotated[Optional[Annotated[List[StrictInt], Field(max_length=1000)]], Field(description="Origin AS filters. Repeat the parameter to filter by multiple ASNs.")] = None, + as_paths: Annotated[Optional[Annotated[List[StrictStr], Field(max_length=1000)]], Field(description="AS path filters, expressed as a space-separated list of ASNs. Repeat the parameter to filter by multiple AS paths.")] = None, + rpki_statuses: Annotated[Optional[Annotated[List[BgpRpkiStatus], Field(max_length=1000)]], Field(description="RPKI status filters.")] = None, + update_type: Annotated[Optional[Annotated[List[BgpUpdateType], Field(max_length=1000)]], Field(description="BGP update type filters.")] = None, + monitor_ids: Annotated[Optional[Annotated[List[StrictStr], Field(max_length=1000)]], Field(description="BGP monitor ID filters. Repeat the parameter to filter by multiple monitors. Get `monitorId` from the `/monitors` endpoint.")] = None, + communities: Annotated[Optional[Annotated[List[StrictStr], Field(max_length=1000)]], Field(description="BGP community filters. Repeat the parameter to filter by multiple communities.")] = 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 BGP updates + + Retrieves a paginated list of BGP updates for prefixes tracked by the account group. When the `prefixes` filter is omitted, updates are returned for all prefixes currently tracked by the account group. Use the returned pagination links to request subsequent pages. + + :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 max: Maximum number of BGP updates to return. + :type max: int + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. + :type cursor: str + :param expand: Optional expansions. Pass `expand=monitor` to replace monitor IDs with full BGP monitor objects. + :type expand: List[BgpDataExpandOption] + :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 prefixes: Prefix CIDR filters. Repeat the parameter to filter by multiple prefixes. + :type prefixes: List[str] + :param origin_ases: Origin AS filters. Repeat the parameter to filter by multiple ASNs. + :type origin_ases: List[int] + :param as_paths: AS path filters, expressed as a space-separated list of ASNs. Repeat the parameter to filter by multiple AS paths. + :type as_paths: List[str] + :param rpki_statuses: RPKI status filters. + :type rpki_statuses: List[BgpRpkiStatus] + :param update_type: BGP update type filters. + :type update_type: List[BgpUpdateType] + :param monitor_ids: BGP monitor ID filters. Repeat the parameter to filter by multiple monitors. Get `monitorId` from the `/monitors` endpoint. + :type monitor_ids: List[str] + :param communities: BGP community filters. Repeat the parameter to filter by multiple communities. + :type communities: List[str] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (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_bgp_updates_serialize( + aid=aid, + max=max, + cursor=cursor, + expand=expand, + start_date=start_date, + end_date=end_date, + prefixes=prefixes, + origin_ases=origin_ases, + as_paths=as_paths, + rpki_statuses=rpki_statuses, + update_type=update_type, + monitor_ids=monitor_ids, + communities=communities, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BgpUpdates", + '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_bgp_updates_serialize( + self, + aid, + max, + cursor, + expand, + start_date, + end_date, + prefixes, + origin_ases, + as_paths, + rpki_statuses, + update_type, + monitor_ids, + communities, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'expand': 'csv', + 'prefixes': 'multi', + 'originAses': 'multi', + 'asPaths': 'multi', + 'rpkiStatuses': 'multi', + 'updateType': 'multi', + 'monitorIds': 'multi', + 'communities': 'multi', + } + + _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 max is not None: + + _query_params.append(('max', max)) + + if cursor is not None: + + _query_params.append(('cursor', cursor)) + + if expand is not None: + + _query_params.append(('expand', expand)) + + 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)) + + if prefixes is not None: + + _query_params.append(('prefixes', prefixes)) + + if origin_ases is not None: + + _query_params.append(('originAses', origin_ases)) + + if as_paths is not None: + + _query_params.append(('asPaths', as_paths)) + + if rpki_statuses is not None: + + _query_params.append(('rpkiStatuses', rpki_statuses)) + + if update_type is not None: + + _query_params.append(('updateType', update_type)) + + if monitor_ids is not None: + + _query_params.append(('monitorIds', monitor_ids)) + + if communities is not None: + + _query_params.append(('communities', communities)) + + # 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='/bgp/updates', + 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 + ) + + diff --git a/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/models/__init__.py b/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/models/__init__.py new file mode 100644 index 000000000..4d96173ab --- /dev/null +++ b/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/models/__init__.py @@ -0,0 +1,29 @@ +# coding: utf-8 + +# flake8: noqa +""" + BGP Updates API + + Retrieve BGP updates observed by BGP monitors tracking prefixes in your ThousandEyes account group. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import models into model package +from thousandeyes_sdk.bgp_updates.models.bgp_data_expand_option import BgpDataExpandOption +from thousandeyes_sdk.bgp_updates.models.bgp_monitor import BgpMonitor +from thousandeyes_sdk.bgp_updates.models.bgp_rpki_status import BgpRpkiStatus +from thousandeyes_sdk.bgp_updates.models.bgp_update import BgpUpdate +from thousandeyes_sdk.bgp_updates.models.bgp_update_type import BgpUpdateType +from thousandeyes_sdk.bgp_updates.models.bgp_updates import BgpUpdates +from thousandeyes_sdk.bgp_updates.models.error import Error +from thousandeyes_sdk.bgp_updates.models.link import Link +from thousandeyes_sdk.bgp_updates.models.monitor import Monitor +from thousandeyes_sdk.bgp_updates.models.monitor_type import MonitorType +from thousandeyes_sdk.bgp_updates.models.pagination_links import PaginationLinks +from thousandeyes_sdk.bgp_updates.models.unauthorized_error import UnauthorizedError +from thousandeyes_sdk.bgp_updates.models.validation_error import ValidationError +from thousandeyes_sdk.bgp_updates.models.validation_error_item import ValidationErrorItem diff --git a/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/models/bgp_data_expand_option.py b/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/models/bgp_data_expand_option.py new file mode 100644 index 000000000..dea801bd5 --- /dev/null +++ b/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/models/bgp_data_expand_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + BGP Updates API + + Retrieve BGP updates observed by BGP monitors tracking prefixes in your ThousandEyes account group. + + 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 BgpDataExpandOption(str, Enum): + """ + Expandable BGP data response sub-resources. + """ + + """ + allowed enum values + """ + MONITOR = 'monitor' + UNKNOWN = 'unknown' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BgpDataExpandOption from a JSON string""" + return cls(json.loads(json_str)) + + @classmethod + def _missing_(cls, value): + """Handle unknown values""" + return cls.UNKNOWN + diff --git a/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/models/bgp_monitor.py b/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/models/bgp_monitor.py new file mode 100644 index 000000000..627007334 --- /dev/null +++ b/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/models/bgp_monitor.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + BGP Updates API + + Retrieve BGP updates observed by BGP monitors tracking prefixes in your ThousandEyes account group. + + 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.bgp_updates.models.monitor_type import MonitorType +from typing import Optional, Set +from typing_extensions import Self + +class BgpMonitor(BaseModel): + """ + BgpMonitor + """ # noqa: E501 + country_id: Optional[StrictStr] = Field(default=None, description="Country ID", alias="countryId") + monitor_id: Optional[StrictStr] = Field(default=None, description="BGP monitor ID", alias="monitorId") + ip_address: Optional[StrictStr] = Field(default=None, description="IP address of the BGP monitor", alias="ipAddress") + network: Optional[StrictStr] = Field(default=None, description="Name of the autonomous system in which the monitor is found") + monitor_type: Optional[MonitorType] = Field(default=None, alias="monitorType") + monitor_name: Optional[StrictStr] = Field(default=None, description="Display name of the BGP monitor", alias="monitorName") + asn: Optional[StrictInt] = Field(default=None, description="Autonomous system number in which the monitor is found.") + __properties: ClassVar[List[str]] = ["countryId", "monitorId", "ipAddress", "network", "monitorType", "monitorName", "asn"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + extra="allow", + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BgpMonitor 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([ + "country_id", + "monitor_id", + ]) + + _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 BgpMonitor from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "countryId": obj.get("countryId"), + "monitorId": obj.get("monitorId"), + "ipAddress": obj.get("ipAddress"), + "network": obj.get("network"), + "monitorType": obj.get("monitorType"), + "monitorName": obj.get("monitorName"), + "asn": obj.get("asn") + }) + return _obj + + diff --git a/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/models/bgp_rpki_status.py b/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/models/bgp_rpki_status.py new file mode 100644 index 000000000..dd6a8799b --- /dev/null +++ b/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/models/bgp_rpki_status.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + BGP Updates API + + Retrieve BGP updates observed by BGP monitors tracking prefixes in your ThousandEyes account group. + + 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 BgpRpkiStatus(str, Enum): + """ + RPKI validation status for BGP data, using the validation states defined in RFC 6811, Section 2. + """ + + """ + allowed enum values + """ + VALID = 'Valid' + INVALID = 'Invalid' + NOTFOUND = 'NotFound' + NOTAVAILABLE = 'NotAvailable' + UNKNOWN = 'unknown' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BgpRpkiStatus from a JSON string""" + return cls(json.loads(json_str)) + + @classmethod + def _missing_(cls, value): + """Handle unknown values""" + return cls.UNKNOWN + diff --git a/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/models/bgp_update.py b/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/models/bgp_update.py new file mode 100644 index 000000000..5d5c1863d --- /dev/null +++ b/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/models/bgp_update.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + BGP Updates API + + Retrieve BGP updates observed by BGP monitors tracking prefixes in your ThousandEyes account group. + + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from thousandeyes_sdk.bgp_updates.models.bgp_monitor import BgpMonitor +from thousandeyes_sdk.bgp_updates.models.bgp_rpki_status import BgpRpkiStatus +from thousandeyes_sdk.bgp_updates.models.bgp_update_type import BgpUpdateType +from typing import Optional, Set +from typing_extensions import Self + +class BgpUpdate(BaseModel): + """ + BGP update observed by a BGP monitor. + """ # noqa: E501 + prefix: StrictStr = Field(description="IP prefix in CIDR notation.") + origin_as: Optional[StrictInt] = Field(description="Origin autonomous system (AS) number. Null when the update has no origin AS, including withdrawals.", alias="originAs") + as_path: List[StrictInt] = Field(description="AS path for the update. Empty when the update does not carry a path, including withdrawals.", alias="asPath") + communities: List[StrictStr] = Field(description="BGP communities attached to the update. Empty when the update does not carry communities, including withdrawals.") + rpki_status: BgpRpkiStatus = Field(description="RPKI validation status for the update, using the validation states defined in RFC 6811, Section 2. Returns NotAvailable when the update has no RPKI state, including withdrawals.", alias="rpkiStatus") + update_type: BgpUpdateType = Field(description="Type of BGP update.", alias="updateType") + monitor_id: Optional[StrictStr] = Field(default=None, description="BGP monitor ID that observed the update. Returned by default and omitted when `expand=monitor` is requested.", alias="monitorId") + monitor: Optional[BgpMonitor] = Field(default=None, description="BGP monitor that observed the update. Returned when `expand=monitor` is requested and replaces `monitorId`.") + timestamp: datetime = Field(description="Date and time when the update was observed.") + __properties: ClassVar[List[str]] = ["prefix", "originAs", "asPath", "communities", "rpkiStatus", "updateType", "monitorId", "monitor", "timestamp"] + + 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 BgpUpdate 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 monitor + if self.monitor: + _dict['monitor'] = self.monitor.to_dict() + # set to None if origin_as (nullable) is None + # and model_fields_set contains the field + if self.origin_as is None and "origin_as" in self.model_fields_set: + _dict['originAs'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BgpUpdate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "prefix": obj.get("prefix"), + "originAs": obj.get("originAs"), + "asPath": obj.get("asPath"), + "communities": obj.get("communities"), + "rpkiStatus": obj.get("rpkiStatus"), + "updateType": obj.get("updateType"), + "monitorId": obj.get("monitorId"), + "monitor": BgpMonitor.from_dict(obj["monitor"]) if obj.get("monitor") is not None else None, + "timestamp": obj.get("timestamp") + }) + return _obj + + diff --git a/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/models/bgp_update_type.py b/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/models/bgp_update_type.py new file mode 100644 index 000000000..d2f480790 --- /dev/null +++ b/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/models/bgp_update_type.py @@ -0,0 +1,42 @@ +# coding: utf-8 + +""" + BGP Updates API + + Retrieve BGP updates observed by BGP monitors tracking prefixes in your ThousandEyes account group. + + 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 BgpUpdateType(str, Enum): + """ + Type of BGP update. + """ + + """ + allowed enum values + """ + ANNOUNCEMENT = 'announcement' + WITHDRAWAL = 'withdrawal' + UNSPECIFIED = 'unspecified' + UNKNOWN = 'unknown' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BgpUpdateType from a JSON string""" + return cls(json.loads(json_str)) + + @classmethod + def _missing_(cls, value): + """Handle unknown values""" + return cls.UNKNOWN + diff --git a/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/models/bgp_updates.py b/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/models/bgp_updates.py new file mode 100644 index 000000000..d9cff2835 --- /dev/null +++ b/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/models/bgp_updates.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + BGP Updates API + + Retrieve BGP updates observed by BGP monitors tracking prefixes in your ThousandEyes account group. + + 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.bgp_updates.models.bgp_update import BgpUpdate +from thousandeyes_sdk.bgp_updates.models.pagination_links import PaginationLinks +from typing import Optional, Set +from typing_extensions import Self + +class BgpUpdates(BaseModel): + """ + BgpUpdates + """ # noqa: E501 + updates: Optional[List[Optional[BgpUpdate]]] = None + links: Optional[PaginationLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["updates", "_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 BgpUpdates 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 updates (list) + _items = [] + if self.updates: + for _item in self.updates: + if _item: + _items.append(_item.to_dict()) + _dict['updates'] = _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 BgpUpdates from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "updates": [BgpUpdate.from_dict(_item) for _item in obj["updates"]] if obj.get("updates") is not None else None, + "_links": PaginationLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/models/error.py b/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/models/error.py new file mode 100644 index 000000000..d955b8ff3 --- /dev/null +++ b/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/models/error.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + BGP Updates API + + Retrieve BGP updates observed by BGP monitors tracking prefixes in your ThousandEyes account group. + + 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 typing import Optional, Set +from typing_extensions import Self + +class Error(BaseModel): + """ + Error + """ # noqa: E501 + type: Optional[StrictStr] = Field(default=None, description="A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \"about:blank\".") + title: Optional[StrictStr] = Field(default=None, description="A short, human-readable summary of the problem type.") + status: Optional[StrictInt] = Field(default=None, description="The HTTP status code generated by the origin server for this occurrence of the problem.") + detail: Optional[StrictStr] = Field(default=None, description="A human-readable explanation specific to this occurrence of the problem.") + instance: Optional[StrictStr] = Field(default=None, description="A URI reference that identifies the specific occurrence of the problem.") + __properties: ClassVar[List[str]] = ["type", "title", "status", "detail", "instance"] + + 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 Error 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 Error from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "title": obj.get("title"), + "status": obj.get("status"), + "detail": obj.get("detail"), + "instance": obj.get("instance") + }) + return _obj + + diff --git a/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/models/link.py b/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/models/link.py new file mode 100644 index 000000000..990b2797d --- /dev/null +++ b/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/models/link.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + BGP Updates API + + Retrieve BGP updates observed by BGP monitors tracking prefixes in your ThousandEyes account group. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class Link(BaseModel): + """ + A hyperlink from the containing resource to a URI. + """ # noqa: E501 + href: StrictStr = Field(description="Its value is either a URI [RFC3986] or a URI template [RFC6570].") + templated: Optional[StrictBool] = Field(default=None, description="Should be true when the link object's \"href\" property is a URI template.") + type: Optional[StrictStr] = Field(default=None, description="Used as a hint to indicate the media type expected when dereferencing the target resource.") + deprecation: Optional[StrictStr] = Field(default=None, description="Its presence indicates that the link is to be deprecated at a future date. Its value is a URL that should provide further information about the deprecation.") + name: Optional[StrictStr] = Field(default=None, description="Its value may be used as a secondary key for selecting link objects that share the same relation type.") + profile: Optional[StrictStr] = Field(default=None, description="A URI that hints about the profile of the target resource.") + title: Optional[StrictStr] = Field(default=None, description="Intended for labelling the link with a human-readable identifier") + hreflang: Optional[StrictStr] = Field(default=None, description="Indicates the language of the target resource") + __properties: ClassVar[List[str]] = ["href", "templated", "type", "deprecation", "name", "profile", "title", "hreflang"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + extra="allow", + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Link 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 Link from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "href": obj.get("href"), + "templated": obj.get("templated"), + "type": obj.get("type"), + "deprecation": obj.get("deprecation"), + "name": obj.get("name"), + "profile": obj.get("profile"), + "title": obj.get("title"), + "hreflang": obj.get("hreflang") + }) + return _obj + + diff --git a/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/models/monitor.py b/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/models/monitor.py new file mode 100644 index 000000000..a0dba0ac8 --- /dev/null +++ b/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/models/monitor.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + BGP Updates API + + Retrieve BGP updates observed by BGP monitors tracking prefixes in your ThousandEyes account group. + + 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.bgp_updates.models.monitor_type import MonitorType +from typing import Optional, Set +from typing_extensions import Self + +class Monitor(BaseModel): + """ + Monitor + """ # noqa: E501 + country_id: Optional[StrictStr] = Field(default=None, description="Country ID", alias="countryId") + monitor_id: Optional[StrictStr] = Field(default=None, description="BGP monitor ID", alias="monitorId") + ip_address: Optional[StrictStr] = Field(default=None, description="IP address of the BGP monitor", alias="ipAddress") + network: Optional[StrictStr] = Field(default=None, description="Name of the autonomous system in which the monitor is found") + monitor_type: Optional[MonitorType] = Field(default=None, alias="monitorType") + monitor_name: Optional[StrictStr] = Field(default=None, description="Display name of the BGP monitor", alias="monitorName") + __properties: ClassVar[List[str]] = ["countryId", "monitorId", "ipAddress", "network", "monitorType", "monitorName"] + + 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 Monitor 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([ + "country_id", + "monitor_id", + ]) + + _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 Monitor from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "countryId": obj.get("countryId"), + "monitorId": obj.get("monitorId"), + "ipAddress": obj.get("ipAddress"), + "network": obj.get("network"), + "monitorType": obj.get("monitorType"), + "monitorName": obj.get("monitorName") + }) + return _obj + + diff --git a/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/models/monitor_type.py b/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/models/monitor_type.py new file mode 100644 index 000000000..48abf061e --- /dev/null +++ b/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/models/monitor_type.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + BGP Updates API + + Retrieve BGP updates observed by BGP monitors tracking prefixes in your ThousandEyes account group. + + 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 MonitorType(str, Enum): + """ + Type of monitor + """ + + """ + allowed enum values + """ + PUBLIC = 'public' + PRIVATE = 'private' + UNKNOWN = 'unknown' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of MonitorType from a JSON string""" + return cls(json.loads(json_str)) + + @classmethod + def _missing_(cls, value): + """Handle unknown values""" + return cls.UNKNOWN + diff --git a/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/models/pagination_links.py b/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/models/pagination_links.py new file mode 100644 index 000000000..89371630a --- /dev/null +++ b/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/models/pagination_links.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + BGP Updates API + + Retrieve BGP updates observed by BGP monitors tracking prefixes in your ThousandEyes account group. + + 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.bgp_updates.models.link import Link +from typing import Optional, Set +from typing_extensions import Self + +class PaginationLinks(BaseModel): + """ + A links object containing pagination related link(s). + """ # noqa: E501 + previous: Optional[Link] = None + next: Optional[Link] = None + var_self: Optional[Link] = Field(default=None, alias="self") + __properties: ClassVar[List[str]] = ["previous", "next", "self"] + + 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 PaginationLinks 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 previous + if self.previous: + _dict['previous'] = self.previous.to_dict() + # override the default output from pydantic by calling `to_dict()` of next + if self.next: + _dict['next'] = self.next.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_self + if self.var_self: + _dict['self'] = self.var_self.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaginationLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "previous": Link.from_dict(obj["previous"]) if obj.get("previous") is not None else None, + "next": Link.from_dict(obj["next"]) if obj.get("next") is not None else None, + "self": Link.from_dict(obj["self"]) if obj.get("self") is not None else None + }) + return _obj + + diff --git a/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/models/unauthorized_error.py b/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/models/unauthorized_error.py new file mode 100644 index 000000000..93713ad87 --- /dev/null +++ b/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/models/unauthorized_error.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + BGP Updates API + + Retrieve BGP updates observed by BGP monitors tracking prefixes in your ThousandEyes account group. + + 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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UnauthorizedError(BaseModel): + """ + UnauthorizedError + """ # noqa: E501 + error: Optional[StrictStr] = None + error_description: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["error", "error_description"] + + 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 UnauthorizedError 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 UnauthorizedError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": obj.get("error"), + "error_description": obj.get("error_description") + }) + return _obj + + diff --git a/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/models/validation_error.py b/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/models/validation_error.py new file mode 100644 index 000000000..3d11d79da --- /dev/null +++ b/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/models/validation_error.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + BGP Updates API + + Retrieve BGP updates observed by BGP monitors tracking prefixes in your ThousandEyes account group. + + 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.bgp_updates.models.validation_error_item import ValidationErrorItem +from typing import Optional, Set +from typing_extensions import Self + +class ValidationError(BaseModel): + """ + ValidationError + """ # noqa: E501 + type: Optional[StrictStr] = Field(default=None, description="A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \"about:blank\".") + title: Optional[StrictStr] = Field(default=None, description="A short, human-readable summary of the problem type.") + status: Optional[StrictInt] = Field(default=None, description="The HTTP status code generated by the origin server for this occurrence of the problem.") + detail: Optional[StrictStr] = Field(default=None, description="A human-readable explanation specific to this occurrence of the problem.") + instance: Optional[StrictStr] = Field(default=None, description="A URI reference that identifies the specific occurrence of the problem.") + errors: Optional[List[ValidationErrorItem]] = Field(default=None, description="(Optional) When multiple errors occur, the details for each error are listed.") + __properties: ClassVar[List[str]] = ["type", "title", "status", "detail", "instance", "errors"] + + 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 ValidationError 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 errors (list) + _items = [] + if self.errors: + for _item in self.errors: + if _item: + _items.append(_item.to_dict()) + _dict['errors'] = _items + # set to None if errors (nullable) is None + # and model_fields_set contains the field + if self.errors is None and "errors" in self.model_fields_set: + _dict['errors'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ValidationError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "title": obj.get("title"), + "status": obj.get("status"), + "detail": obj.get("detail"), + "instance": obj.get("instance"), + "errors": [ValidationErrorItem.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None + }) + return _obj + + diff --git a/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/models/validation_error_item.py b/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/models/validation_error_item.py new file mode 100644 index 000000000..7faf77941 --- /dev/null +++ b/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/models/validation_error_item.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + BGP Updates API + + Retrieve BGP updates observed by BGP monitors tracking prefixes in your ThousandEyes account group. + + 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 ValidationErrorItem(BaseModel): + """ + ValidationErrorItem + """ # noqa: E501 + code: Optional[StrictStr] = Field(default=None, description="(Optional) A unique error type/code that can be referenced in the documentation for further details.") + var_field: Optional[StrictStr] = Field(default=None, description="Identifies the field that triggered this particular error.", alias="field") + message: Optional[StrictStr] = Field(default=None, description="A short, human-readable summary of the error.") + __properties: ClassVar[List[str]] = ["code", "field", "message"] + + 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 ValidationErrorItem 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 ValidationErrorItem from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "field": obj.get("field"), + "message": obj.get("message") + }) + return _obj + + diff --git a/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/py.typed b/thousandeyes-sdk-bgp-updates/src/thousandeyes_sdk/bgp_updates/py.typed new file mode 100644 index 000000000..e69de29bb diff --git a/thousandeyes-sdk-bgp-updates/test/__init__.py b/thousandeyes-sdk-bgp-updates/test/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/thousandeyes-sdk-bgp-updates/test/conftest.py b/thousandeyes-sdk-bgp-updates/test/conftest.py new file mode 100644 index 000000000..2edba7b32 --- /dev/null +++ b/thousandeyes-sdk-bgp-updates/test/conftest.py @@ -0,0 +1,7 @@ +import sys +from pathlib import Path + +_repo_root = Path(__file__).resolve().parents[2] +_core_test_support = _repo_root / "thousandeyes-sdk-core" / "test" +if str(_core_test_support) not in sys.path: + sys.path.insert(0, str(_core_test_support)) diff --git a/thousandeyes-sdk-bgp-updates/test/integration_test_utils.py b/thousandeyes-sdk-bgp-updates/test/integration_test_utils.py new file mode 100644 index 000000000..0b0e320b1 --- /dev/null +++ b/thousandeyes-sdk-bgp-updates/test/integration_test_utils.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + BGP Updates API + + Retrieve BGP updates observed by BGP monitors tracking prefixes in your ThousandEyes account group. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from thousandeyes_sdk.core.api_client import ApiClient +from thousandeyes_sdk.core.configuration import Configuration +from sdk_test_support.mock_server import ERROR_STATUS_HEADER, OPERATION_ID_HEADER, MockApiServer + +from .mock_manifest import OPERATION_MANIFEST + + +class IntegrationTestBase(unittest.TestCase): + def setUp(self) -> None: + self.server = MockApiServer(OPERATION_MANIFEST) + self.server.start() + configuration = Configuration(host=self.server.base_url, access_token="test-token") + self.api_client = ApiClient(configuration=configuration) + + def tearDown(self) -> None: + self.server.stop() + + def te_headers(self, operation_id: str, error_status=None): + headers = {OPERATION_ID_HEADER: operation_id} + if error_status is not None: + headers[ERROR_STATUS_HEADER] = error_status + return headers diff --git a/thousandeyes-sdk-bgp-updates/test/mock_manifest.py b/thousandeyes-sdk-bgp-updates/test/mock_manifest.py new file mode 100644 index 000000000..c54202176 --- /dev/null +++ b/thousandeyes-sdk-bgp-updates/test/mock_manifest.py @@ -0,0 +1,206 @@ +# coding: utf-8 + +""" + BGP Updates API + + Retrieve BGP updates observed by BGP monitors tracking prefixes in your ThousandEyes account group. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json + +from sdk_test_support.mock_server_types import ErrorResponseExpectation, OperationExpectation + +OPERATION_MANIFEST = { + + "get_bgp_updates": OperationExpectation( + operation_id="get_bgp_updates", + method="GET", + path="/bgp/updates", + path_param_examples={ + }, + success_status=200, + success_body=json.loads(""" + + { + "_links" : { + "next" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + }, + "previous" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + }, + "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" + } + }, + "updates" : [ { + "monitorId" : "101", + "prefix" : "192.0.2.0/24", + "asPath" : [ 64512, 64513 ], + "originAs" : 64512, + "monitor" : { + "monitorId" : "101", + "ipAddress" : "10.0.0.1", + "asn" : 64512, + "monitorType" : "private", + "monitorName" : "Private monitor", + "countryId" : "US" + }, + "rpkiStatus" : "Valid", + "communities" : [ "64512:100" ], + "updateType" : "announcement", + "timestamp" : "2024-05-31T16:08:37Z" + }, { + "monitorId" : "101", + "prefix" : "192.0.2.0/24", + "asPath" : [ 64512, 64513 ], + "originAs" : 64512, + "monitor" : { + "monitorId" : "101", + "ipAddress" : "10.0.0.1", + "asn" : 64512, + "monitorType" : "private", + "monitorName" : "Private monitor", + "countryId" : "US" + }, + "rpkiStatus" : "Valid", + "communities" : [ "64512:100" ], + "updateType" : "announcement", + "timestamp" : "2024-05-31T16:08:37Z" + } ] + } + + """), + + success_content_type="application/json", + + request_body_example=None, + error_responses={ + + "400": ErrorResponseExpectation( + status=400, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "errors" : [ { + "code" : "code", + "field" : "field", + "message" : "message" + }, { + "code" : "code", + "field" : "field", + "message" : "message" + } ], + "status" : 0 + }"""), + content_type="application/json", + ), + + "401": ErrorResponseExpectation( + status=401, + body=json.loads(""" + { + "error_description" : "Invalid access token", + "error" : "invalid_token" + }"""), + content_type="application/json", + ), + + "403": ErrorResponseExpectation( + status=403, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 6 + }"""), + content_type="application/json", + ), + + "404": ErrorResponseExpectation( + status=404, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 6 + }"""), + content_type="application/json", + ), + + "429": ErrorResponseExpectation( + status=429, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 6 + }"""), + content_type="application/json", + ), + + "500": ErrorResponseExpectation( + status=500, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 6 + }"""), + content_type="application/json", + ), + + "502": ErrorResponseExpectation( + status=502, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 6 + }"""), + content_type="application/json", + ), + + }, + ), + +} diff --git a/thousandeyes-sdk-bgp-updates/test/test_bgp_updates_api.py b/thousandeyes-sdk-bgp-updates/test/test_bgp_updates_api.py new file mode 100644 index 000000000..776b2a70c --- /dev/null +++ b/thousandeyes-sdk-bgp-updates/test/test_bgp_updates_api.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + BGP Updates API + + Retrieve BGP updates observed by BGP monitors tracking prefixes in your ThousandEyes account group. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.bgp_updates.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.bgp_updates.api.bgp_updates_api import BGPUpdatesApi + + +class TestBGPUpdatesApi(unittest.TestCase): + """BGPUpdatesApi unit test stubs""" + + def setUp(self) -> None: + self.api = BGPUpdatesApi() + + def tearDown(self) -> None: + pass + + def test_get_bgp_updates_models_validation(self) -> None: + """Test case for get_bgp_updates request and response models""" + + + response_body_json = """ + { + "_links" : { + "next" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + }, + "previous" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + }, + "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" + } + }, + "updates" : [ { + "monitorId" : "101", + "prefix" : "192.0.2.0/24", + "asPath" : [ 64512, 64513 ], + "originAs" : 64512, + "monitor" : { + "monitorId" : "101", + "ipAddress" : "10.0.0.1", + "asn" : 64512, + "monitorType" : "private", + "monitorName" : "Private monitor", + "countryId" : "US" + }, + "rpkiStatus" : "Valid", + "communities" : [ "64512:100" ], + "updateType" : "announcement", + "timestamp" : "2024-05-31T16:08:37Z" + }, { + "monitorId" : "101", + "prefix" : "192.0.2.0/24", + "asPath" : [ 64512, 64513 ], + "originAs" : 64512, + "monitor" : { + "monitorId" : "101", + "ipAddress" : "10.0.0.1", + "asn" : 64512, + "monitorType" : "private", + "monitorName" : "Private monitor", + "countryId" : "US" + }, + "rpkiStatus" : "Valid", + "communities" : [ "64512:100" ], + "updateType" : "announcement", + "timestamp" : "2024-05-31T16:08:37Z" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.bgp_updates.models.BgpUpdates.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + + +if __name__ == '__main__': + unittest.main() diff --git a/thousandeyes-sdk-bgp-updates/test/test_bgp_updates_api_integration.py b/thousandeyes-sdk-bgp-updates/test/test_bgp_updates_api_integration.py new file mode 100644 index 000000000..24088d57f --- /dev/null +++ b/thousandeyes-sdk-bgp-updates/test/test_bgp_updates_api_integration.py @@ -0,0 +1,622 @@ +# coding: utf-8 + +""" + BGP Updates API + + Retrieve BGP updates observed by BGP monitors tracking prefixes in your ThousandEyes account group. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.bgp_updates.models + +from thousandeyes_sdk.core.exceptions import ApiException +from thousandeyes_sdk.bgp_updates.api.bgp_updates_api import BGPUpdatesApi +from .integration_test_utils import IntegrationTestBase +from .test_utils import assert_constructed_model_matches_example_json + + +class TestBGPUpdatesApiIntegration(IntegrationTestBase): + """BGPUpdatesApi integration test stubs""" + + def setUp(self) -> None: + super().setUp() + self.api = BGPUpdatesApi(self.api_client) + + + def test_get_bgp_updates_happy_path(self) -> None: + """Integration test for get_bgp_updates success path""" + aid = '1234' + max = 20 + cursor = 'cursor_example' + expand = ["monitor"] + start_date = '2022-07-17T22:00:54Z' + end_date = '2022-07-18T22:00:54Z' + prefixes = ["192.0.2.0/24"] + origin_ases = [64512] + as_paths = ["64512 64513"] + rpki_statuses = [ + 'Valid' + ] + update_type = [ + 'announcement' + ] + monitor_ids = ["101"] + communities = ["64512:100"] + response_body_json = """ + { + "_links" : { + "next" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + }, + "previous" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + }, + "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" + } + }, + "updates" : [ { + "monitorId" : "101", + "prefix" : "192.0.2.0/24", + "asPath" : [ 64512, 64513 ], + "originAs" : 64512, + "monitor" : { + "monitorId" : "101", + "ipAddress" : "10.0.0.1", + "asn" : 64512, + "monitorType" : "private", + "monitorName" : "Private monitor", + "countryId" : "US" + }, + "rpkiStatus" : "Valid", + "communities" : [ "64512:100" ], + "updateType" : "announcement", + "timestamp" : "2024-05-31T16:08:37Z" + }, { + "monitorId" : "101", + "prefix" : "192.0.2.0/24", + "asPath" : [ 64512, 64513 ], + "originAs" : 64512, + "monitor" : { + "monitorId" : "101", + "ipAddress" : "10.0.0.1", + "asn" : 64512, + "monitorType" : "private", + "monitorName" : "Private monitor", + "countryId" : "US" + }, + "rpkiStatus" : "Valid", + "communities" : [ "64512:100" ], + "updateType" : "announcement", + "timestamp" : "2024-05-31T16:08:37Z" + } ] + } + """ + expected_response = json.loads(response_body_json) + response = self.api.get_bgp_updates( + + aid=aid, + + max=max, + + cursor=cursor, + + expand=expand, + + start_date=start_date, + + end_date=end_date, + + prefixes=prefixes, + + origin_ases=origin_ases, + + as_paths=as_paths, + + rpki_statuses=rpki_statuses, + + update_type=update_type, + + monitor_ids=monitor_ids, + + communities=communities, + + _headers=self.te_headers("get_bgp_updates"), + ) + assert_constructed_model_matches_example_json(response, expected_response) + + + def test_get_bgp_updates_error_400(self) -> None: + """Integration test for get_bgp_updates error path (HTTP 400)""" + aid = '1234' + max = 20 + cursor = 'cursor_example' + expand = ["monitor"] + start_date = '2022-07-17T22:00:54Z' + end_date = '2022-07-18T22:00:54Z' + prefixes = ["192.0.2.0/24"] + origin_ases = [64512] + as_paths = ["64512 64513"] + rpki_statuses = [ + 'Valid' + ] + update_type = [ + 'announcement' + ] + monitor_ids = ["101"] + communities = ["64512:100"] + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "errors" : [ { + "code" : "code", + "field" : "field", + "message" : "message" + }, { + "code" : "code", + "field" : "field", + "message" : "message" + } ], + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(400) + ) as context: + self.api.get_bgp_updates( + + aid=aid, + + max=max, + + cursor=cursor, + + expand=expand, + + start_date=start_date, + + end_date=end_date, + + prefixes=prefixes, + + origin_ases=origin_ases, + + as_paths=as_paths, + + rpki_statuses=rpki_statuses, + + update_type=update_type, + + monitor_ids=monitor_ids, + + communities=communities, + + _headers=self.te_headers("get_bgp_updates", error_status="400"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_get_bgp_updates_error_401(self) -> None: + """Integration test for get_bgp_updates error path (HTTP 401)""" + aid = '1234' + max = 20 + cursor = 'cursor_example' + expand = ["monitor"] + start_date = '2022-07-17T22:00:54Z' + end_date = '2022-07-18T22:00:54Z' + prefixes = ["192.0.2.0/24"] + origin_ases = [64512] + as_paths = ["64512 64513"] + rpki_statuses = [ + 'Valid' + ] + update_type = [ + 'announcement' + ] + monitor_ids = ["101"] + communities = ["64512:100"] + error_body_json = """ + { + "error_description" : "Invalid access token", + "error" : "invalid_token" + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(401) + ) as context: + self.api.get_bgp_updates( + + aid=aid, + + max=max, + + cursor=cursor, + + expand=expand, + + start_date=start_date, + + end_date=end_date, + + prefixes=prefixes, + + origin_ases=origin_ases, + + as_paths=as_paths, + + rpki_statuses=rpki_statuses, + + update_type=update_type, + + monitor_ids=monitor_ids, + + communities=communities, + + _headers=self.te_headers("get_bgp_updates", error_status="401"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_get_bgp_updates_error_403(self) -> None: + """Integration test for get_bgp_updates error path (HTTP 403)""" + aid = '1234' + max = 20 + cursor = 'cursor_example' + expand = ["monitor"] + start_date = '2022-07-17T22:00:54Z' + end_date = '2022-07-18T22:00:54Z' + prefixes = ["192.0.2.0/24"] + origin_ases = [64512] + as_paths = ["64512 64513"] + rpki_statuses = [ + 'Valid' + ] + update_type = [ + 'announcement' + ] + monitor_ids = ["101"] + communities = ["64512:100"] + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 6 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(403) + ) as context: + self.api.get_bgp_updates( + + aid=aid, + + max=max, + + cursor=cursor, + + expand=expand, + + start_date=start_date, + + end_date=end_date, + + prefixes=prefixes, + + origin_ases=origin_ases, + + as_paths=as_paths, + + rpki_statuses=rpki_statuses, + + update_type=update_type, + + monitor_ids=monitor_ids, + + communities=communities, + + _headers=self.te_headers("get_bgp_updates", error_status="403"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_get_bgp_updates_error_404(self) -> None: + """Integration test for get_bgp_updates error path (HTTP 404)""" + aid = '1234' + max = 20 + cursor = 'cursor_example' + expand = ["monitor"] + start_date = '2022-07-17T22:00:54Z' + end_date = '2022-07-18T22:00:54Z' + prefixes = ["192.0.2.0/24"] + origin_ases = [64512] + as_paths = ["64512 64513"] + rpki_statuses = [ + 'Valid' + ] + update_type = [ + 'announcement' + ] + monitor_ids = ["101"] + communities = ["64512:100"] + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 6 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(404) + ) as context: + self.api.get_bgp_updates( + + aid=aid, + + max=max, + + cursor=cursor, + + expand=expand, + + start_date=start_date, + + end_date=end_date, + + prefixes=prefixes, + + origin_ases=origin_ases, + + as_paths=as_paths, + + rpki_statuses=rpki_statuses, + + update_type=update_type, + + monitor_ids=monitor_ids, + + communities=communities, + + _headers=self.te_headers("get_bgp_updates", error_status="404"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_get_bgp_updates_error_429(self) -> None: + """Integration test for get_bgp_updates error path (HTTP 429)""" + aid = '1234' + max = 20 + cursor = 'cursor_example' + expand = ["monitor"] + start_date = '2022-07-17T22:00:54Z' + end_date = '2022-07-18T22:00:54Z' + prefixes = ["192.0.2.0/24"] + origin_ases = [64512] + as_paths = ["64512 64513"] + rpki_statuses = [ + 'Valid' + ] + update_type = [ + 'announcement' + ] + monitor_ids = ["101"] + communities = ["64512:100"] + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 6 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(429) + ) as context: + self.api.get_bgp_updates( + + aid=aid, + + max=max, + + cursor=cursor, + + expand=expand, + + start_date=start_date, + + end_date=end_date, + + prefixes=prefixes, + + origin_ases=origin_ases, + + as_paths=as_paths, + + rpki_statuses=rpki_statuses, + + update_type=update_type, + + monitor_ids=monitor_ids, + + communities=communities, + + _headers=self.te_headers("get_bgp_updates", error_status="429"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_get_bgp_updates_error_500(self) -> None: + """Integration test for get_bgp_updates error path (HTTP 500)""" + aid = '1234' + max = 20 + cursor = 'cursor_example' + expand = ["monitor"] + start_date = '2022-07-17T22:00:54Z' + end_date = '2022-07-18T22:00:54Z' + prefixes = ["192.0.2.0/24"] + origin_ases = [64512] + as_paths = ["64512 64513"] + rpki_statuses = [ + 'Valid' + ] + update_type = [ + 'announcement' + ] + monitor_ids = ["101"] + communities = ["64512:100"] + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 6 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(500) + ) as context: + self.api.get_bgp_updates( + + aid=aid, + + max=max, + + cursor=cursor, + + expand=expand, + + start_date=start_date, + + end_date=end_date, + + prefixes=prefixes, + + origin_ases=origin_ases, + + as_paths=as_paths, + + rpki_statuses=rpki_statuses, + + update_type=update_type, + + monitor_ids=monitor_ids, + + communities=communities, + + _headers=self.te_headers("get_bgp_updates", error_status="500"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_get_bgp_updates_error_502(self) -> None: + """Integration test for get_bgp_updates error path (HTTP 502)""" + aid = '1234' + max = 20 + cursor = 'cursor_example' + expand = ["monitor"] + start_date = '2022-07-17T22:00:54Z' + end_date = '2022-07-18T22:00:54Z' + prefixes = ["192.0.2.0/24"] + origin_ases = [64512] + as_paths = ["64512 64513"] + rpki_statuses = [ + 'Valid' + ] + update_type = [ + 'announcement' + ] + monitor_ids = ["101"] + communities = ["64512:100"] + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 6 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(502) + ) as context: + self.api.get_bgp_updates( + + aid=aid, + + max=max, + + cursor=cursor, + + expand=expand, + + start_date=start_date, + + end_date=end_date, + + prefixes=prefixes, + + origin_ases=origin_ases, + + as_paths=as_paths, + + rpki_statuses=rpki_statuses, + + update_type=update_type, + + monitor_ids=monitor_ids, + + communities=communities, + + _headers=self.te_headers("get_bgp_updates", error_status="502"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + + + + +if __name__ == '__main__': + unittest.main() diff --git a/thousandeyes-sdk-bgp-updates/test/test_utils.py b/thousandeyes-sdk-bgp-updates/test/test_utils.py new file mode 100644 index 000000000..37913f626 --- /dev/null +++ b/thousandeyes-sdk-bgp-updates/test/test_utils.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +import json +import unittest +from typing import Any + +from pydantic import BaseModel + + +def _project_onto_constructed(expected: Any, constructed: Any) -> Any: + """Keep only example fields that appear in the constructed model output.""" + if isinstance(constructed, dict): + if not isinstance(expected, dict): + return expected + return { + key: _project_onto_constructed(expected.get(key), value) + for key, value in constructed.items() + } + if isinstance(constructed, list): + if not isinstance(expected, list): + return expected + return [ + _project_onto_constructed(expected[index], value) + for index, value in enumerate(constructed) + ] + return expected + + +def assert_constructed_model_matches_example_json(model: BaseModel, loaded_json: dict): + test_case = unittest.TestCase() + test_case.maxDiff = None + test_case.assertIsNotNone(model) + constructed_json = json.loads(model.to_json()) + projected_loaded_json = _project_onto_constructed(loaded_json, constructed_json) + sorted_loaded_json = json.dumps(projected_loaded_json, sort_keys=True) + sorted_constructed_json = json.dumps(constructed_json, sort_keys=True) + test_case.assertEqual(sorted_loaded_json, sorted_constructed_json) diff --git a/thousandeyes-sdk-cloud-insights-integrations/.openapi-generator-ignore b/thousandeyes-sdk-cloud-insights-integrations/.openapi-generator-ignore new file mode 100644 index 000000000..7484ee590 --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/thousandeyes-sdk-cloud-insights-integrations/.openapi-generator/FILES b/thousandeyes-sdk-cloud-insights-integrations/.openapi-generator/FILES new file mode 100644 index 000000000..d87d06fa2 --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/.openapi-generator/FILES @@ -0,0 +1,68 @@ +.openapi-generator-ignore +MANIFEST.in +README.md +docs/AwsFlowLogsIntegrationRequest.md +docs/AwsIntegrationPolicySetting.md +docs/AwsInventoryIntegrationRequest.md +docs/AwsMonitoringIntegration.md +docs/AwsMonitoringIntegrations.md +docs/AwsRegion.md +docs/AwsResourceGroupType.md +docs/AzureFlowLogsIntegrationRequest.md +docs/AzureIntegrationPolicySetting.md +docs/AzureInventoryIntegrationRequest.md +docs/AzureMonitoringIntegration.md +docs/AzureMonitoringIntegrations.md +docs/AzureResourceGroupType.md +docs/CloudInsightsIntegrationPolicySettingsApi.md +docs/CloudInsightsIntegrationsApi.md +docs/Error.md +docs/Link.md +docs/SelfLinks.md +docs/SubscriptionsPolicy.md +docs/SubscriptionsPolicyRule.md +docs/SubscriptionsPolicyRuleAction.md +docs/SubscriptionsPolicyRuleField.md +docs/UnauthorizedError.md +docs/ValidationError.md +docs/ValidationErrorItem.md +pyproject.toml +setup.cfg +src/thousandeyes_sdk/cloud_insights_integrations/__init__.py +src/thousandeyes_sdk/cloud_insights_integrations/api/__init__.py +src/thousandeyes_sdk/cloud_insights_integrations/api/cloud_insights_integration_policy_settings_api.py +src/thousandeyes_sdk/cloud_insights_integrations/api/cloud_insights_integrations_api.py +src/thousandeyes_sdk/cloud_insights_integrations/models/__init__.py +src/thousandeyes_sdk/cloud_insights_integrations/models/aws_flow_logs_integration_request.py +src/thousandeyes_sdk/cloud_insights_integrations/models/aws_integration_policy_setting.py +src/thousandeyes_sdk/cloud_insights_integrations/models/aws_inventory_integration_request.py +src/thousandeyes_sdk/cloud_insights_integrations/models/aws_monitoring_integration.py +src/thousandeyes_sdk/cloud_insights_integrations/models/aws_monitoring_integrations.py +src/thousandeyes_sdk/cloud_insights_integrations/models/aws_region.py +src/thousandeyes_sdk/cloud_insights_integrations/models/aws_resource_group_type.py +src/thousandeyes_sdk/cloud_insights_integrations/models/azure_flow_logs_integration_request.py +src/thousandeyes_sdk/cloud_insights_integrations/models/azure_integration_policy_setting.py +src/thousandeyes_sdk/cloud_insights_integrations/models/azure_inventory_integration_request.py +src/thousandeyes_sdk/cloud_insights_integrations/models/azure_monitoring_integration.py +src/thousandeyes_sdk/cloud_insights_integrations/models/azure_monitoring_integrations.py +src/thousandeyes_sdk/cloud_insights_integrations/models/azure_resource_group_type.py +src/thousandeyes_sdk/cloud_insights_integrations/models/error.py +src/thousandeyes_sdk/cloud_insights_integrations/models/link.py +src/thousandeyes_sdk/cloud_insights_integrations/models/self_links.py +src/thousandeyes_sdk/cloud_insights_integrations/models/subscriptions_policy.py +src/thousandeyes_sdk/cloud_insights_integrations/models/subscriptions_policy_rule.py +src/thousandeyes_sdk/cloud_insights_integrations/models/subscriptions_policy_rule_action.py +src/thousandeyes_sdk/cloud_insights_integrations/models/subscriptions_policy_rule_field.py +src/thousandeyes_sdk/cloud_insights_integrations/models/unauthorized_error.py +src/thousandeyes_sdk/cloud_insights_integrations/models/validation_error.py +src/thousandeyes_sdk/cloud_insights_integrations/models/validation_error_item.py +src/thousandeyes_sdk/cloud_insights_integrations/py.typed +test/__init__.py +test/conftest.py +test/integration_test_utils.py +test/mock_manifest.py +test/test_cloud_insights_integration_policy_settings_api.py +test/test_cloud_insights_integration_policy_settings_api_integration.py +test/test_cloud_insights_integrations_api.py +test/test_cloud_insights_integrations_api_integration.py +test/test_utils.py diff --git a/thousandeyes-sdk-cloud-insights-integrations/.openapi-generator/VERSION b/thousandeyes-sdk-cloud-insights-integrations/.openapi-generator/VERSION new file mode 100644 index 000000000..93c8ddab9 --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.6.0 diff --git a/thousandeyes-sdk-cloud-insights-integrations/MANIFEST.in b/thousandeyes-sdk-cloud-insights-integrations/MANIFEST.in new file mode 100644 index 000000000..9a2248f55 --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/MANIFEST.in @@ -0,0 +1 @@ +include docs/* diff --git a/thousandeyes-sdk-cloud-insights-integrations/README.md b/thousandeyes-sdk-cloud-insights-integrations/README.md new file mode 100644 index 000000000..abe6fd329 --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/README.md @@ -0,0 +1,229 @@ +# thousandeyes-sdk-cloud-insights-integrations +**Note:** All Cloud Insights APIs are not available for ThousandEyes for Government instance. + +The Cloud Insights Integrations API lets you programmatically manage **AWS** and **Azure** monitoring integrations in ThousandEyes. + + +### What You Can Do + +- **List** all integrations. + +- **Get** details for a specific integration. + +- **Delete** an existing integration. + +- **Create** integrations for: + + - **AWS**: inventory monitoring and flow logs monitoring. + + - **Azure**: inventory monitoring and flow logs monitoring. + +- **Update** integrations for: + + - **Azure**: inventory monitoring and flow logs monitoring. + +- **Fetch AWS IAM policy documents** required to configure AWS inventory and flow-logs integrations. + +- **Retrieve** the current AWS and Azure integration policy settings to understand which AWS and Azure resource groups, AWS regions, Azure subscription rules are enabled and whether CloudTrail is enabled for Cloud Insights for inventory monitoring. + +- **Update** policy settings to change the approved AWS resource groups, AWS regions, and Azure subscription rules that ThousandEyes should inventory. + + +### Scope and Tenancy + +All operations are scoped to the authenticated account group. Responses include only resources associated with that group. + + +### Payloads and formats + +- **Requests:** `application/json` + +- **Responses:** primarily `application/hal+json` for resource representations and `application/json` for policy documents. + +- HAL responses include `_links` with a `self` relation for direct navigation. + + +### Integration Types + +- **Inventory monitoring** + + - AWS: reads inventory and network topology via read-only IAM permissions. + + - Azure: authenticates with a Service Principal to read inventory and network topology. + +- **Flow logs monitoring** + + - AWS: reads flow logs from S3 buckets and uses SNS for notifications. + + - Azure: reads flow logs via **Service Bus Queue** (`serviceBusQueueUrl`). + + +### Policy Helpers (AWS) + +Dedicated endpoints return **Trusted Policy**, **Permissions Policy**, and **SNS Topic Access Policy** documents to simplify role setup for inventory and flow logs integrations. + + +### Notes + +- All example values in this specification are **fictitious**. + + +For more information about Cloud Insights, see [Cloud Insights](https://docs.thousandeyes.com/product-documentation/cloud-insights). + + +This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: 7.0.104 +- Generator version: 7.6.0 +- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator + +## Requirements. + +Python 3.9+ + +## Installation & Usage +### pip install + +Install directly via PyPi: + +```sh +pip install thousandeyes-sdk-cloud-insights-integrations +``` +(you may need to run `pip` with root permission: `sudo pip install thousandeyes-sdk-cloud-insights-integrations`) + +Then import the package: +```python +import thousandeyes_sdk.cloud_insights_integrations +``` + +### Setuptools + +Install via [Setuptools](http://pypi.python.org/pypi/setuptools). + +```sh +python setup.py install --user +``` +(or `sudo python setup.py install` to install the package for all users) + +Then import the package: +```python +import thousandeyes_sdk.cloud_insights_integrations +``` + +### Tests + +Execute `pytest` to run the tests. + +## Getting Started + +Please follow the installation procedure and then run the following: + +```python + +import thousandeyes_sdk.core +import thousandeyes_sdk.cloud_insights_integrations +from thousandeyes_sdk.core.exceptions 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.cloud_insights_integrations.CloudInsightsIntegrationPolicySettingsApi(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: + # Get AWS integration policy settings + api_response = api_instance.get_aws_integration_policy_settings(aid=aid) + print("The response of CloudInsightsIntegrationPolicySettingsApi->get_aws_integration_policy_settings:\n") + pprint(api_response) + except ApiException as e: + print("Exception when calling CloudInsightsIntegrationPolicySettingsApi->get_aws_integration_policy_settings: %s\n" % e) + +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.thousandeyes.com/v7* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*CloudInsightsIntegrationPolicySettingsApi* | [**get_aws_integration_policy_settings**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-cloud-insights-integrations/docs/CloudInsightsIntegrationPolicySettingsApi.md#get_aws_integration_policy_settings) | **GET** /cloud-insights/integration/aws/policy/settings | Get AWS integration policy settings +*CloudInsightsIntegrationPolicySettingsApi* | [**get_azure_integration_policy_settings**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-cloud-insights-integrations/docs/CloudInsightsIntegrationPolicySettingsApi.md#get_azure_integration_policy_settings) | **GET** /cloud-insights/integration/azure/policy/settings | Get Azure integration policy settings +*CloudInsightsIntegrationPolicySettingsApi* | [**update_aws_integration_policy_settings**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-cloud-insights-integrations/docs/CloudInsightsIntegrationPolicySettingsApi.md#update_aws_integration_policy_settings) | **PUT** /cloud-insights/integration/aws/policy/settings | Update AWS integration policy settings +*CloudInsightsIntegrationPolicySettingsApi* | [**update_azure_integration_policy_settings**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-cloud-insights-integrations/docs/CloudInsightsIntegrationPolicySettingsApi.md#update_azure_integration_policy_settings) | **PUT** /cloud-insights/integration/azure/policy/settings | Update Azure integration policy settings +*CloudInsightsIntegrationsApi* | [**create_aws_flow_logs_monitoring_integration**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-cloud-insights-integrations/docs/CloudInsightsIntegrationsApi.md#create_aws_flow_logs_monitoring_integration) | **POST** /cloud-insights/integration/aws/flow-logs | Create AWS flow logs monitoring integration +*CloudInsightsIntegrationsApi* | [**create_aws_inventory_monitoring_integration**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-cloud-insights-integrations/docs/CloudInsightsIntegrationsApi.md#create_aws_inventory_monitoring_integration) | **POST** /cloud-insights/integration/aws/inventory | Create AWS inventory monitoring integration +*CloudInsightsIntegrationsApi* | [**create_azure_flow_logs_monitoring_integration**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-cloud-insights-integrations/docs/CloudInsightsIntegrationsApi.md#create_azure_flow_logs_monitoring_integration) | **POST** /cloud-insights/integration/azure/flow-logs | Create Azure flow logs monitoring integration +*CloudInsightsIntegrationsApi* | [**create_azure_inventory_monitoring_integration**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-cloud-insights-integrations/docs/CloudInsightsIntegrationsApi.md#create_azure_inventory_monitoring_integration) | **POST** /cloud-insights/integration/azure/inventory | Create Azure inventory monitoring integration +*CloudInsightsIntegrationsApi* | [**delete_aws_monitoring_integration**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-cloud-insights-integrations/docs/CloudInsightsIntegrationsApi.md#delete_aws_monitoring_integration) | **DELETE** /cloud-insights/integration/aws/{integrationId} | Delete AWS integration +*CloudInsightsIntegrationsApi* | [**delete_azure_monitoring_integration**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-cloud-insights-integrations/docs/CloudInsightsIntegrationsApi.md#delete_azure_monitoring_integration) | **DELETE** /cloud-insights/integration/azure/{integrationId} | Delete Azure integration +*CloudInsightsIntegrationsApi* | [**get_all_aws_monitoring_integrations**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-cloud-insights-integrations/docs/CloudInsightsIntegrationsApi.md#get_all_aws_monitoring_integrations) | **GET** /cloud-insights/integration/aws | List AWS integrations +*CloudInsightsIntegrationsApi* | [**get_all_azure_monitoring_integrations**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-cloud-insights-integrations/docs/CloudInsightsIntegrationsApi.md#get_all_azure_monitoring_integrations) | **GET** /cloud-insights/integration/azure | List Azure integrations +*CloudInsightsIntegrationsApi* | [**get_aws_flowlogs_monitoring_integration_policies**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-cloud-insights-integrations/docs/CloudInsightsIntegrationsApi.md#get_aws_flowlogs_monitoring_integration_policies) | **GET** /cloud-insights/integration/aws/flow-logs/policies | Get AWS flow logs monitoring IAM policies +*CloudInsightsIntegrationsApi* | [**get_aws_inventory_monitoring_integration_policies**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-cloud-insights-integrations/docs/CloudInsightsIntegrationsApi.md#get_aws_inventory_monitoring_integration_policies) | **GET** /cloud-insights/integration/aws/inventory/policies | Get AWS inventory monitoring IAM policies +*CloudInsightsIntegrationsApi* | [**get_aws_monitoring_integration**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-cloud-insights-integrations/docs/CloudInsightsIntegrationsApi.md#get_aws_monitoring_integration) | **GET** /cloud-insights/integration/aws/{integrationId} | Get AWS integration +*CloudInsightsIntegrationsApi* | [**get_azure_monitoring_integration**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-cloud-insights-integrations/docs/CloudInsightsIntegrationsApi.md#get_azure_monitoring_integration) | **GET** /cloud-insights/integration/azure/{integrationId} | Get Azure integration +*CloudInsightsIntegrationsApi* | [**update_azure_flow_logs_monitoring_integration**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-cloud-insights-integrations/docs/CloudInsightsIntegrationsApi.md#update_azure_flow_logs_monitoring_integration) | **PUT** /cloud-insights/integration/azure/flow-logs/{integrationId} | Update Azure flow logs monitoring integration +*CloudInsightsIntegrationsApi* | [**update_azure_inventory_monitoring_integration**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-cloud-insights-integrations/docs/CloudInsightsIntegrationsApi.md#update_azure_inventory_monitoring_integration) | **PUT** /cloud-insights/integration/azure/inventory/{integrationId} | Update Azure inventory monitoring integration + + +## Documentation For Models + + - [AwsFlowLogsIntegrationRequest](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-cloud-insights-integrations/docs/AwsFlowLogsIntegrationRequest.md) + - [AwsIntegrationPolicySetting](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-cloud-insights-integrations/docs/AwsIntegrationPolicySetting.md) + - [AwsInventoryIntegrationRequest](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-cloud-insights-integrations/docs/AwsInventoryIntegrationRequest.md) + - [AwsMonitoringIntegration](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-cloud-insights-integrations/docs/AwsMonitoringIntegration.md) + - [AwsMonitoringIntegrations](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-cloud-insights-integrations/docs/AwsMonitoringIntegrations.md) + - [AwsRegion](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-cloud-insights-integrations/docs/AwsRegion.md) + - [AwsResourceGroupType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-cloud-insights-integrations/docs/AwsResourceGroupType.md) + - [AzureFlowLogsIntegrationRequest](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-cloud-insights-integrations/docs/AzureFlowLogsIntegrationRequest.md) + - [AzureIntegrationPolicySetting](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-cloud-insights-integrations/docs/AzureIntegrationPolicySetting.md) + - [AzureInventoryIntegrationRequest](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-cloud-insights-integrations/docs/AzureInventoryIntegrationRequest.md) + - [AzureMonitoringIntegration](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-cloud-insights-integrations/docs/AzureMonitoringIntegration.md) + - [AzureMonitoringIntegrations](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-cloud-insights-integrations/docs/AzureMonitoringIntegrations.md) + - [AzureResourceGroupType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-cloud-insights-integrations/docs/AzureResourceGroupType.md) + - [Error](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-cloud-insights-integrations/docs/Error.md) + - [Link](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-cloud-insights-integrations/docs/Link.md) + - [SelfLinks](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-cloud-insights-integrations/docs/SelfLinks.md) + - [SubscriptionsPolicy](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-cloud-insights-integrations/docs/SubscriptionsPolicy.md) + - [SubscriptionsPolicyRule](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-cloud-insights-integrations/docs/SubscriptionsPolicyRule.md) + - [SubscriptionsPolicyRuleAction](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-cloud-insights-integrations/docs/SubscriptionsPolicyRuleAction.md) + - [SubscriptionsPolicyRuleField](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-cloud-insights-integrations/docs/SubscriptionsPolicyRuleField.md) + - [UnauthorizedError](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-cloud-insights-integrations/docs/UnauthorizedError.md) + - [ValidationError](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-cloud-insights-integrations/docs/ValidationError.md) + - [ValidationErrorItem](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-cloud-insights-integrations/docs/ValidationErrorItem.md) + + + +## Documentation For Authorization + + +Authentication schemes defined for the API: + +### BearerAuth + +- **Type**: Bearer authentication + + +## Author + +ThousandEyes API Team + + diff --git a/thousandeyes-sdk-cloud-insights-integrations/docs/AwsFlowLogsIntegrationRequest.md b/thousandeyes-sdk-cloud-insights-integrations/docs/AwsFlowLogsIntegrationRequest.md new file mode 100644 index 000000000..09130fd52 --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/docs/AwsFlowLogsIntegrationRequest.md @@ -0,0 +1,31 @@ +# AwsFlowLogsIntegrationRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | The name of the AWS flow logs monitoring integration. | +**role_arn** | **str** | The ARN of the AWS role to be monitored. | +**sns_topics_arns** | **List[str]** | The array of SNS topics ARNs. | + +## Example + +```python +from thousandeyes_sdk.cloud_insights_integrations.models.aws_flow_logs_integration_request import AwsFlowLogsIntegrationRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of AwsFlowLogsIntegrationRequest from a JSON string +aws_flow_logs_integration_request_instance = AwsFlowLogsIntegrationRequest.from_json(json) +# print the JSON string representation of the object +print(AwsFlowLogsIntegrationRequest.to_json()) + +# convert the object into a dict +aws_flow_logs_integration_request_dict = aws_flow_logs_integration_request_instance.to_dict() +# create an instance of AwsFlowLogsIntegrationRequest from a dict +aws_flow_logs_integration_request_from_dict = AwsFlowLogsIntegrationRequest.from_dict(aws_flow_logs_integration_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-cloud-insights-integrations/docs/AwsIntegrationPolicySetting.md b/thousandeyes-sdk-cloud-insights-integrations/docs/AwsIntegrationPolicySetting.md new file mode 100644 index 000000000..7e67e8c21 --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/docs/AwsIntegrationPolicySetting.md @@ -0,0 +1,33 @@ +# AwsIntegrationPolicySetting + +AWS integration policy configuration that controls which resource groups and regions ThousandEyes inventories, and whether CloudTrail is enabled. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enabled_resource_group_types** | [**List[AwsResourceGroupType]**](AwsResourceGroupType.md) | The set of AWS resource group types included in inventory monitoring. | +**enabled_regions** | [**List[AwsRegion]**](AwsRegion.md) | The AWS regions that ThousandEyes inventories for the account group. | +**enabled_cloudtrail** | **bool** | Indicates whether CloudTrail integration is enabled for AWS inventory monitoring. | +**links** | [**SelfLinks**](SelfLinks.md) | | [optional] + +## Example + +```python +from thousandeyes_sdk.cloud_insights_integrations.models.aws_integration_policy_setting import AwsIntegrationPolicySetting + +# TODO update the JSON string below +json = "{}" +# create an instance of AwsIntegrationPolicySetting from a JSON string +aws_integration_policy_setting_instance = AwsIntegrationPolicySetting.from_json(json) +# print the JSON string representation of the object +print(AwsIntegrationPolicySetting.to_json()) + +# convert the object into a dict +aws_integration_policy_setting_dict = aws_integration_policy_setting_instance.to_dict() +# create an instance of AwsIntegrationPolicySetting from a dict +aws_integration_policy_setting_from_dict = AwsIntegrationPolicySetting.from_dict(aws_integration_policy_setting_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) + + diff --git a/thousandeyes-sdk-cloud-insights-integrations/docs/AwsInventoryIntegrationRequest.md b/thousandeyes-sdk-cloud-insights-integrations/docs/AwsInventoryIntegrationRequest.md new file mode 100644 index 000000000..d2daac1b8 --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/docs/AwsInventoryIntegrationRequest.md @@ -0,0 +1,30 @@ +# AwsInventoryIntegrationRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | The name of the AWS inventory monitoring integration. | +**role_arn** | **str** | The ARN of the AWS role to be monitored. | + +## Example + +```python +from thousandeyes_sdk.cloud_insights_integrations.models.aws_inventory_integration_request import AwsInventoryIntegrationRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of AwsInventoryIntegrationRequest from a JSON string +aws_inventory_integration_request_instance = AwsInventoryIntegrationRequest.from_json(json) +# print the JSON string representation of the object +print(AwsInventoryIntegrationRequest.to_json()) + +# convert the object into a dict +aws_inventory_integration_request_dict = aws_inventory_integration_request_instance.to_dict() +# create an instance of AwsInventoryIntegrationRequest from a dict +aws_inventory_integration_request_from_dict = AwsInventoryIntegrationRequest.from_dict(aws_inventory_integration_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-cloud-insights-integrations/docs/AwsMonitoringIntegration.md b/thousandeyes-sdk-cloud-insights-integrations/docs/AwsMonitoringIntegration.md new file mode 100644 index 000000000..78f1bda1e --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/docs/AwsMonitoringIntegration.md @@ -0,0 +1,35 @@ +# AwsMonitoringIntegration + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | The unique ID for the AWS inventory or flow logs monitoring integration. | +**name** | **str** | The name of the AWS inventory or flow logs monitoring integration. | +**role_arn** | **str** | The ARN of the AWS role to be monitored. | +**external_id** | **str** | The external ID associated with the account group. | +**monitoring_type** | **str** | The type of monitoring integration. | +**sns_topics_arns** | **List[str]** | The array of SNS topic ARNs. Relevant only for flow logs monitoring integrations. | [optional] +**links** | [**SelfLinks**](SelfLinks.md) | | [optional] + +## Example + +```python +from thousandeyes_sdk.cloud_insights_integrations.models.aws_monitoring_integration import AwsMonitoringIntegration + +# TODO update the JSON string below +json = "{}" +# create an instance of AwsMonitoringIntegration from a JSON string +aws_monitoring_integration_instance = AwsMonitoringIntegration.from_json(json) +# print the JSON string representation of the object +print(AwsMonitoringIntegration.to_json()) + +# convert the object into a dict +aws_monitoring_integration_dict = aws_monitoring_integration_instance.to_dict() +# create an instance of AwsMonitoringIntegration from a dict +aws_monitoring_integration_from_dict = AwsMonitoringIntegration.from_dict(aws_monitoring_integration_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) + + diff --git a/thousandeyes-sdk-cloud-insights-integrations/docs/AwsMonitoringIntegrations.md b/thousandeyes-sdk-cloud-insights-integrations/docs/AwsMonitoringIntegrations.md new file mode 100644 index 000000000..d8ac5cc59 --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/docs/AwsMonitoringIntegrations.md @@ -0,0 +1,31 @@ +# AwsMonitoringIntegrations + +A HAL resource containing a list of AWS monitoring integrations and navigation links. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**integrations** | [**List[AwsMonitoringIntegration]**](AwsMonitoringIntegration.md) | The list of AWS inventory and flow logs monitoring integrations. | +**links** | [**SelfLinks**](SelfLinks.md) | | [optional] + +## Example + +```python +from thousandeyes_sdk.cloud_insights_integrations.models.aws_monitoring_integrations import AwsMonitoringIntegrations + +# TODO update the JSON string below +json = "{}" +# create an instance of AwsMonitoringIntegrations from a JSON string +aws_monitoring_integrations_instance = AwsMonitoringIntegrations.from_json(json) +# print the JSON string representation of the object +print(AwsMonitoringIntegrations.to_json()) + +# convert the object into a dict +aws_monitoring_integrations_dict = aws_monitoring_integrations_instance.to_dict() +# create an instance of AwsMonitoringIntegrations from a dict +aws_monitoring_integrations_from_dict = AwsMonitoringIntegrations.from_dict(aws_monitoring_integrations_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) + + diff --git a/thousandeyes-sdk-cloud-insights-integrations/docs/AwsRegion.md b/thousandeyes-sdk-cloud-insights-integrations/docs/AwsRegion.md new file mode 100644 index 000000000..d8920f4ef --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/docs/AwsRegion.md @@ -0,0 +1,12 @@ +# AwsRegion + +AWS region identifier that can be enabled for Cloud Insights inventory monitoring. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-cloud-insights-integrations/docs/AwsResourceGroupType.md b/thousandeyes-sdk-cloud-insights-integrations/docs/AwsResourceGroupType.md new file mode 100644 index 000000000..bff9b845f --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/docs/AwsResourceGroupType.md @@ -0,0 +1,12 @@ +# AwsResourceGroupType + +Supported AWS resource group types that can be toggled within policy settings. Note that ec2 is a mandatory resource group type and will be enabled regardless of user configuration. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-cloud-insights-integrations/docs/AzureFlowLogsIntegrationRequest.md b/thousandeyes-sdk-cloud-insights-integrations/docs/AzureFlowLogsIntegrationRequest.md new file mode 100644 index 000000000..61b6f2dcd --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/docs/AzureFlowLogsIntegrationRequest.md @@ -0,0 +1,33 @@ +# AzureFlowLogsIntegrationRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | The name of the Azure flow logs monitoring integration. | +**app_id** | **str** | The Application (client) ID of the service principal. | +**password** | **str** | The client secret value. | +**azure_tenant_id** | **str** | The Azure Active Directory tenant ID. | +**service_bus_queue_url** | **str** | The URL of the Service Bus Queue. | + +## Example + +```python +from thousandeyes_sdk.cloud_insights_integrations.models.azure_flow_logs_integration_request import AzureFlowLogsIntegrationRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of AzureFlowLogsIntegrationRequest from a JSON string +azure_flow_logs_integration_request_instance = AzureFlowLogsIntegrationRequest.from_json(json) +# print the JSON string representation of the object +print(AzureFlowLogsIntegrationRequest.to_json()) + +# convert the object into a dict +azure_flow_logs_integration_request_dict = azure_flow_logs_integration_request_instance.to_dict() +# create an instance of AzureFlowLogsIntegrationRequest from a dict +azure_flow_logs_integration_request_from_dict = AzureFlowLogsIntegrationRequest.from_dict(azure_flow_logs_integration_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-cloud-insights-integrations/docs/AzureIntegrationPolicySetting.md b/thousandeyes-sdk-cloud-insights-integrations/docs/AzureIntegrationPolicySetting.md new file mode 100644 index 000000000..02c52bb6b --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/docs/AzureIntegrationPolicySetting.md @@ -0,0 +1,32 @@ +# AzureIntegrationPolicySetting + +Azure integration policy configuration that defines the monitored Azure resource groups and the subscription policy that ThousandEyes enforces. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enabled_resource_group_types** | [**List[AzureResourceGroupType]**](AzureResourceGroupType.md) | The set of Azure resource group types included in inventory monitoring. | +**subscriptions_policy** | [**SubscriptionsPolicy**](SubscriptionsPolicy.md) | | +**links** | [**SelfLinks**](SelfLinks.md) | | [optional] + +## Example + +```python +from thousandeyes_sdk.cloud_insights_integrations.models.azure_integration_policy_setting import AzureIntegrationPolicySetting + +# TODO update the JSON string below +json = "{}" +# create an instance of AzureIntegrationPolicySetting from a JSON string +azure_integration_policy_setting_instance = AzureIntegrationPolicySetting.from_json(json) +# print the JSON string representation of the object +print(AzureIntegrationPolicySetting.to_json()) + +# convert the object into a dict +azure_integration_policy_setting_dict = azure_integration_policy_setting_instance.to_dict() +# create an instance of AzureIntegrationPolicySetting from a dict +azure_integration_policy_setting_from_dict = AzureIntegrationPolicySetting.from_dict(azure_integration_policy_setting_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) + + diff --git a/thousandeyes-sdk-cloud-insights-integrations/docs/AzureInventoryIntegrationRequest.md b/thousandeyes-sdk-cloud-insights-integrations/docs/AzureInventoryIntegrationRequest.md new file mode 100644 index 000000000..13c09465d --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/docs/AzureInventoryIntegrationRequest.md @@ -0,0 +1,32 @@ +# AzureInventoryIntegrationRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | The name of the Azure inventory monitoring integration. | +**app_id** | **str** | The Application (client) ID of the service principal. | +**password** | **str** | The client secret value. | +**azure_tenant_id** | **str** | The Azure Active Directory tenant ID. | + +## Example + +```python +from thousandeyes_sdk.cloud_insights_integrations.models.azure_inventory_integration_request import AzureInventoryIntegrationRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of AzureInventoryIntegrationRequest from a JSON string +azure_inventory_integration_request_instance = AzureInventoryIntegrationRequest.from_json(json) +# print the JSON string representation of the object +print(AzureInventoryIntegrationRequest.to_json()) + +# convert the object into a dict +azure_inventory_integration_request_dict = azure_inventory_integration_request_instance.to_dict() +# create an instance of AzureInventoryIntegrationRequest from a dict +azure_inventory_integration_request_from_dict = AzureInventoryIntegrationRequest.from_dict(azure_inventory_integration_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-cloud-insights-integrations/docs/AzureMonitoringIntegration.md b/thousandeyes-sdk-cloud-insights-integrations/docs/AzureMonitoringIntegration.md new file mode 100644 index 000000000..54323e2df --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/docs/AzureMonitoringIntegration.md @@ -0,0 +1,36 @@ +# AzureMonitoringIntegration + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | The unique ID for the Azure inventory or flow logs monitoring integration. | +**name** | **str** | The name of the Azure inventory or flow logs monitoring integration. | +**app_id** | **str** | The Application (client) ID of the service principal. | +**password** | **str** | The client secret value. For security reasons, the client secret value is masked. | +**azure_tenant_id** | **str** | The Azure Active Directory tenant ID. | +**service_bus_queue_url** | **str** | The URL of the Service Bus Queue. Relevant only for flow logs monitoring integrations. | [optional] +**monitoring_type** | **str** | The type of monitoring integration. | +**links** | [**SelfLinks**](SelfLinks.md) | | [optional] + +## Example + +```python +from thousandeyes_sdk.cloud_insights_integrations.models.azure_monitoring_integration import AzureMonitoringIntegration + +# TODO update the JSON string below +json = "{}" +# create an instance of AzureMonitoringIntegration from a JSON string +azure_monitoring_integration_instance = AzureMonitoringIntegration.from_json(json) +# print the JSON string representation of the object +print(AzureMonitoringIntegration.to_json()) + +# convert the object into a dict +azure_monitoring_integration_dict = azure_monitoring_integration_instance.to_dict() +# create an instance of AzureMonitoringIntegration from a dict +azure_monitoring_integration_from_dict = AzureMonitoringIntegration.from_dict(azure_monitoring_integration_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) + + diff --git a/thousandeyes-sdk-cloud-insights-integrations/docs/AzureMonitoringIntegrations.md b/thousandeyes-sdk-cloud-insights-integrations/docs/AzureMonitoringIntegrations.md new file mode 100644 index 000000000..e1502b343 --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/docs/AzureMonitoringIntegrations.md @@ -0,0 +1,31 @@ +# AzureMonitoringIntegrations + +A HAL resource containing a list of Azure inventory and flow logs monitoring integrations. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**integrations** | [**List[AzureMonitoringIntegration]**](AzureMonitoringIntegration.md) | The list of Azure inventory and flow logs monitoring integrations. | +**links** | [**SelfLinks**](SelfLinks.md) | | [optional] + +## Example + +```python +from thousandeyes_sdk.cloud_insights_integrations.models.azure_monitoring_integrations import AzureMonitoringIntegrations + +# TODO update the JSON string below +json = "{}" +# create an instance of AzureMonitoringIntegrations from a JSON string +azure_monitoring_integrations_instance = AzureMonitoringIntegrations.from_json(json) +# print the JSON string representation of the object +print(AzureMonitoringIntegrations.to_json()) + +# convert the object into a dict +azure_monitoring_integrations_dict = azure_monitoring_integrations_instance.to_dict() +# create an instance of AzureMonitoringIntegrations from a dict +azure_monitoring_integrations_from_dict = AzureMonitoringIntegrations.from_dict(azure_monitoring_integrations_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) + + diff --git a/thousandeyes-sdk-cloud-insights-integrations/docs/AzureResourceGroupType.md b/thousandeyes-sdk-cloud-insights-integrations/docs/AzureResourceGroupType.md new file mode 100644 index 000000000..476b9ecaa --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/docs/AzureResourceGroupType.md @@ -0,0 +1,12 @@ +# AzureResourceGroupType + +Supported Azure resource group types that can be toggled within policy settings. Note that networking is a mandatory resource group type and will be enabled regardless of user configuration. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-cloud-insights-integrations/docs/CloudInsightsIntegrationPolicySettingsApi.md b/thousandeyes-sdk-cloud-insights-integrations/docs/CloudInsightsIntegrationPolicySettingsApi.md new file mode 100644 index 000000000..fbc2fc95b --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/docs/CloudInsightsIntegrationPolicySettingsApi.md @@ -0,0 +1,350 @@ +# thousandeyes_sdk.cloud_insights_integrations.CloudInsightsIntegrationPolicySettingsApi + +All URIs are relative to *https://api.thousandeyes.com/v7* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_aws_integration_policy_settings**](CloudInsightsIntegrationPolicySettingsApi.md#get_aws_integration_policy_settings) | **GET** /cloud-insights/integration/aws/policy/settings | Get AWS integration policy settings +[**get_azure_integration_policy_settings**](CloudInsightsIntegrationPolicySettingsApi.md#get_azure_integration_policy_settings) | **GET** /cloud-insights/integration/azure/policy/settings | Get Azure integration policy settings +[**update_aws_integration_policy_settings**](CloudInsightsIntegrationPolicySettingsApi.md#update_aws_integration_policy_settings) | **PUT** /cloud-insights/integration/aws/policy/settings | Update AWS integration policy settings +[**update_azure_integration_policy_settings**](CloudInsightsIntegrationPolicySettingsApi.md#update_azure_integration_policy_settings) | **PUT** /cloud-insights/integration/azure/policy/settings | Update Azure integration policy settings + + +# **get_aws_integration_policy_settings** +> AwsIntegrationPolicySetting get_aws_integration_policy_settings(aid=aid) + +Get AWS integration policy settings + +Retrieves the AWS integration policy settings for the authenticated account group. Use this endpoint to audit which AWS resource group types and AWS regions are enabled, and whether CloudTrail is enabled, for Cloud Insights inventory monitoring. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.cloud_insights_integrations +from thousandeyes_sdk.cloud_insights_integrations.models.aws_integration_policy_setting import AwsIntegrationPolicySetting +from thousandeyes_sdk.cloud_insights_integrations.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.cloud_insights_integrations.CloudInsightsIntegrationPolicySettingsApi(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: + # Get AWS integration policy settings + api_response = api_instance.get_aws_integration_policy_settings(aid=aid) + print("The response of CloudInsightsIntegrationPolicySettingsApi->get_aws_integration_policy_settings:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CloudInsightsIntegrationPolicySettingsApi->get_aws_integration_policy_settings: %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 + +[**AwsIntegrationPolicySetting**](AwsIntegrationPolicySetting.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** | AWS integration policy settings returned successfully. | - | +**401** | Unauthorized | - | +**403** | Insufficient permissions to query endpoint | - | +**404** | Not found | - | +**429** | Exhausted rate limit for the organization | - | +**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_azure_integration_policy_settings** +> AzureIntegrationPolicySetting get_azure_integration_policy_settings(aid=aid) + +Get Azure integration policy settings + +Retrieves the Azure integration policy settings for the authenticated account group. Use this endpoint to review which Azure resource group types are monitored and inspect the subscriptions policy rules that gate which subscriptions ThousandEyes inventories. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.cloud_insights_integrations +from thousandeyes_sdk.cloud_insights_integrations.models.azure_integration_policy_setting import AzureIntegrationPolicySetting +from thousandeyes_sdk.cloud_insights_integrations.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.cloud_insights_integrations.CloudInsightsIntegrationPolicySettingsApi(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: + # Get Azure integration policy settings + api_response = api_instance.get_azure_integration_policy_settings(aid=aid) + print("The response of CloudInsightsIntegrationPolicySettingsApi->get_azure_integration_policy_settings:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CloudInsightsIntegrationPolicySettingsApi->get_azure_integration_policy_settings: %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 + +[**AzureIntegrationPolicySetting**](AzureIntegrationPolicySetting.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** | Azure integration policy settings returned successfully. | - | +**401** | Unauthorized | - | +**403** | Insufficient permissions to query endpoint | - | +**404** | Not found | - | +**429** | Exhausted rate limit for the organization | - | +**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_aws_integration_policy_settings** +> AwsIntegrationPolicySetting update_aws_integration_policy_settings(aws_integration_policy_setting, aid=aid) + +Update AWS integration policy settings + +Updates the AWS integration policy settings for the authenticated account group. This endpoint lets you enable or disable specific AWS resource group types, adjust the set of AWS regions to inventory, and control whether CloudTrail is enabled for inventory monitoring. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.cloud_insights_integrations +from thousandeyes_sdk.cloud_insights_integrations.models.aws_integration_policy_setting import AwsIntegrationPolicySetting +from thousandeyes_sdk.cloud_insights_integrations.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.cloud_insights_integrations.CloudInsightsIntegrationPolicySettingsApi(api_client) + aws_integration_policy_setting = thousandeyes_sdk.cloud_insights_integrations.AwsIntegrationPolicySetting() # AwsIntegrationPolicySetting | + 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 AWS integration policy settings + api_response = api_instance.update_aws_integration_policy_settings(aws_integration_policy_setting, aid=aid) + print("The response of CloudInsightsIntegrationPolicySettingsApi->update_aws_integration_policy_settings:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CloudInsightsIntegrationPolicySettingsApi->update_aws_integration_policy_settings: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **aws_integration_policy_setting** | [**AwsIntegrationPolicySetting**](AwsIntegrationPolicySetting.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 + +[**AwsIntegrationPolicySetting**](AwsIntegrationPolicySetting.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** | AWS integration policy settings updated successfully. | - | +**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 | - | + +[[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_azure_integration_policy_settings** +> AzureIntegrationPolicySetting update_azure_integration_policy_settings(azure_integration_policy_setting, aid=aid) + +Update Azure integration policy settings + +Updates the Azure integration policy settings for the authenticated account group. This endpoint lets you enable or disable Azure resource group types and manage the subscriptions policy (rules plus default action) that controls which Azure subscriptions are inventoried. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.cloud_insights_integrations +from thousandeyes_sdk.cloud_insights_integrations.models.azure_integration_policy_setting import AzureIntegrationPolicySetting +from thousandeyes_sdk.cloud_insights_integrations.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.cloud_insights_integrations.CloudInsightsIntegrationPolicySettingsApi(api_client) + azure_integration_policy_setting = thousandeyes_sdk.cloud_insights_integrations.AzureIntegrationPolicySetting() # AzureIntegrationPolicySetting | + 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 Azure integration policy settings + api_response = api_instance.update_azure_integration_policy_settings(azure_integration_policy_setting, aid=aid) + print("The response of CloudInsightsIntegrationPolicySettingsApi->update_azure_integration_policy_settings:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CloudInsightsIntegrationPolicySettingsApi->update_azure_integration_policy_settings: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **azure_integration_policy_setting** | [**AzureIntegrationPolicySetting**](AzureIntegrationPolicySetting.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 + +[**AzureIntegrationPolicySetting**](AzureIntegrationPolicySetting.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** | Azure integration policy settings updated successfully. | - | +**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 | - | + +[[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) + diff --git a/thousandeyes-sdk-cloud-insights-integrations/docs/CloudInsightsIntegrationsApi.md b/thousandeyes-sdk-cloud-insights-integrations/docs/CloudInsightsIntegrationsApi.md new file mode 100644 index 000000000..0131932dc --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/docs/CloudInsightsIntegrationsApi.md @@ -0,0 +1,1212 @@ +# thousandeyes_sdk.cloud_insights_integrations.CloudInsightsIntegrationsApi + +All URIs are relative to *https://api.thousandeyes.com/v7* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_aws_flow_logs_monitoring_integration**](CloudInsightsIntegrationsApi.md#create_aws_flow_logs_monitoring_integration) | **POST** /cloud-insights/integration/aws/flow-logs | Create AWS flow logs monitoring integration +[**create_aws_inventory_monitoring_integration**](CloudInsightsIntegrationsApi.md#create_aws_inventory_monitoring_integration) | **POST** /cloud-insights/integration/aws/inventory | Create AWS inventory monitoring integration +[**create_azure_flow_logs_monitoring_integration**](CloudInsightsIntegrationsApi.md#create_azure_flow_logs_monitoring_integration) | **POST** /cloud-insights/integration/azure/flow-logs | Create Azure flow logs monitoring integration +[**create_azure_inventory_monitoring_integration**](CloudInsightsIntegrationsApi.md#create_azure_inventory_monitoring_integration) | **POST** /cloud-insights/integration/azure/inventory | Create Azure inventory monitoring integration +[**delete_aws_monitoring_integration**](CloudInsightsIntegrationsApi.md#delete_aws_monitoring_integration) | **DELETE** /cloud-insights/integration/aws/{integrationId} | Delete AWS integration +[**delete_azure_monitoring_integration**](CloudInsightsIntegrationsApi.md#delete_azure_monitoring_integration) | **DELETE** /cloud-insights/integration/azure/{integrationId} | Delete Azure integration +[**get_all_aws_monitoring_integrations**](CloudInsightsIntegrationsApi.md#get_all_aws_monitoring_integrations) | **GET** /cloud-insights/integration/aws | List AWS integrations +[**get_all_azure_monitoring_integrations**](CloudInsightsIntegrationsApi.md#get_all_azure_monitoring_integrations) | **GET** /cloud-insights/integration/azure | List Azure integrations +[**get_aws_flowlogs_monitoring_integration_policies**](CloudInsightsIntegrationsApi.md#get_aws_flowlogs_monitoring_integration_policies) | **GET** /cloud-insights/integration/aws/flow-logs/policies | Get AWS flow logs monitoring IAM policies +[**get_aws_inventory_monitoring_integration_policies**](CloudInsightsIntegrationsApi.md#get_aws_inventory_monitoring_integration_policies) | **GET** /cloud-insights/integration/aws/inventory/policies | Get AWS inventory monitoring IAM policies +[**get_aws_monitoring_integration**](CloudInsightsIntegrationsApi.md#get_aws_monitoring_integration) | **GET** /cloud-insights/integration/aws/{integrationId} | Get AWS integration +[**get_azure_monitoring_integration**](CloudInsightsIntegrationsApi.md#get_azure_monitoring_integration) | **GET** /cloud-insights/integration/azure/{integrationId} | Get Azure integration +[**update_azure_flow_logs_monitoring_integration**](CloudInsightsIntegrationsApi.md#update_azure_flow_logs_monitoring_integration) | **PUT** /cloud-insights/integration/azure/flow-logs/{integrationId} | Update Azure flow logs monitoring integration +[**update_azure_inventory_monitoring_integration**](CloudInsightsIntegrationsApi.md#update_azure_inventory_monitoring_integration) | **PUT** /cloud-insights/integration/azure/inventory/{integrationId} | Update Azure inventory monitoring integration + + +# **create_aws_flow_logs_monitoring_integration** +> AwsMonitoringIntegration create_aws_flow_logs_monitoring_integration(aws_flow_logs_integration_request, aid=aid) + +Create AWS flow logs monitoring integration + +Creates a new AWS flow logs monitoring integration. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.cloud_insights_integrations +from thousandeyes_sdk.cloud_insights_integrations.models.aws_flow_logs_integration_request import AwsFlowLogsIntegrationRequest +from thousandeyes_sdk.cloud_insights_integrations.models.aws_monitoring_integration import AwsMonitoringIntegration +from thousandeyes_sdk.cloud_insights_integrations.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.cloud_insights_integrations.CloudInsightsIntegrationsApi(api_client) + aws_flow_logs_integration_request = thousandeyes_sdk.cloud_insights_integrations.AwsFlowLogsIntegrationRequest() # AwsFlowLogsIntegrationRequest | + 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 AWS flow logs monitoring integration + api_response = api_instance.create_aws_flow_logs_monitoring_integration(aws_flow_logs_integration_request, aid=aid) + print("The response of CloudInsightsIntegrationsApi->create_aws_flow_logs_monitoring_integration:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CloudInsightsIntegrationsApi->create_aws_flow_logs_monitoring_integration: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **aws_flow_logs_integration_request** | [**AwsFlowLogsIntegrationRequest**](AwsFlowLogsIntegrationRequest.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 + +[**AwsMonitoringIntegration**](AwsMonitoringIntegration.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** | AWS flow logs monitoring integration created successfully. | - | +**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 | - | + +[[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) + +# **create_aws_inventory_monitoring_integration** +> AwsMonitoringIntegration create_aws_inventory_monitoring_integration(aws_inventory_integration_request, aid=aid) + +Create AWS inventory monitoring integration + +Creates a new AWS inventory monitoring integration. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.cloud_insights_integrations +from thousandeyes_sdk.cloud_insights_integrations.models.aws_inventory_integration_request import AwsInventoryIntegrationRequest +from thousandeyes_sdk.cloud_insights_integrations.models.aws_monitoring_integration import AwsMonitoringIntegration +from thousandeyes_sdk.cloud_insights_integrations.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.cloud_insights_integrations.CloudInsightsIntegrationsApi(api_client) + aws_inventory_integration_request = thousandeyes_sdk.cloud_insights_integrations.AwsInventoryIntegrationRequest() # AwsInventoryIntegrationRequest | + 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 AWS inventory monitoring integration + api_response = api_instance.create_aws_inventory_monitoring_integration(aws_inventory_integration_request, aid=aid) + print("The response of CloudInsightsIntegrationsApi->create_aws_inventory_monitoring_integration:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CloudInsightsIntegrationsApi->create_aws_inventory_monitoring_integration: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **aws_inventory_integration_request** | [**AwsInventoryIntegrationRequest**](AwsInventoryIntegrationRequest.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 + +[**AwsMonitoringIntegration**](AwsMonitoringIntegration.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** | AWS inventory monitoring integration created successfully. | - | +**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 | - | + +[[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) + +# **create_azure_flow_logs_monitoring_integration** +> AzureMonitoringIntegration create_azure_flow_logs_monitoring_integration(azure_flow_logs_integration_request, aid=aid) + +Create Azure flow logs monitoring integration + +Creates a new Azure flow logs monitoring integration. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.cloud_insights_integrations +from thousandeyes_sdk.cloud_insights_integrations.models.azure_flow_logs_integration_request import AzureFlowLogsIntegrationRequest +from thousandeyes_sdk.cloud_insights_integrations.models.azure_monitoring_integration import AzureMonitoringIntegration +from thousandeyes_sdk.cloud_insights_integrations.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.cloud_insights_integrations.CloudInsightsIntegrationsApi(api_client) + azure_flow_logs_integration_request = thousandeyes_sdk.cloud_insights_integrations.AzureFlowLogsIntegrationRequest() # AzureFlowLogsIntegrationRequest | + 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 Azure flow logs monitoring integration + api_response = api_instance.create_azure_flow_logs_monitoring_integration(azure_flow_logs_integration_request, aid=aid) + print("The response of CloudInsightsIntegrationsApi->create_azure_flow_logs_monitoring_integration:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CloudInsightsIntegrationsApi->create_azure_flow_logs_monitoring_integration: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **azure_flow_logs_integration_request** | [**AzureFlowLogsIntegrationRequest**](AzureFlowLogsIntegrationRequest.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 + +[**AzureMonitoringIntegration**](AzureMonitoringIntegration.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** | Azure flow logs monitoring integration created successfully. | - | +**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 | - | + +[[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) + +# **create_azure_inventory_monitoring_integration** +> AzureMonitoringIntegration create_azure_inventory_monitoring_integration(azure_inventory_integration_request, aid=aid) + +Create Azure inventory monitoring integration + +Creates a new Azure inventory monitoring integration. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.cloud_insights_integrations +from thousandeyes_sdk.cloud_insights_integrations.models.azure_inventory_integration_request import AzureInventoryIntegrationRequest +from thousandeyes_sdk.cloud_insights_integrations.models.azure_monitoring_integration import AzureMonitoringIntegration +from thousandeyes_sdk.cloud_insights_integrations.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.cloud_insights_integrations.CloudInsightsIntegrationsApi(api_client) + azure_inventory_integration_request = thousandeyes_sdk.cloud_insights_integrations.AzureInventoryIntegrationRequest() # AzureInventoryIntegrationRequest | + 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 Azure inventory monitoring integration + api_response = api_instance.create_azure_inventory_monitoring_integration(azure_inventory_integration_request, aid=aid) + print("The response of CloudInsightsIntegrationsApi->create_azure_inventory_monitoring_integration:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CloudInsightsIntegrationsApi->create_azure_inventory_monitoring_integration: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **azure_inventory_integration_request** | [**AzureInventoryIntegrationRequest**](AzureInventoryIntegrationRequest.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 + +[**AzureMonitoringIntegration**](AzureMonitoringIntegration.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** | Azure inventory monitoring integration created successfully. | - | +**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 | - | + +[[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_aws_monitoring_integration** +> delete_aws_monitoring_integration(integration_id, aid=aid) + +Delete AWS integration + +Deletes a specific AWS inventory or flow logs monitoring integration using the AWS integration ID. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.cloud_insights_integrations +from thousandeyes_sdk.cloud_insights_integrations.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.cloud_insights_integrations.CloudInsightsIntegrationsApi(api_client) + integration_id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569' # str | The unique ID of the AWS or Azure inventory or flow logs monitoring integration. + 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 AWS integration + api_instance.delete_aws_monitoring_integration(integration_id, aid=aid) + except Exception as e: + print("Exception when calling CloudInsightsIntegrationsApi->delete_aws_monitoring_integration: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **integration_id** | **str**| The unique ID of the AWS or Azure inventory or flow logs monitoring integration. | + **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 | - | +**429** | Exhausted rate limit for the organization | - | +**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_azure_monitoring_integration** +> delete_azure_monitoring_integration(integration_id, aid=aid) + +Delete Azure integration + +Deletes a specific Azure inventory or flow logs monitoring integration using the Azure integration ID. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.cloud_insights_integrations +from thousandeyes_sdk.cloud_insights_integrations.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.cloud_insights_integrations.CloudInsightsIntegrationsApi(api_client) + integration_id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569' # str | The unique ID of the AWS or Azure inventory or flow logs monitoring integration. + 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 Azure integration + api_instance.delete_azure_monitoring_integration(integration_id, aid=aid) + except Exception as e: + print("Exception when calling CloudInsightsIntegrationsApi->delete_azure_monitoring_integration: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **integration_id** | **str**| The unique ID of the AWS or Azure inventory or flow logs monitoring integration. | + **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 | - | +**429** | Exhausted rate limit for the organization | - | +**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_all_aws_monitoring_integrations** +> AwsMonitoringIntegrations get_all_aws_monitoring_integrations(aid=aid) + +List AWS integrations + +Retrieves all AWS inventory and flow logs monitoring integrations configured for the authenticated account group in ThousandEyes. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.cloud_insights_integrations +from thousandeyes_sdk.cloud_insights_integrations.models.aws_monitoring_integrations import AwsMonitoringIntegrations +from thousandeyes_sdk.cloud_insights_integrations.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.cloud_insights_integrations.CloudInsightsIntegrationsApi(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 AWS integrations + api_response = api_instance.get_all_aws_monitoring_integrations(aid=aid) + print("The response of CloudInsightsIntegrationsApi->get_all_aws_monitoring_integrations:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CloudInsightsIntegrationsApi->get_all_aws_monitoring_integrations: %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 + +[**AwsMonitoringIntegrations**](AwsMonitoringIntegrations.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** | The response is an array of integration objects, where each object represents either an Inventory Monitoring or Flow Logs Monitoring integration. Each integration includes metadata such as: id — the unique identifier of the integration; name — the user-defined name of the integration; roleArn — the AWS IAM role ARN that ThousandEyes assumes to access your AWS resources; externalId — the external identifier used for secure cross-account role assumption; monitoringType — specifies whether the integration monitors AWS inventory (inventory-monitoring) or flow logs (flow-logs-monitoring); snsTopicsArns — a list of SNS topic ARNs used for flow logs monitoring (only present for flow logs monitoring integrations); links — HAL-style link relations that provide the \"self\" URL for retrieving integration details. This endpoint can be used to: audit all existing AWS integrations configured for Cloud Insights, identify which integrations are set up for inventory versus flow logs monitoring, and retrieve integration IDs for further API operations such as inspection (GET /cloud-insights/integration/aws/{integrationId}) or deletion (DELETE). The response is returned as a JSON array conforming to the AwsMonitoringIntegration schema. | - | +**401** | Unauthorized | - | +**403** | Insufficient permissions to query endpoint | - | +**404** | Not found | - | +**429** | Exhausted rate limit for the organization | - | +**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_all_azure_monitoring_integrations** +> AzureMonitoringIntegrations get_all_azure_monitoring_integrations(aid=aid) + +List Azure integrations + +Retrieves all Azure inventory and flow logs monitoring integrations configured for the authenticated account group in ThousandEyes. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.cloud_insights_integrations +from thousandeyes_sdk.cloud_insights_integrations.models.azure_monitoring_integrations import AzureMonitoringIntegrations +from thousandeyes_sdk.cloud_insights_integrations.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.cloud_insights_integrations.CloudInsightsIntegrationsApi(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 Azure integrations + api_response = api_instance.get_all_azure_monitoring_integrations(aid=aid) + print("The response of CloudInsightsIntegrationsApi->get_all_azure_monitoring_integrations:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CloudInsightsIntegrationsApi->get_all_azure_monitoring_integrations: %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 + +[**AzureMonitoringIntegrations**](AzureMonitoringIntegrations.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** | The response is an array of integration objects, where each object represents either an Azure Inventory Monitoring or Azure Flow Logs Monitoring integration. Each integration includes metadata such as: id — the unique identifier of the integration; name — the user-defined name of the integration; appId / clientId — the Azure Application (client) ID of the service principal used for authentication; password / clientSecret — the client secret value associated with the service principal (note: for security reasons, the actual secret is never returned. The response includes a masked value (\"********\") instead); azureTenantId — the Azure Active Directory tenant ID associated with the integration; serviceBusQueueUrl — the Service Bus queue URL used for flow logs monitoring (only present for azure-flow-logs-monitoring integrations); monitoringType — specifies whether the integration monitors Azure resources (azure-inventory-monitoring) or Azure flow logs (azure-flow-logs-monitoring); links — HAL-style link relations that provide the \"self\" URL for retrieving integration details. This endpoint can be used to: audit all existing Azure integrations configured for Cloud Insights, identify which integrations are configured for inventory versus flow logs monitoring, and retrieve integration IDs for further API operations such as inspection (GET /cloud-insights/integration/azure/{integrationId}) or deletion (DELETE). The response is returned as a JSON array conforming to the AwsMonitoringIntegration schema. | - | +**401** | Unauthorized | - | +**403** | Insufficient permissions to query endpoint | - | +**404** | Not found | - | +**429** | Exhausted rate limit for the organization | - | +**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_aws_flowlogs_monitoring_integration_policies** +> str get_aws_flowlogs_monitoring_integration_policies(aid=aid) + +Get AWS flow logs monitoring IAM policies + +Retrieves the AWS IAM policies required to configure an AWS flow logs monitoring integration in JSON string format for the authenticated account group. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.cloud_insights_integrations +from thousandeyes_sdk.cloud_insights_integrations.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.cloud_insights_integrations.CloudInsightsIntegrationsApi(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: + # Get AWS flow logs monitoring IAM policies + api_response = api_instance.get_aws_flowlogs_monitoring_integration_policies(aid=aid) + print("The response of CloudInsightsIntegrationsApi->get_aws_flowlogs_monitoring_integration_policies:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CloudInsightsIntegrationsApi->get_aws_flowlogs_monitoring_integration_policies: %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 + +**str** + +### 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 | +|-------------|-------------|------------------| +**200** | The response contains a JSON object with the following policy documents under the policies key: 1) Trusted Policy — defines the trust relationship that allows ThousandEyes to assume a specified AWS IAM role via sts:AssumeRole. This includes the Principal ARN for ThousandEyes and the required ExternalId condition for secure cross-account access; 2) Permissions Policy — grants ThousandEyes read-only access to the Amazon S3 buckets where flow logs are stored. The policy includes permissions such as s3:GetObject and s3:ListBucket, scoped to the relevant flow log S3 bucket ARNs; 3) SNS Topic Access Policy — allows ThousandEyes to subscribe to Amazon SNS topics that receive flow log delivery notifications. It also enables the S3 service to publish events to those topics, ensuring ThousandEyes can be notified of new log data. This policy includes permissions for both SNS:Subscribe (for ThousandEyes) and SNS:Publish (for S3 event notifications). Use these policies when configuring the IAM role and SNS topic permissions required by ThousandEyes Cloud Insights to collect and monitor AWS flow logs data across your account. The response is returned as a JSON string in the policies object. | - | +**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_aws_inventory_monitoring_integration_policies** +> str get_aws_inventory_monitoring_integration_policies(aid=aid) + +Get AWS inventory monitoring IAM policies + +Retrieves the AWS IAM policies required to configure an AWS inventory monitoring integration in JSON string format for the authenticated account group. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.cloud_insights_integrations +from thousandeyes_sdk.cloud_insights_integrations.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.cloud_insights_integrations.CloudInsightsIntegrationsApi(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: + # Get AWS inventory monitoring IAM policies + api_response = api_instance.get_aws_inventory_monitoring_integration_policies(aid=aid) + print("The response of CloudInsightsIntegrationsApi->get_aws_inventory_monitoring_integration_policies:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CloudInsightsIntegrationsApi->get_aws_inventory_monitoring_integration_policies: %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 + +**str** + +### 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 | +|-------------|-------------|------------------| +**200** | The response includes a JSON object containing two key policy documents: 1) Trusted Policy — defines the trust relationship that allows ThousandEyes to assume a specified AWS IAM role through sts:AssumeRole. This policy includes the Principal ARN for ThousandEyes and the required ExternalId condition; 2) Permissions Policy — lists the AWS service-level read permissions needed by ThousandEyes Cloud Insights to inventory network resources. These permissions cover services such as EC2, VPC, Transit Gateway, Direct Connect, CloudFront, ELB, CloudTrail, ECS/EKS, and S3. Use these policies when creating or updating the IAM role that ThousandEyes will use for inventory monitoring. The response is returned as a JSON string in the policies object. | - | +**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_aws_monitoring_integration** +> AwsMonitoringIntegration get_aws_monitoring_integration(integration_id, aid=aid) + +Get AWS integration + +Retrieves details for a specific AWS inventory or flow logs monitoring integration associated with the authenticated account group using the unique integration ID. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.cloud_insights_integrations +from thousandeyes_sdk.cloud_insights_integrations.models.aws_monitoring_integration import AwsMonitoringIntegration +from thousandeyes_sdk.cloud_insights_integrations.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.cloud_insights_integrations.CloudInsightsIntegrationsApi(api_client) + integration_id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569' # str | The unique ID of the AWS or Azure inventory or flow logs monitoring integration. + 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 AWS integration + api_response = api_instance.get_aws_monitoring_integration(integration_id, aid=aid) + print("The response of CloudInsightsIntegrationsApi->get_aws_monitoring_integration:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CloudInsightsIntegrationsApi->get_aws_monitoring_integration: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **integration_id** | **str**| The unique ID of the AWS or Azure inventory or flow logs monitoring integration. | + **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 + +[**AwsMonitoringIntegration**](AwsMonitoringIntegration.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** | The response contains a single integration object representing either: AWS inventory monitoring integration or AWS flow logs monitoring integration. Each integration includes metadata that defines its configuration: id — the unique identifier of the integration; name — the user-defined name of the integration; roleArn — the AWS IAM role ARN that ThousandEyes assumes to access your AWS resources; externalId — the external identifier used for secure cross-account role assumption; monitoringType — identifies whether the integration monitors AWS inventory (inventory-monitoring) or flow logs (flow-logs-monitoring); snsTopicsArns — a list of SNS topic ARNs associated with flow logs monitoring (only present for flow-logs-monitoring integrations); links — HAL-style link relations that include a self URL pointing to this integration resource. This endpoint is typically used to: retrieve detailed configuration information for a specific AWS integration, verify that the integration is correctly set up and associated with the expected AWS IAM role, and obtain integration details before performing deletion or troubleshooting operations. | - | +**401** | Unauthorized | - | +**403** | Insufficient permissions to query endpoint | - | +**404** | Not found | - | +**429** | Exhausted rate limit for the organization | - | +**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_azure_monitoring_integration** +> AzureMonitoringIntegration get_azure_monitoring_integration(integration_id, aid=aid) + +Get Azure integration + +Retrieves details for a specific Azure inventory or flow logs monitoring integration associated with the authenticated account group using the unique integration ID. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.cloud_insights_integrations +from thousandeyes_sdk.cloud_insights_integrations.models.azure_monitoring_integration import AzureMonitoringIntegration +from thousandeyes_sdk.cloud_insights_integrations.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.cloud_insights_integrations.CloudInsightsIntegrationsApi(api_client) + integration_id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569' # str | The unique ID of the AWS or Azure inventory or flow logs monitoring integration. + 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 Azure integration + api_response = api_instance.get_azure_monitoring_integration(integration_id, aid=aid) + print("The response of CloudInsightsIntegrationsApi->get_azure_monitoring_integration:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CloudInsightsIntegrationsApi->get_azure_monitoring_integration: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **integration_id** | **str**| The unique ID of the AWS or Azure inventory or flow logs monitoring integration. | + **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 + +[**AzureMonitoringIntegration**](AzureMonitoringIntegration.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** | The response contains a single integration object representing either: Azure Inventory Monitoring integration or Azure Flow Logs Monitoring integration. Each integration includes metadata that defines its configuration: id — the unique identifier of the integration; name — the user-defined name of the integration; appId / clientId — the Azure Application (client) ID of the service principal used for authentication; password / clientSecret — the client secret value associated with the service principal (note: for security reasons, the actual secret is never returned. The response includes a masked value (\"********\") instead; azureTenantId — the Azure Active Directory tenant ID for the integration; serviceBusQueueUrl — the Service Bus queue URL used for receiving Flow Logs (only present for azure-flow-logs-monitoring integrations); monitoringType — identifies whether the integration monitors Azure resources (azure-inventory-monitoring) or flow logs (azure-flow-logs-monitoring); links — HAL-style link relations that include a \"self\" URL pointing to this integration resource. This endpoint is typically used to: retrieve detailed configuration information for a specific Azure integration, validate that the integration credentials and type (inventory or flow logs) are correctly configured, and obtain integration details before performing update or deletion operations. | - | +**401** | Unauthorized | - | +**403** | Insufficient permissions to query endpoint | - | +**404** | Not found | - | +**429** | Exhausted rate limit for the organization | - | +**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_azure_flow_logs_monitoring_integration** +> AzureMonitoringIntegration update_azure_flow_logs_monitoring_integration(integration_id, azure_flow_logs_integration_request, aid=aid) + +Update Azure flow logs monitoring integration + +Updates an existing Azure flow logs monitoring integration. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.cloud_insights_integrations +from thousandeyes_sdk.cloud_insights_integrations.models.azure_flow_logs_integration_request import AzureFlowLogsIntegrationRequest +from thousandeyes_sdk.cloud_insights_integrations.models.azure_monitoring_integration import AzureMonitoringIntegration +from thousandeyes_sdk.cloud_insights_integrations.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.cloud_insights_integrations.CloudInsightsIntegrationsApi(api_client) + integration_id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569' # str | The unique ID of the AWS or Azure inventory or flow logs monitoring integration. + azure_flow_logs_integration_request = thousandeyes_sdk.cloud_insights_integrations.AzureFlowLogsIntegrationRequest() # AzureFlowLogsIntegrationRequest | + 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 Azure flow logs monitoring integration + api_response = api_instance.update_azure_flow_logs_monitoring_integration(integration_id, azure_flow_logs_integration_request, aid=aid) + print("The response of CloudInsightsIntegrationsApi->update_azure_flow_logs_monitoring_integration:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CloudInsightsIntegrationsApi->update_azure_flow_logs_monitoring_integration: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **integration_id** | **str**| The unique ID of the AWS or Azure inventory or flow logs monitoring integration. | + **azure_flow_logs_integration_request** | [**AzureFlowLogsIntegrationRequest**](AzureFlowLogsIntegrationRequest.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 + +[**AzureMonitoringIntegration**](AzureMonitoringIntegration.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** | Azure flow logs monitoring integration updated successfully. | - | +**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 | - | + +[[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_azure_inventory_monitoring_integration** +> AzureMonitoringIntegration update_azure_inventory_monitoring_integration(integration_id, azure_inventory_integration_request, aid=aid) + +Update Azure inventory monitoring integration + +Updates an existing Azure inventory monitoring integration. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.cloud_insights_integrations +from thousandeyes_sdk.cloud_insights_integrations.models.azure_inventory_integration_request import AzureInventoryIntegrationRequest +from thousandeyes_sdk.cloud_insights_integrations.models.azure_monitoring_integration import AzureMonitoringIntegration +from thousandeyes_sdk.cloud_insights_integrations.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.cloud_insights_integrations.CloudInsightsIntegrationsApi(api_client) + integration_id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569' # str | The unique ID of the AWS or Azure inventory or flow logs monitoring integration. + azure_inventory_integration_request = thousandeyes_sdk.cloud_insights_integrations.AzureInventoryIntegrationRequest() # AzureInventoryIntegrationRequest | + 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 Azure inventory monitoring integration + api_response = api_instance.update_azure_inventory_monitoring_integration(integration_id, azure_inventory_integration_request, aid=aid) + print("The response of CloudInsightsIntegrationsApi->update_azure_inventory_monitoring_integration:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CloudInsightsIntegrationsApi->update_azure_inventory_monitoring_integration: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **integration_id** | **str**| The unique ID of the AWS or Azure inventory or flow logs monitoring integration. | + **azure_inventory_integration_request** | [**AzureInventoryIntegrationRequest**](AzureInventoryIntegrationRequest.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 + +[**AzureMonitoringIntegration**](AzureMonitoringIntegration.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** | Azure inventory monitoring integration updated successfully. | - | +**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 | - | + +[[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) + diff --git a/thousandeyes-sdk-cloud-insights-integrations/docs/Error.md b/thousandeyes-sdk-cloud-insights-integrations/docs/Error.md new file mode 100644 index 000000000..d872261a1 --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/docs/Error.md @@ -0,0 +1,33 @@ +# Error + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \"about:blank\". | [optional] +**title** | **str** | A short, human-readable summary of the problem type. | [optional] +**status** | **int** | The HTTP status code generated by the origin server for this occurrence of the problem. | [optional] +**detail** | **str** | A human-readable explanation specific to this occurrence of the problem. | [optional] +**instance** | **str** | A URI reference that identifies the specific occurrence of the problem. | [optional] + +## Example + +```python +from thousandeyes_sdk.cloud_insights_integrations.models.error import Error + +# TODO update the JSON string below +json = "{}" +# create an instance of Error from a JSON string +error_instance = Error.from_json(json) +# print the JSON string representation of the object +print(Error.to_json()) + +# convert the object into a dict +error_dict = error_instance.to_dict() +# create an instance of Error from a dict +error_from_dict = Error.from_dict(error_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) + + diff --git a/thousandeyes-sdk-cloud-insights-integrations/docs/Link.md b/thousandeyes-sdk-cloud-insights-integrations/docs/Link.md new file mode 100644 index 000000000..4e9c434d1 --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/docs/Link.md @@ -0,0 +1,37 @@ +# Link + +A hyperlink from the containing resource to a URI. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **str** | Its value is either a URI [RFC3986] or a URI template [RFC6570]. | +**templated** | **bool** | Should be true when the link object's \"href\" property is a URI template. | [optional] +**type** | **str** | Used as a hint to indicate the media type expected when dereferencing the target resource. | [optional] +**deprecation** | **str** | Its presence indicates that the link is to be deprecated at a future date. Its value is a URL that should provide further information about the deprecation. | [optional] +**name** | **str** | Its value may be used as a secondary key for selecting link objects that share the same relation type. | [optional] +**profile** | **str** | A URI that hints about the profile of the target resource. | [optional] +**title** | **str** | Intended for labelling the link with a human-readable identifier | [optional] +**hreflang** | **str** | Indicates the language of the target resource | [optional] + +## Example + +```python +from thousandeyes_sdk.cloud_insights_integrations.models.link import Link + +# TODO update the JSON string below +json = "{}" +# create an instance of Link from a JSON string +link_instance = Link.from_json(json) +# print the JSON string representation of the object +print(Link.to_json()) + +# convert the object into a dict +link_dict = link_instance.to_dict() +# create an instance of Link from a dict +link_from_dict = Link.from_dict(link_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-cloud-insights-integrations/docs/SelfLinks.md b/thousandeyes-sdk-cloud-insights-integrations/docs/SelfLinks.md new file mode 100644 index 000000000..38ae3a240 --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/docs/SelfLinks.md @@ -0,0 +1,30 @@ +# SelfLinks + +A links object containing the self link. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**var_self** | [**Link**](Link.md) | | [optional] + +## Example + +```python +from thousandeyes_sdk.cloud_insights_integrations.models.self_links import SelfLinks + +# TODO update the JSON string below +json = "{}" +# create an instance of SelfLinks from a JSON string +self_links_instance = SelfLinks.from_json(json) +# print the JSON string representation of the object +print(SelfLinks.to_json()) + +# convert the object into a dict +self_links_dict = self_links_instance.to_dict() +# create an instance of SelfLinks from a dict +self_links_from_dict = SelfLinks.from_dict(self_links_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-cloud-insights-integrations/docs/SubscriptionsPolicy.md b/thousandeyes-sdk-cloud-insights-integrations/docs/SubscriptionsPolicy.md new file mode 100644 index 000000000..7715d4b58 --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/docs/SubscriptionsPolicy.md @@ -0,0 +1,31 @@ +# SubscriptionsPolicy + +Policy document that controls which Azure subscriptions are inventoried. Up to 10 rules can be provided. Rules are evaluated in order; if none match, the defaultAction is applied. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rules** | [**List[SubscriptionsPolicyRule]**](SubscriptionsPolicyRule.md) | Ordered list of subscription policy rules. Maximum of 10 entries. | +**default_action** | [**SubscriptionsPolicyRuleAction**](SubscriptionsPolicyRuleAction.md) | | + +## Example + +```python +from thousandeyes_sdk.cloud_insights_integrations.models.subscriptions_policy import SubscriptionsPolicy + +# TODO update the JSON string below +json = "{}" +# create an instance of SubscriptionsPolicy from a JSON string +subscriptions_policy_instance = SubscriptionsPolicy.from_json(json) +# print the JSON string representation of the object +print(SubscriptionsPolicy.to_json()) + +# convert the object into a dict +subscriptions_policy_dict = subscriptions_policy_instance.to_dict() +# create an instance of SubscriptionsPolicy from a dict +subscriptions_policy_from_dict = SubscriptionsPolicy.from_dict(subscriptions_policy_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) + + diff --git a/thousandeyes-sdk-cloud-insights-integrations/docs/SubscriptionsPolicyRule.md b/thousandeyes-sdk-cloud-insights-integrations/docs/SubscriptionsPolicyRule.md new file mode 100644 index 000000000..996e4d418 --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/docs/SubscriptionsPolicyRule.md @@ -0,0 +1,32 @@ +# SubscriptionsPolicyRule + +A single subscription rule consisting of a field, pattern, and action. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**var_field** | [**SubscriptionsPolicyRuleField**](SubscriptionsPolicyRuleField.md) | | +**pattern** | **str** | String or regular expression used to match subscription identifiers or names. | +**action** | [**SubscriptionsPolicyRuleAction**](SubscriptionsPolicyRuleAction.md) | | + +## Example + +```python +from thousandeyes_sdk.cloud_insights_integrations.models.subscriptions_policy_rule import SubscriptionsPolicyRule + +# TODO update the JSON string below +json = "{}" +# create an instance of SubscriptionsPolicyRule from a JSON string +subscriptions_policy_rule_instance = SubscriptionsPolicyRule.from_json(json) +# print the JSON string representation of the object +print(SubscriptionsPolicyRule.to_json()) + +# convert the object into a dict +subscriptions_policy_rule_dict = subscriptions_policy_rule_instance.to_dict() +# create an instance of SubscriptionsPolicyRule from a dict +subscriptions_policy_rule_from_dict = SubscriptionsPolicyRule.from_dict(subscriptions_policy_rule_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) + + diff --git a/thousandeyes-sdk-cloud-insights-integrations/docs/SubscriptionsPolicyRuleAction.md b/thousandeyes-sdk-cloud-insights-integrations/docs/SubscriptionsPolicyRuleAction.md new file mode 100644 index 000000000..7c2db8b1c --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/docs/SubscriptionsPolicyRuleAction.md @@ -0,0 +1,12 @@ +# SubscriptionsPolicyRuleAction + +Action applied when a subscriptions policy rule matches. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-cloud-insights-integrations/docs/SubscriptionsPolicyRuleField.md b/thousandeyes-sdk-cloud-insights-integrations/docs/SubscriptionsPolicyRuleField.md new file mode 100644 index 000000000..4bb5463c0 --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/docs/SubscriptionsPolicyRuleField.md @@ -0,0 +1,12 @@ +# SubscriptionsPolicyRuleField + +Identifies whether the rule evaluates subscription IDs or subscription names. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-cloud-insights-integrations/docs/UnauthorizedError.md b/thousandeyes-sdk-cloud-insights-integrations/docs/UnauthorizedError.md new file mode 100644 index 000000000..91f73f748 --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/docs/UnauthorizedError.md @@ -0,0 +1,30 @@ +# UnauthorizedError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | | [optional] +**error_description** | **str** | | [optional] + +## Example + +```python +from thousandeyes_sdk.cloud_insights_integrations.models.unauthorized_error import UnauthorizedError + +# TODO update the JSON string below +json = "{}" +# create an instance of UnauthorizedError from a JSON string +unauthorized_error_instance = UnauthorizedError.from_json(json) +# print the JSON string representation of the object +print(UnauthorizedError.to_json()) + +# convert the object into a dict +unauthorized_error_dict = unauthorized_error_instance.to_dict() +# create an instance of UnauthorizedError from a dict +unauthorized_error_from_dict = UnauthorizedError.from_dict(unauthorized_error_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) + + diff --git a/thousandeyes-sdk-cloud-insights-integrations/docs/ValidationError.md b/thousandeyes-sdk-cloud-insights-integrations/docs/ValidationError.md new file mode 100644 index 000000000..95b03aa4d --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/docs/ValidationError.md @@ -0,0 +1,34 @@ +# ValidationError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \"about:blank\". | [optional] +**title** | **str** | A short, human-readable summary of the problem type. | [optional] +**status** | **int** | The HTTP status code generated by the origin server for this occurrence of the problem. | [optional] +**detail** | **str** | A human-readable explanation specific to this occurrence of the problem. | [optional] +**instance** | **str** | A URI reference that identifies the specific occurrence of the problem. | [optional] +**errors** | [**List[ValidationErrorItem]**](ValidationErrorItem.md) | (Optional) When multiple errors occur, the details for each error are listed. | [optional] + +## Example + +```python +from thousandeyes_sdk.cloud_insights_integrations.models.validation_error import ValidationError + +# TODO update the JSON string below +json = "{}" +# create an instance of ValidationError from a JSON string +validation_error_instance = ValidationError.from_json(json) +# print the JSON string representation of the object +print(ValidationError.to_json()) + +# convert the object into a dict +validation_error_dict = validation_error_instance.to_dict() +# create an instance of ValidationError from a dict +validation_error_from_dict = ValidationError.from_dict(validation_error_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) + + diff --git a/thousandeyes-sdk-cloud-insights-integrations/docs/ValidationErrorItem.md b/thousandeyes-sdk-cloud-insights-integrations/docs/ValidationErrorItem.md new file mode 100644 index 000000000..988c7be79 --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/docs/ValidationErrorItem.md @@ -0,0 +1,31 @@ +# ValidationErrorItem + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **str** | (Optional) A unique error type/code that can be referenced in the documentation for further details. | [optional] +**var_field** | **str** | Identifies the field that triggered this particular error. | [optional] +**message** | **str** | A short, human-readable summary of the error. | [optional] + +## Example + +```python +from thousandeyes_sdk.cloud_insights_integrations.models.validation_error_item import ValidationErrorItem + +# TODO update the JSON string below +json = "{}" +# create an instance of ValidationErrorItem from a JSON string +validation_error_item_instance = ValidationErrorItem.from_json(json) +# print the JSON string representation of the object +print(ValidationErrorItem.to_json()) + +# convert the object into a dict +validation_error_item_dict = validation_error_item_instance.to_dict() +# create an instance of ValidationErrorItem from a dict +validation_error_item_from_dict = ValidationErrorItem.from_dict(validation_error_item_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) + + diff --git a/thousandeyes-sdk-cloud-insights-integrations/pyproject.toml b/thousandeyes-sdk-cloud-insights-integrations/pyproject.toml new file mode 100644 index 000000000..4a16c0bf4 --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/pyproject.toml @@ -0,0 +1,82 @@ +[project] +name = "thousandeyes-sdk-cloud-insights-integrations" +dynamic = ["version"] +readme = "README.md" +authors = [ + { name = "ThousandEyes API Team", email = "api-team@thousandeyes.com" } +] +description = "ThousandEyes SDK Cloud Insights Integrations API" +license = { file = "LICENSE" } +requires-python = ">= 3.9" +dependencies = [ + "urllib3 >= 2.6.3", + "python-dateutil >=2.8.2", + "pydantic >=2.1.0", + "typing-extensions >=4.7.1", + "thousandeyes-sdk-core", +] + +[tool.setuptools.dynamic] +version = {file = ".version"} + +[project.optional-dependencies] +test = [ + "pytest~=7.1.3", + "pytest-cov>=2.8.1", + "pytest-randomly>=3.12.0", + "mypy>=1.4.1", + "types-python-dateutil>=2.8.19", +] +dev = [ + "flake8>=4.0.0", + "mypy>=1.4.1", + "types-python-dateutil>=2.8.19", +] + +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[tool.setuptools] +include-package-data = true + +[tool.pylint.'MESSAGES CONTROL'] +extension-pkg-whitelist = "pydantic" + +[tool.mypy] +files = [ + "src", + #"test", # auto-generated tests + "tests", # hand-written tests +] +# TODO: enable "strict" once all these individual checks are passing +# strict = true + +# List from: https://mypy.readthedocs.io/en/stable/existing_code.html#introduce-stricter-options +warn_unused_configs = true +warn_redundant_casts = true +warn_unused_ignores = true + +## Getting these passing should be easy +strict_equality = true +strict_concatenate = true + +## Strongly recommend enabling this one as soon as you can +check_untyped_defs = true + +## These shouldn't be too much additional work, but may be tricky to +## get passing if you use a lot of untyped libraries +disallow_subclassing_any = true +disallow_untyped_decorators = true +disallow_any_generics = true + +### These next few are various gradations of forcing use of type annotations +#disallow_untyped_calls = true +#disallow_incomplete_defs = true +#disallow_untyped_defs = true +# +### This one isn't too hard to get passing, but return on investment is lower +#no_implicit_reexport = true +# +### This one can be tricky to get passing if you use a lot of untyped libraries +#warn_return_any = true diff --git a/thousandeyes-sdk-cloud-insights-integrations/setup.cfg b/thousandeyes-sdk-cloud-insights-integrations/setup.cfg new file mode 100644 index 000000000..11433ee87 --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/setup.cfg @@ -0,0 +1,2 @@ +[flake8] +max-line-length=99 diff --git a/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/__init__.py b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/__init__.py new file mode 100644 index 000000000..f53f834c0 --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/__init__.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +# flake8: noqa + +""" + Cloud Insights Integrations API + + **Note:** All Cloud Insights APIs are not available for ThousandEyes for Government instance. The Cloud Insights Integrations API lets you programmatically manage **AWS** and **Azure** monitoring integrations in ThousandEyes. ### What You Can Do - **List** all integrations. - **Get** details for a specific integration. - **Delete** an existing integration. - **Create** integrations for: - **AWS**: inventory monitoring and flow logs monitoring. - **Azure**: inventory monitoring and flow logs monitoring. - **Update** integrations for: - **Azure**: inventory monitoring and flow logs monitoring. - **Fetch AWS IAM policy documents** required to configure AWS inventory and flow-logs integrations. - **Retrieve** the current AWS and Azure integration policy settings to understand which AWS and Azure resource groups, AWS regions, Azure subscription rules are enabled and whether CloudTrail is enabled for Cloud Insights for inventory monitoring. - **Update** policy settings to change the approved AWS resource groups, AWS regions, and Azure subscription rules that ThousandEyes should inventory. ### Scope and Tenancy All operations are scoped to the authenticated account group. Responses include only resources associated with that group. ### Payloads and formats - **Requests:** `application/json` - **Responses:** primarily `application/hal+json` for resource representations and `application/json` for policy documents. - HAL responses include `_links` with a `self` relation for direct navigation. ### Integration Types - **Inventory monitoring** - AWS: reads inventory and network topology via read-only IAM permissions. - Azure: authenticates with a Service Principal to read inventory and network topology. - **Flow logs monitoring** - AWS: reads flow logs from S3 buckets and uses SNS for notifications. - Azure: reads flow logs via **Service Bus Queue** (`serviceBusQueueUrl`). ### Policy Helpers (AWS) Dedicated endpoints return **Trusted Policy**, **Permissions Policy**, and **SNS Topic Access Policy** documents to simplify role setup for inventory and flow logs integrations. ### Notes - All example values in this specification are **fictitious**. For more information about Cloud Insights, see [Cloud Insights](https://docs.thousandeyes.com/product-documentation/cloud-insights). + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import apis into sdk package +from thousandeyes_sdk.cloud_insights_integrations.api.cloud_insights_integration_policy_settings_api import CloudInsightsIntegrationPolicySettingsApi +from thousandeyes_sdk.cloud_insights_integrations.api.cloud_insights_integrations_api import CloudInsightsIntegrationsApi + + +# import models into sdk package +from thousandeyes_sdk.cloud_insights_integrations.models.aws_flow_logs_integration_request import AwsFlowLogsIntegrationRequest +from thousandeyes_sdk.cloud_insights_integrations.models.aws_integration_policy_setting import AwsIntegrationPolicySetting +from thousandeyes_sdk.cloud_insights_integrations.models.aws_inventory_integration_request import AwsInventoryIntegrationRequest +from thousandeyes_sdk.cloud_insights_integrations.models.aws_monitoring_integration import AwsMonitoringIntegration +from thousandeyes_sdk.cloud_insights_integrations.models.aws_monitoring_integrations import AwsMonitoringIntegrations +from thousandeyes_sdk.cloud_insights_integrations.models.aws_region import AwsRegion +from thousandeyes_sdk.cloud_insights_integrations.models.aws_resource_group_type import AwsResourceGroupType +from thousandeyes_sdk.cloud_insights_integrations.models.azure_flow_logs_integration_request import AzureFlowLogsIntegrationRequest +from thousandeyes_sdk.cloud_insights_integrations.models.azure_integration_policy_setting import AzureIntegrationPolicySetting +from thousandeyes_sdk.cloud_insights_integrations.models.azure_inventory_integration_request import AzureInventoryIntegrationRequest +from thousandeyes_sdk.cloud_insights_integrations.models.azure_monitoring_integration import AzureMonitoringIntegration +from thousandeyes_sdk.cloud_insights_integrations.models.azure_monitoring_integrations import AzureMonitoringIntegrations +from thousandeyes_sdk.cloud_insights_integrations.models.azure_resource_group_type import AzureResourceGroupType +from thousandeyes_sdk.cloud_insights_integrations.models.error import Error +from thousandeyes_sdk.cloud_insights_integrations.models.link import Link +from thousandeyes_sdk.cloud_insights_integrations.models.self_links import SelfLinks +from thousandeyes_sdk.cloud_insights_integrations.models.subscriptions_policy import SubscriptionsPolicy +from thousandeyes_sdk.cloud_insights_integrations.models.subscriptions_policy_rule import SubscriptionsPolicyRule +from thousandeyes_sdk.cloud_insights_integrations.models.subscriptions_policy_rule_action import SubscriptionsPolicyRuleAction +from thousandeyes_sdk.cloud_insights_integrations.models.subscriptions_policy_rule_field import SubscriptionsPolicyRuleField +from thousandeyes_sdk.cloud_insights_integrations.models.unauthorized_error import UnauthorizedError +from thousandeyes_sdk.cloud_insights_integrations.models.validation_error import ValidationError +from thousandeyes_sdk.cloud_insights_integrations.models.validation_error_item import ValidationErrorItem diff --git a/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/api/__init__.py b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/api/__init__.py new file mode 100644 index 000000000..8f2bfb453 --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/api/__init__.py @@ -0,0 +1,6 @@ +# flake8: noqa + +# import apis into api package +from thousandeyes_sdk.cloud_insights_integrations.api.cloud_insights_integration_policy_settings_api import CloudInsightsIntegrationPolicySettingsApi +from thousandeyes_sdk.cloud_insights_integrations.api.cloud_insights_integrations_api import CloudInsightsIntegrationsApi + diff --git a/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/api/cloud_insights_integration_policy_settings_api.py b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/api/cloud_insights_integration_policy_settings_api.py new file mode 100644 index 000000000..89a03fc6e --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/api/cloud_insights_integration_policy_settings_api.py @@ -0,0 +1,1222 @@ +# coding: utf-8 + +""" + Cloud Insights Integrations API + + **Note:** All Cloud Insights APIs are not available for ThousandEyes for Government instance. The Cloud Insights Integrations API lets you programmatically manage **AWS** and **Azure** monitoring integrations in ThousandEyes. ### What You Can Do - **List** all integrations. - **Get** details for a specific integration. - **Delete** an existing integration. - **Create** integrations for: - **AWS**: inventory monitoring and flow logs monitoring. - **Azure**: inventory monitoring and flow logs monitoring. - **Update** integrations for: - **Azure**: inventory monitoring and flow logs monitoring. - **Fetch AWS IAM policy documents** required to configure AWS inventory and flow-logs integrations. - **Retrieve** the current AWS and Azure integration policy settings to understand which AWS and Azure resource groups, AWS regions, Azure subscription rules are enabled and whether CloudTrail is enabled for Cloud Insights for inventory monitoring. - **Update** policy settings to change the approved AWS resource groups, AWS regions, and Azure subscription rules that ThousandEyes should inventory. ### Scope and Tenancy All operations are scoped to the authenticated account group. Responses include only resources associated with that group. ### Payloads and formats - **Requests:** `application/json` - **Responses:** primarily `application/hal+json` for resource representations and `application/json` for policy documents. - HAL responses include `_links` with a `self` relation for direct navigation. ### Integration Types - **Inventory monitoring** - AWS: reads inventory and network topology via read-only IAM permissions. - Azure: authenticates with a Service Principal to read inventory and network topology. - **Flow logs monitoring** - AWS: reads flow logs from S3 buckets and uses SNS for notifications. - Azure: reads flow logs via **Service Bus Queue** (`serviceBusQueueUrl`). ### Policy Helpers (AWS) Dedicated endpoints return **Trusted Policy**, **Permissions Policy**, and **SNS Topic Access Policy** documents to simplify role setup for inventory and flow logs integrations. ### Notes - All example values in this specification are **fictitious**. For more information about Cloud Insights, see [Cloud Insights](https://docs.thousandeyes.com/product-documentation/cloud-insights). + + 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.cloud_insights_integrations.models + +from pydantic import Field, StrictStr +from typing import Optional +from typing_extensions import Annotated +from thousandeyes_sdk.cloud_insights_integrations.models.aws_integration_policy_setting import AwsIntegrationPolicySetting +from thousandeyes_sdk.cloud_insights_integrations.models.azure_integration_policy_setting import AzureIntegrationPolicySetting + +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 CloudInsightsIntegrationPolicySettingsApi: + """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-cloud-insights-integrations")) + self.api_client = api_client + + + @validate_call + def get_aws_integration_policy_settings( + self, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + _request_timeout: Union[ + 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, + ) -> AwsIntegrationPolicySetting: + """Get AWS integration policy settings + + Retrieves the AWS integration policy settings for the authenticated account group. Use this endpoint to audit which AWS resource group types and AWS regions are enabled, and whether CloudTrail is enabled, for Cloud Insights inventory monitoring. + + :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 + 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_aws_integration_policy_settings_serialize( + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AwsIntegrationPolicySetting", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "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.cloud_insights_integrations.models, + ).data + + + @validate_call + def get_aws_integration_policy_settings_with_http_info( + self, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + _request_timeout: Union[ + 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[AwsIntegrationPolicySetting]: + """Get AWS integration policy settings + + Retrieves the AWS integration policy settings for the authenticated account group. Use this endpoint to audit which AWS resource group types and AWS regions are enabled, and whether CloudTrail is enabled, for Cloud Insights inventory monitoring. + + :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 + 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_aws_integration_policy_settings_serialize( + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AwsIntegrationPolicySetting", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "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.cloud_insights_integrations.models, + ) + + + @validate_call + def get_aws_integration_policy_settings_without_preload_content( + self, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + _request_timeout: Union[ + 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: + """Get AWS integration policy settings + + Retrieves the AWS integration policy settings for the authenticated account group. Use this endpoint to audit which AWS resource group types and AWS regions are enabled, and whether CloudTrail is enabled, for Cloud Insights inventory monitoring. + + :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 + 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_aws_integration_policy_settings_serialize( + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AwsIntegrationPolicySetting", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_aws_integration_policy_settings_serialize( + self, + aid, + _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)) + + # 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='/cloud-insights/integration/aws/policy/settings', + 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 + ) + + + + + @validate_call + def get_azure_integration_policy_settings( + self, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + _request_timeout: Union[ + 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, + ) -> AzureIntegrationPolicySetting: + """Get Azure integration policy settings + + Retrieves the Azure integration policy settings for the authenticated account group. Use this endpoint to review which Azure resource group types are monitored and inspect the subscriptions policy rules that gate which subscriptions ThousandEyes inventories. + + :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 + 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_azure_integration_policy_settings_serialize( + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AzureIntegrationPolicySetting", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "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.cloud_insights_integrations.models, + ).data + + + @validate_call + def get_azure_integration_policy_settings_with_http_info( + self, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + _request_timeout: Union[ + 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[AzureIntegrationPolicySetting]: + """Get Azure integration policy settings + + Retrieves the Azure integration policy settings for the authenticated account group. Use this endpoint to review which Azure resource group types are monitored and inspect the subscriptions policy rules that gate which subscriptions ThousandEyes inventories. + + :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 + 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_azure_integration_policy_settings_serialize( + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AzureIntegrationPolicySetting", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "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.cloud_insights_integrations.models, + ) + + + @validate_call + def get_azure_integration_policy_settings_without_preload_content( + self, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + _request_timeout: Union[ + 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: + """Get Azure integration policy settings + + Retrieves the Azure integration policy settings for the authenticated account group. Use this endpoint to review which Azure resource group types are monitored and inspect the subscriptions policy rules that gate which subscriptions ThousandEyes inventories. + + :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 + 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_azure_integration_policy_settings_serialize( + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AzureIntegrationPolicySetting", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_azure_integration_policy_settings_serialize( + self, + aid, + _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)) + + # 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='/cloud-insights/integration/azure/policy/settings', + 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 + ) + + + + + @validate_call + def update_aws_integration_policy_settings( + self, + aws_integration_policy_setting: AwsIntegrationPolicySetting, + 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, + 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, + ) -> AwsIntegrationPolicySetting: + """Update AWS integration policy settings + + Updates the AWS integration policy settings for the authenticated account group. This endpoint lets you enable or disable specific AWS resource group types, adjust the set of AWS regions to inventory, and control whether CloudTrail is enabled for inventory monitoring. + + :param aws_integration_policy_setting: (required) + :type aws_integration_policy_setting: AwsIntegrationPolicySetting + :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 + 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._update_aws_integration_policy_settings_serialize( + aws_integration_policy_setting=aws_integration_policy_setting, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AwsIntegrationPolicySetting", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "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.cloud_insights_integrations.models, + ).data + + + @validate_call + def update_aws_integration_policy_settings_with_http_info( + self, + aws_integration_policy_setting: AwsIntegrationPolicySetting, + 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, + 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[AwsIntegrationPolicySetting]: + """Update AWS integration policy settings + + Updates the AWS integration policy settings for the authenticated account group. This endpoint lets you enable or disable specific AWS resource group types, adjust the set of AWS regions to inventory, and control whether CloudTrail is enabled for inventory monitoring. + + :param aws_integration_policy_setting: (required) + :type aws_integration_policy_setting: AwsIntegrationPolicySetting + :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 + 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._update_aws_integration_policy_settings_serialize( + aws_integration_policy_setting=aws_integration_policy_setting, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AwsIntegrationPolicySetting", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "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.cloud_insights_integrations.models, + ) + + + @validate_call + def update_aws_integration_policy_settings_without_preload_content( + self, + aws_integration_policy_setting: AwsIntegrationPolicySetting, + 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, + 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: + """Update AWS integration policy settings + + Updates the AWS integration policy settings for the authenticated account group. This endpoint lets you enable or disable specific AWS resource group types, adjust the set of AWS regions to inventory, and control whether CloudTrail is enabled for inventory monitoring. + + :param aws_integration_policy_setting: (required) + :type aws_integration_policy_setting: AwsIntegrationPolicySetting + :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 + 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._update_aws_integration_policy_settings_serialize( + aws_integration_policy_setting=aws_integration_policy_setting, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AwsIntegrationPolicySetting", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_aws_integration_policy_settings_serialize( + self, + aws_integration_policy_setting, + aid, + _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)) + + # process the header parameters + # process the form parameters + # process the body parameter + if aws_integration_policy_setting is not None: + _body_params = aws_integration_policy_setting + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/hal+json', + 'application/json', + 'application/problem+json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/cloud-insights/integration/aws/policy/settings', + 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 + ) + + + + + @validate_call + def update_azure_integration_policy_settings( + self, + azure_integration_policy_setting: AzureIntegrationPolicySetting, + 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, + 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, + ) -> AzureIntegrationPolicySetting: + """Update Azure integration policy settings + + Updates the Azure integration policy settings for the authenticated account group. This endpoint lets you enable or disable Azure resource group types and manage the subscriptions policy (rules plus default action) that controls which Azure subscriptions are inventoried. + + :param azure_integration_policy_setting: (required) + :type azure_integration_policy_setting: AzureIntegrationPolicySetting + :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 + 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._update_azure_integration_policy_settings_serialize( + azure_integration_policy_setting=azure_integration_policy_setting, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AzureIntegrationPolicySetting", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "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.cloud_insights_integrations.models, + ).data + + + @validate_call + def update_azure_integration_policy_settings_with_http_info( + self, + azure_integration_policy_setting: AzureIntegrationPolicySetting, + 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, + 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[AzureIntegrationPolicySetting]: + """Update Azure integration policy settings + + Updates the Azure integration policy settings for the authenticated account group. This endpoint lets you enable or disable Azure resource group types and manage the subscriptions policy (rules plus default action) that controls which Azure subscriptions are inventoried. + + :param azure_integration_policy_setting: (required) + :type azure_integration_policy_setting: AzureIntegrationPolicySetting + :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 + 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._update_azure_integration_policy_settings_serialize( + azure_integration_policy_setting=azure_integration_policy_setting, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AzureIntegrationPolicySetting", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "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.cloud_insights_integrations.models, + ) + + + @validate_call + def update_azure_integration_policy_settings_without_preload_content( + self, + azure_integration_policy_setting: AzureIntegrationPolicySetting, + 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, + 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: + """Update Azure integration policy settings + + Updates the Azure integration policy settings for the authenticated account group. This endpoint lets you enable or disable Azure resource group types and manage the subscriptions policy (rules plus default action) that controls which Azure subscriptions are inventoried. + + :param azure_integration_policy_setting: (required) + :type azure_integration_policy_setting: AzureIntegrationPolicySetting + :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 + 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._update_azure_integration_policy_settings_serialize( + azure_integration_policy_setting=azure_integration_policy_setting, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AzureIntegrationPolicySetting", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_azure_integration_policy_settings_serialize( + self, + azure_integration_policy_setting, + aid, + _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)) + + # process the header parameters + # process the form parameters + # process the body parameter + if azure_integration_policy_setting is not None: + _body_params = azure_integration_policy_setting + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/hal+json', + 'application/json', + 'application/problem+json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/cloud-insights/integration/azure/policy/settings', + 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 + ) + + diff --git a/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/api/cloud_insights_integrations_api.py b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/api/cloud_insights_integrations_api.py new file mode 100644 index 000000000..f46c5184b --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/api/cloud_insights_integrations_api.py @@ -0,0 +1,4228 @@ +# coding: utf-8 + +""" + Cloud Insights Integrations API + + **Note:** All Cloud Insights APIs are not available for ThousandEyes for Government instance. The Cloud Insights Integrations API lets you programmatically manage **AWS** and **Azure** monitoring integrations in ThousandEyes. ### What You Can Do - **List** all integrations. - **Get** details for a specific integration. - **Delete** an existing integration. - **Create** integrations for: - **AWS**: inventory monitoring and flow logs monitoring. - **Azure**: inventory monitoring and flow logs monitoring. - **Update** integrations for: - **Azure**: inventory monitoring and flow logs monitoring. - **Fetch AWS IAM policy documents** required to configure AWS inventory and flow-logs integrations. - **Retrieve** the current AWS and Azure integration policy settings to understand which AWS and Azure resource groups, AWS regions, Azure subscription rules are enabled and whether CloudTrail is enabled for Cloud Insights for inventory monitoring. - **Update** policy settings to change the approved AWS resource groups, AWS regions, and Azure subscription rules that ThousandEyes should inventory. ### Scope and Tenancy All operations are scoped to the authenticated account group. Responses include only resources associated with that group. ### Payloads and formats - **Requests:** `application/json` - **Responses:** primarily `application/hal+json` for resource representations and `application/json` for policy documents. - HAL responses include `_links` with a `self` relation for direct navigation. ### Integration Types - **Inventory monitoring** - AWS: reads inventory and network topology via read-only IAM permissions. - Azure: authenticates with a Service Principal to read inventory and network topology. - **Flow logs monitoring** - AWS: reads flow logs from S3 buckets and uses SNS for notifications. - Azure: reads flow logs via **Service Bus Queue** (`serviceBusQueueUrl`). ### Policy Helpers (AWS) Dedicated endpoints return **Trusted Policy**, **Permissions Policy**, and **SNS Topic Access Policy** documents to simplify role setup for inventory and flow logs integrations. ### Notes - All example values in this specification are **fictitious**. For more information about Cloud Insights, see [Cloud Insights](https://docs.thousandeyes.com/product-documentation/cloud-insights). + + 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.cloud_insights_integrations.models + +from pydantic import Field, StrictStr +from typing import Optional +from typing_extensions import Annotated +from thousandeyes_sdk.cloud_insights_integrations.models.aws_flow_logs_integration_request import AwsFlowLogsIntegrationRequest +from thousandeyes_sdk.cloud_insights_integrations.models.aws_inventory_integration_request import AwsInventoryIntegrationRequest +from thousandeyes_sdk.cloud_insights_integrations.models.aws_monitoring_integration import AwsMonitoringIntegration +from thousandeyes_sdk.cloud_insights_integrations.models.aws_monitoring_integrations import AwsMonitoringIntegrations +from thousandeyes_sdk.cloud_insights_integrations.models.azure_flow_logs_integration_request import AzureFlowLogsIntegrationRequest +from thousandeyes_sdk.cloud_insights_integrations.models.azure_inventory_integration_request import AzureInventoryIntegrationRequest +from thousandeyes_sdk.cloud_insights_integrations.models.azure_monitoring_integration import AzureMonitoringIntegration +from thousandeyes_sdk.cloud_insights_integrations.models.azure_monitoring_integrations import AzureMonitoringIntegrations + +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 CloudInsightsIntegrationsApi: + """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-cloud-insights-integrations")) + self.api_client = api_client + + + @validate_call + def create_aws_flow_logs_monitoring_integration( + self, + aws_flow_logs_integration_request: AwsFlowLogsIntegrationRequest, + 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, + 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, + ) -> AwsMonitoringIntegration: + """Create AWS flow logs monitoring integration + + Creates a new AWS flow logs monitoring integration. + + :param aws_flow_logs_integration_request: (required) + :type aws_flow_logs_integration_request: AwsFlowLogsIntegrationRequest + :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 + 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._create_aws_flow_logs_monitoring_integration_serialize( + aws_flow_logs_integration_request=aws_flow_logs_integration_request, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "AwsMonitoringIntegration", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "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.cloud_insights_integrations.models, + ).data + + + @validate_call + def create_aws_flow_logs_monitoring_integration_with_http_info( + self, + aws_flow_logs_integration_request: AwsFlowLogsIntegrationRequest, + 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, + 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[AwsMonitoringIntegration]: + """Create AWS flow logs monitoring integration + + Creates a new AWS flow logs monitoring integration. + + :param aws_flow_logs_integration_request: (required) + :type aws_flow_logs_integration_request: AwsFlowLogsIntegrationRequest + :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 + 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._create_aws_flow_logs_monitoring_integration_serialize( + aws_flow_logs_integration_request=aws_flow_logs_integration_request, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "AwsMonitoringIntegration", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "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.cloud_insights_integrations.models, + ) + + + @validate_call + def create_aws_flow_logs_monitoring_integration_without_preload_content( + self, + aws_flow_logs_integration_request: AwsFlowLogsIntegrationRequest, + 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, + 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: + """Create AWS flow logs monitoring integration + + Creates a new AWS flow logs monitoring integration. + + :param aws_flow_logs_integration_request: (required) + :type aws_flow_logs_integration_request: AwsFlowLogsIntegrationRequest + :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 + 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._create_aws_flow_logs_monitoring_integration_serialize( + aws_flow_logs_integration_request=aws_flow_logs_integration_request, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "AwsMonitoringIntegration", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_aws_flow_logs_monitoring_integration_serialize( + self, + aws_flow_logs_integration_request, + aid, + _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)) + + # process the header parameters + # process the form parameters + # process the body parameter + if aws_flow_logs_integration_request is not None: + _body_params = aws_flow_logs_integration_request + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/hal+json', + 'application/json', + 'application/problem+json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/cloud-insights/integration/aws/flow-logs', + 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 + ) + + + + + @validate_call + def create_aws_inventory_monitoring_integration( + self, + aws_inventory_integration_request: AwsInventoryIntegrationRequest, + 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, + 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, + ) -> AwsMonitoringIntegration: + """Create AWS inventory monitoring integration + + Creates a new AWS inventory monitoring integration. + + :param aws_inventory_integration_request: (required) + :type aws_inventory_integration_request: AwsInventoryIntegrationRequest + :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 + 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._create_aws_inventory_monitoring_integration_serialize( + aws_inventory_integration_request=aws_inventory_integration_request, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "AwsMonitoringIntegration", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "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.cloud_insights_integrations.models, + ).data + + + @validate_call + def create_aws_inventory_monitoring_integration_with_http_info( + self, + aws_inventory_integration_request: AwsInventoryIntegrationRequest, + 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, + 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[AwsMonitoringIntegration]: + """Create AWS inventory monitoring integration + + Creates a new AWS inventory monitoring integration. + + :param aws_inventory_integration_request: (required) + :type aws_inventory_integration_request: AwsInventoryIntegrationRequest + :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 + 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._create_aws_inventory_monitoring_integration_serialize( + aws_inventory_integration_request=aws_inventory_integration_request, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "AwsMonitoringIntegration", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "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.cloud_insights_integrations.models, + ) + + + @validate_call + def create_aws_inventory_monitoring_integration_without_preload_content( + self, + aws_inventory_integration_request: AwsInventoryIntegrationRequest, + 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, + 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: + """Create AWS inventory monitoring integration + + Creates a new AWS inventory monitoring integration. + + :param aws_inventory_integration_request: (required) + :type aws_inventory_integration_request: AwsInventoryIntegrationRequest + :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 + 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._create_aws_inventory_monitoring_integration_serialize( + aws_inventory_integration_request=aws_inventory_integration_request, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "AwsMonitoringIntegration", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_aws_inventory_monitoring_integration_serialize( + self, + aws_inventory_integration_request, + aid, + _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)) + + # process the header parameters + # process the form parameters + # process the body parameter + if aws_inventory_integration_request is not None: + _body_params = aws_inventory_integration_request + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/hal+json', + 'application/json', + 'application/problem+json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/cloud-insights/integration/aws/inventory', + 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 + ) + + + + + @validate_call + def create_azure_flow_logs_monitoring_integration( + self, + azure_flow_logs_integration_request: AzureFlowLogsIntegrationRequest, + 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, + 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, + ) -> AzureMonitoringIntegration: + """Create Azure flow logs monitoring integration + + Creates a new Azure flow logs monitoring integration. + + :param azure_flow_logs_integration_request: (required) + :type azure_flow_logs_integration_request: AzureFlowLogsIntegrationRequest + :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 + 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._create_azure_flow_logs_monitoring_integration_serialize( + azure_flow_logs_integration_request=azure_flow_logs_integration_request, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "AzureMonitoringIntegration", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "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.cloud_insights_integrations.models, + ).data + + + @validate_call + def create_azure_flow_logs_monitoring_integration_with_http_info( + self, + azure_flow_logs_integration_request: AzureFlowLogsIntegrationRequest, + 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, + 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[AzureMonitoringIntegration]: + """Create Azure flow logs monitoring integration + + Creates a new Azure flow logs monitoring integration. + + :param azure_flow_logs_integration_request: (required) + :type azure_flow_logs_integration_request: AzureFlowLogsIntegrationRequest + :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 + 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._create_azure_flow_logs_monitoring_integration_serialize( + azure_flow_logs_integration_request=azure_flow_logs_integration_request, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "AzureMonitoringIntegration", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "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.cloud_insights_integrations.models, + ) + + + @validate_call + def create_azure_flow_logs_monitoring_integration_without_preload_content( + self, + azure_flow_logs_integration_request: AzureFlowLogsIntegrationRequest, + 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, + 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: + """Create Azure flow logs monitoring integration + + Creates a new Azure flow logs monitoring integration. + + :param azure_flow_logs_integration_request: (required) + :type azure_flow_logs_integration_request: AzureFlowLogsIntegrationRequest + :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 + 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._create_azure_flow_logs_monitoring_integration_serialize( + azure_flow_logs_integration_request=azure_flow_logs_integration_request, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "AzureMonitoringIntegration", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_azure_flow_logs_monitoring_integration_serialize( + self, + azure_flow_logs_integration_request, + aid, + _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)) + + # process the header parameters + # process the form parameters + # process the body parameter + if azure_flow_logs_integration_request is not None: + _body_params = azure_flow_logs_integration_request + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/hal+json', + 'application/json', + 'application/problem+json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/cloud-insights/integration/azure/flow-logs', + 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 + ) + + + + + @validate_call + def create_azure_inventory_monitoring_integration( + self, + azure_inventory_integration_request: AzureInventoryIntegrationRequest, + 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, + 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, + ) -> AzureMonitoringIntegration: + """Create Azure inventory monitoring integration + + Creates a new Azure inventory monitoring integration. + + :param azure_inventory_integration_request: (required) + :type azure_inventory_integration_request: AzureInventoryIntegrationRequest + :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 + 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._create_azure_inventory_monitoring_integration_serialize( + azure_inventory_integration_request=azure_inventory_integration_request, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "AzureMonitoringIntegration", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "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.cloud_insights_integrations.models, + ).data + + + @validate_call + def create_azure_inventory_monitoring_integration_with_http_info( + self, + azure_inventory_integration_request: AzureInventoryIntegrationRequest, + 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, + 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[AzureMonitoringIntegration]: + """Create Azure inventory monitoring integration + + Creates a new Azure inventory monitoring integration. + + :param azure_inventory_integration_request: (required) + :type azure_inventory_integration_request: AzureInventoryIntegrationRequest + :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 + 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._create_azure_inventory_monitoring_integration_serialize( + azure_inventory_integration_request=azure_inventory_integration_request, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "AzureMonitoringIntegration", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "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.cloud_insights_integrations.models, + ) + + + @validate_call + def create_azure_inventory_monitoring_integration_without_preload_content( + self, + azure_inventory_integration_request: AzureInventoryIntegrationRequest, + 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, + 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: + """Create Azure inventory monitoring integration + + Creates a new Azure inventory monitoring integration. + + :param azure_inventory_integration_request: (required) + :type azure_inventory_integration_request: AzureInventoryIntegrationRequest + :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 + 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._create_azure_inventory_monitoring_integration_serialize( + azure_inventory_integration_request=azure_inventory_integration_request, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "AzureMonitoringIntegration", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_azure_inventory_monitoring_integration_serialize( + self, + azure_inventory_integration_request, + aid, + _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)) + + # process the header parameters + # process the form parameters + # process the body parameter + if azure_inventory_integration_request is not None: + _body_params = azure_inventory_integration_request + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/hal+json', + 'application/json', + 'application/problem+json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/cloud-insights/integration/azure/inventory', + 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 + ) + + + + + @validate_call + def delete_aws_monitoring_integration( + self, + integration_id: Annotated[StrictStr, Field(description="The unique ID of the AWS or Azure inventory or flow logs monitoring integration.")], + 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, + 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, + ) -> None: + """Delete AWS integration + + Deletes a specific AWS inventory or flow logs monitoring integration using the AWS integration ID. + + :param integration_id: The unique ID of the AWS or Azure inventory or flow logs monitoring integration. (required) + :type integration_id: str + :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 + 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._delete_aws_monitoring_integration_serialize( + integration_id=integration_id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "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.cloud_insights_integrations.models, + ).data + + + @validate_call + def delete_aws_monitoring_integration_with_http_info( + self, + integration_id: Annotated[StrictStr, Field(description="The unique ID of the AWS or Azure inventory or flow logs monitoring integration.")], + 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, + 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[None]: + """Delete AWS integration + + Deletes a specific AWS inventory or flow logs monitoring integration using the AWS integration ID. + + :param integration_id: The unique ID of the AWS or Azure inventory or flow logs monitoring integration. (required) + :type integration_id: str + :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 + 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._delete_aws_monitoring_integration_serialize( + integration_id=integration_id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "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.cloud_insights_integrations.models, + ) + + + @validate_call + def delete_aws_monitoring_integration_without_preload_content( + self, + integration_id: Annotated[StrictStr, Field(description="The unique ID of the AWS or Azure inventory or flow logs monitoring integration.")], + 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, + 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: + """Delete AWS integration + + Deletes a specific AWS inventory or flow logs monitoring integration using the AWS integration ID. + + :param integration_id: The unique ID of the AWS or Azure inventory or flow logs monitoring integration. (required) + :type integration_id: str + :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 + 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._delete_aws_monitoring_integration_serialize( + integration_id=integration_id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_aws_monitoring_integration_serialize( + self, + integration_id, + aid, + _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 + if integration_id is not None: + _path_params['integrationId'] = integration_id + # process the query parameters + if aid is not None: + + _query_params.append(('aid', aid)) + + # 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/json', + 'application/problem+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/cloud-insights/integration/aws/{integrationId}', + 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 + ) + + + + + @validate_call + def delete_azure_monitoring_integration( + self, + integration_id: Annotated[StrictStr, Field(description="The unique ID of the AWS or Azure inventory or flow logs monitoring integration.")], + 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, + 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, + ) -> None: + """Delete Azure integration + + Deletes a specific Azure inventory or flow logs monitoring integration using the Azure integration ID. + + :param integration_id: The unique ID of the AWS or Azure inventory or flow logs monitoring integration. (required) + :type integration_id: str + :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 + 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._delete_azure_monitoring_integration_serialize( + integration_id=integration_id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "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.cloud_insights_integrations.models, + ).data + + + @validate_call + def delete_azure_monitoring_integration_with_http_info( + self, + integration_id: Annotated[StrictStr, Field(description="The unique ID of the AWS or Azure inventory or flow logs monitoring integration.")], + 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, + 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[None]: + """Delete Azure integration + + Deletes a specific Azure inventory or flow logs monitoring integration using the Azure integration ID. + + :param integration_id: The unique ID of the AWS or Azure inventory or flow logs monitoring integration. (required) + :type integration_id: str + :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 + 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._delete_azure_monitoring_integration_serialize( + integration_id=integration_id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "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.cloud_insights_integrations.models, + ) + + + @validate_call + def delete_azure_monitoring_integration_without_preload_content( + self, + integration_id: Annotated[StrictStr, Field(description="The unique ID of the AWS or Azure inventory or flow logs monitoring integration.")], + 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, + 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: + """Delete Azure integration + + Deletes a specific Azure inventory or flow logs monitoring integration using the Azure integration ID. + + :param integration_id: The unique ID of the AWS or Azure inventory or flow logs monitoring integration. (required) + :type integration_id: str + :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 + 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._delete_azure_monitoring_integration_serialize( + integration_id=integration_id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_azure_monitoring_integration_serialize( + self, + integration_id, + aid, + _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 + if integration_id is not None: + _path_params['integrationId'] = integration_id + # process the query parameters + if aid is not None: + + _query_params.append(('aid', aid)) + + # 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/json', + 'application/problem+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/cloud-insights/integration/azure/{integrationId}', + 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 + ) + + + + + @validate_call + def get_all_aws_monitoring_integrations( + self, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + _request_timeout: Union[ + 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, + ) -> AwsMonitoringIntegrations: + """List AWS integrations + + Retrieves all AWS inventory and flow logs monitoring integrations configured for the authenticated account group in ThousandEyes. + + :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 + 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_all_aws_monitoring_integrations_serialize( + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AwsMonitoringIntegrations", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "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.cloud_insights_integrations.models, + ).data + + + @validate_call + def get_all_aws_monitoring_integrations_with_http_info( + self, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + _request_timeout: Union[ + 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[AwsMonitoringIntegrations]: + """List AWS integrations + + Retrieves all AWS inventory and flow logs monitoring integrations configured for the authenticated account group in ThousandEyes. + + :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 + 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_all_aws_monitoring_integrations_serialize( + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AwsMonitoringIntegrations", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "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.cloud_insights_integrations.models, + ) + + + @validate_call + def get_all_aws_monitoring_integrations_without_preload_content( + self, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + _request_timeout: Union[ + 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 AWS integrations + + Retrieves all AWS inventory and flow logs monitoring integrations configured for the authenticated account group in ThousandEyes. + + :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 + 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_all_aws_monitoring_integrations_serialize( + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AwsMonitoringIntegrations", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_all_aws_monitoring_integrations_serialize( + self, + aid, + _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)) + + # 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='/cloud-insights/integration/aws', + 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 + ) + + + + + @validate_call + def get_all_azure_monitoring_integrations( + self, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + _request_timeout: Union[ + 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, + ) -> AzureMonitoringIntegrations: + """List Azure integrations + + Retrieves all Azure inventory and flow logs monitoring integrations configured for the authenticated account group in ThousandEyes. + + :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 + 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_all_azure_monitoring_integrations_serialize( + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AzureMonitoringIntegrations", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "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.cloud_insights_integrations.models, + ).data + + + @validate_call + def get_all_azure_monitoring_integrations_with_http_info( + self, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + _request_timeout: Union[ + 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[AzureMonitoringIntegrations]: + """List Azure integrations + + Retrieves all Azure inventory and flow logs monitoring integrations configured for the authenticated account group in ThousandEyes. + + :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 + 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_all_azure_monitoring_integrations_serialize( + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AzureMonitoringIntegrations", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "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.cloud_insights_integrations.models, + ) + + + @validate_call + def get_all_azure_monitoring_integrations_without_preload_content( + self, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + _request_timeout: Union[ + 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 Azure integrations + + Retrieves all Azure inventory and flow logs monitoring integrations configured for the authenticated account group in ThousandEyes. + + :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 + 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_all_azure_monitoring_integrations_serialize( + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AzureMonitoringIntegrations", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_all_azure_monitoring_integrations_serialize( + self, + aid, + _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)) + + # 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='/cloud-insights/integration/azure', + 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 + ) + + + + + @validate_call + def get_aws_flowlogs_monitoring_integration_policies( + self, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + _request_timeout: Union[ + 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, + ) -> str: + """Get AWS flow logs monitoring IAM policies + + Retrieves the AWS IAM policies required to configure an AWS flow logs monitoring integration in JSON string format for the authenticated account group. + + :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 + 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_aws_flowlogs_monitoring_integration_policies_serialize( + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "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.cloud_insights_integrations.models, + ).data + + + @validate_call + def get_aws_flowlogs_monitoring_integration_policies_with_http_info( + self, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + _request_timeout: Union[ + 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[str]: + """Get AWS flow logs monitoring IAM policies + + Retrieves the AWS IAM policies required to configure an AWS flow logs monitoring integration in JSON string format for the authenticated account group. + + :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 + 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_aws_flowlogs_monitoring_integration_policies_serialize( + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "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.cloud_insights_integrations.models, + ) + + + @validate_call + def get_aws_flowlogs_monitoring_integration_policies_without_preload_content( + self, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + _request_timeout: Union[ + 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: + """Get AWS flow logs monitoring IAM policies + + Retrieves the AWS IAM policies required to configure an AWS flow logs monitoring integration in JSON string format for the authenticated account group. + + :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 + 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_aws_flowlogs_monitoring_integration_policies_serialize( + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_aws_flowlogs_monitoring_integration_policies_serialize( + self, + aid, + _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)) + + # 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/json', + 'application/problem+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/cloud-insights/integration/aws/flow-logs/policies', + 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 + ) + + + + + @validate_call + def get_aws_inventory_monitoring_integration_policies( + self, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + _request_timeout: Union[ + 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, + ) -> str: + """Get AWS inventory monitoring IAM policies + + Retrieves the AWS IAM policies required to configure an AWS inventory monitoring integration in JSON string format for the authenticated account group. + + :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 + 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_aws_inventory_monitoring_integration_policies_serialize( + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "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.cloud_insights_integrations.models, + ).data + + + @validate_call + def get_aws_inventory_monitoring_integration_policies_with_http_info( + self, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + _request_timeout: Union[ + 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[str]: + """Get AWS inventory monitoring IAM policies + + Retrieves the AWS IAM policies required to configure an AWS inventory monitoring integration in JSON string format for the authenticated account group. + + :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 + 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_aws_inventory_monitoring_integration_policies_serialize( + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "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.cloud_insights_integrations.models, + ) + + + @validate_call + def get_aws_inventory_monitoring_integration_policies_without_preload_content( + self, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + _request_timeout: Union[ + 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: + """Get AWS inventory monitoring IAM policies + + Retrieves the AWS IAM policies required to configure an AWS inventory monitoring integration in JSON string format for the authenticated account group. + + :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 + 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_aws_inventory_monitoring_integration_policies_serialize( + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_aws_inventory_monitoring_integration_policies_serialize( + self, + aid, + _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)) + + # 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/json', + 'application/problem+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/cloud-insights/integration/aws/inventory/policies', + 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 + ) + + + + + @validate_call + def get_aws_monitoring_integration( + self, + integration_id: Annotated[StrictStr, Field(description="The unique ID of the AWS or Azure inventory or flow logs monitoring integration.")], + 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, + 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, + ) -> AwsMonitoringIntegration: + """Get AWS integration + + Retrieves details for a specific AWS inventory or flow logs monitoring integration associated with the authenticated account group using the unique integration ID. + + :param integration_id: The unique ID of the AWS or Azure inventory or flow logs monitoring integration. (required) + :type integration_id: str + :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 + 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_aws_monitoring_integration_serialize( + integration_id=integration_id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AwsMonitoringIntegration", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "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.cloud_insights_integrations.models, + ).data + + + @validate_call + def get_aws_monitoring_integration_with_http_info( + self, + integration_id: Annotated[StrictStr, Field(description="The unique ID of the AWS or Azure inventory or flow logs monitoring integration.")], + 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, + 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[AwsMonitoringIntegration]: + """Get AWS integration + + Retrieves details for a specific AWS inventory or flow logs monitoring integration associated with the authenticated account group using the unique integration ID. + + :param integration_id: The unique ID of the AWS or Azure inventory or flow logs monitoring integration. (required) + :type integration_id: str + :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 + 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_aws_monitoring_integration_serialize( + integration_id=integration_id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AwsMonitoringIntegration", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "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.cloud_insights_integrations.models, + ) + + + @validate_call + def get_aws_monitoring_integration_without_preload_content( + self, + integration_id: Annotated[StrictStr, Field(description="The unique ID of the AWS or Azure inventory or flow logs monitoring integration.")], + 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, + 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: + """Get AWS integration + + Retrieves details for a specific AWS inventory or flow logs monitoring integration associated with the authenticated account group using the unique integration ID. + + :param integration_id: The unique ID of the AWS or Azure inventory or flow logs monitoring integration. (required) + :type integration_id: str + :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 + 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_aws_monitoring_integration_serialize( + integration_id=integration_id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AwsMonitoringIntegration", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_aws_monitoring_integration_serialize( + self, + integration_id, + aid, + _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 + if integration_id is not None: + _path_params['integrationId'] = integration_id + # process the query parameters + if aid is not None: + + _query_params.append(('aid', aid)) + + # 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='/cloud-insights/integration/aws/{integrationId}', + 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 + ) + + + + + @validate_call + def get_azure_monitoring_integration( + self, + integration_id: Annotated[StrictStr, Field(description="The unique ID of the AWS or Azure inventory or flow logs monitoring integration.")], + 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, + 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, + ) -> AzureMonitoringIntegration: + """Get Azure integration + + Retrieves details for a specific Azure inventory or flow logs monitoring integration associated with the authenticated account group using the unique integration ID. + + :param integration_id: The unique ID of the AWS or Azure inventory or flow logs monitoring integration. (required) + :type integration_id: str + :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 + 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_azure_monitoring_integration_serialize( + integration_id=integration_id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AzureMonitoringIntegration", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "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.cloud_insights_integrations.models, + ).data + + + @validate_call + def get_azure_monitoring_integration_with_http_info( + self, + integration_id: Annotated[StrictStr, Field(description="The unique ID of the AWS or Azure inventory or flow logs monitoring integration.")], + 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, + 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[AzureMonitoringIntegration]: + """Get Azure integration + + Retrieves details for a specific Azure inventory or flow logs monitoring integration associated with the authenticated account group using the unique integration ID. + + :param integration_id: The unique ID of the AWS or Azure inventory or flow logs monitoring integration. (required) + :type integration_id: str + :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 + 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_azure_monitoring_integration_serialize( + integration_id=integration_id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AzureMonitoringIntegration", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "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.cloud_insights_integrations.models, + ) + + + @validate_call + def get_azure_monitoring_integration_without_preload_content( + self, + integration_id: Annotated[StrictStr, Field(description="The unique ID of the AWS or Azure inventory or flow logs monitoring integration.")], + 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, + 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: + """Get Azure integration + + Retrieves details for a specific Azure inventory or flow logs monitoring integration associated with the authenticated account group using the unique integration ID. + + :param integration_id: The unique ID of the AWS or Azure inventory or flow logs monitoring integration. (required) + :type integration_id: str + :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 + 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_azure_monitoring_integration_serialize( + integration_id=integration_id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AzureMonitoringIntegration", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_azure_monitoring_integration_serialize( + self, + integration_id, + aid, + _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 + if integration_id is not None: + _path_params['integrationId'] = integration_id + # process the query parameters + if aid is not None: + + _query_params.append(('aid', aid)) + + # 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='/cloud-insights/integration/azure/{integrationId}', + 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 + ) + + + + + @validate_call + def update_azure_flow_logs_monitoring_integration( + self, + integration_id: Annotated[StrictStr, Field(description="The unique ID of the AWS or Azure inventory or flow logs monitoring integration.")], + azure_flow_logs_integration_request: AzureFlowLogsIntegrationRequest, + 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, + 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, + ) -> AzureMonitoringIntegration: + """Update Azure flow logs monitoring integration + + Updates an existing Azure flow logs monitoring integration. + + :param integration_id: The unique ID of the AWS or Azure inventory or flow logs monitoring integration. (required) + :type integration_id: str + :param azure_flow_logs_integration_request: (required) + :type azure_flow_logs_integration_request: AzureFlowLogsIntegrationRequest + :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 + 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._update_azure_flow_logs_monitoring_integration_serialize( + integration_id=integration_id, + azure_flow_logs_integration_request=azure_flow_logs_integration_request, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AzureMonitoringIntegration", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "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.cloud_insights_integrations.models, + ).data + + + @validate_call + def update_azure_flow_logs_monitoring_integration_with_http_info( + self, + integration_id: Annotated[StrictStr, Field(description="The unique ID of the AWS or Azure inventory or flow logs monitoring integration.")], + azure_flow_logs_integration_request: AzureFlowLogsIntegrationRequest, + 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, + 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[AzureMonitoringIntegration]: + """Update Azure flow logs monitoring integration + + Updates an existing Azure flow logs monitoring integration. + + :param integration_id: The unique ID of the AWS or Azure inventory or flow logs monitoring integration. (required) + :type integration_id: str + :param azure_flow_logs_integration_request: (required) + :type azure_flow_logs_integration_request: AzureFlowLogsIntegrationRequest + :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 + 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._update_azure_flow_logs_monitoring_integration_serialize( + integration_id=integration_id, + azure_flow_logs_integration_request=azure_flow_logs_integration_request, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AzureMonitoringIntegration", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "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.cloud_insights_integrations.models, + ) + + + @validate_call + def update_azure_flow_logs_monitoring_integration_without_preload_content( + self, + integration_id: Annotated[StrictStr, Field(description="The unique ID of the AWS or Azure inventory or flow logs monitoring integration.")], + azure_flow_logs_integration_request: AzureFlowLogsIntegrationRequest, + 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, + 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: + """Update Azure flow logs monitoring integration + + Updates an existing Azure flow logs monitoring integration. + + :param integration_id: The unique ID of the AWS or Azure inventory or flow logs monitoring integration. (required) + :type integration_id: str + :param azure_flow_logs_integration_request: (required) + :type azure_flow_logs_integration_request: AzureFlowLogsIntegrationRequest + :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 + 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._update_azure_flow_logs_monitoring_integration_serialize( + integration_id=integration_id, + azure_flow_logs_integration_request=azure_flow_logs_integration_request, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AzureMonitoringIntegration", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_azure_flow_logs_monitoring_integration_serialize( + self, + integration_id, + azure_flow_logs_integration_request, + aid, + _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 + if integration_id is not None: + _path_params['integrationId'] = integration_id + # process the query parameters + if aid is not None: + + _query_params.append(('aid', aid)) + + # process the header parameters + # process the form parameters + # process the body parameter + if azure_flow_logs_integration_request is not None: + _body_params = azure_flow_logs_integration_request + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/hal+json', + 'application/json', + 'application/problem+json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/cloud-insights/integration/azure/flow-logs/{integrationId}', + 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 + ) + + + + + @validate_call + def update_azure_inventory_monitoring_integration( + self, + integration_id: Annotated[StrictStr, Field(description="The unique ID of the AWS or Azure inventory or flow logs monitoring integration.")], + azure_inventory_integration_request: AzureInventoryIntegrationRequest, + 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, + 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, + ) -> AzureMonitoringIntegration: + """Update Azure inventory monitoring integration + + Updates an existing Azure inventory monitoring integration. + + :param integration_id: The unique ID of the AWS or Azure inventory or flow logs monitoring integration. (required) + :type integration_id: str + :param azure_inventory_integration_request: (required) + :type azure_inventory_integration_request: AzureInventoryIntegrationRequest + :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 + 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._update_azure_inventory_monitoring_integration_serialize( + integration_id=integration_id, + azure_inventory_integration_request=azure_inventory_integration_request, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AzureMonitoringIntegration", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "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.cloud_insights_integrations.models, + ).data + + + @validate_call + def update_azure_inventory_monitoring_integration_with_http_info( + self, + integration_id: Annotated[StrictStr, Field(description="The unique ID of the AWS or Azure inventory or flow logs monitoring integration.")], + azure_inventory_integration_request: AzureInventoryIntegrationRequest, + 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, + 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[AzureMonitoringIntegration]: + """Update Azure inventory monitoring integration + + Updates an existing Azure inventory monitoring integration. + + :param integration_id: The unique ID of the AWS or Azure inventory or flow logs monitoring integration. (required) + :type integration_id: str + :param azure_inventory_integration_request: (required) + :type azure_inventory_integration_request: AzureInventoryIntegrationRequest + :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 + 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._update_azure_inventory_monitoring_integration_serialize( + integration_id=integration_id, + azure_inventory_integration_request=azure_inventory_integration_request, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AzureMonitoringIntegration", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "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.cloud_insights_integrations.models, + ) + + + @validate_call + def update_azure_inventory_monitoring_integration_without_preload_content( + self, + integration_id: Annotated[StrictStr, Field(description="The unique ID of the AWS or Azure inventory or flow logs monitoring integration.")], + azure_inventory_integration_request: AzureInventoryIntegrationRequest, + 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, + 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: + """Update Azure inventory monitoring integration + + Updates an existing Azure inventory monitoring integration. + + :param integration_id: The unique ID of the AWS or Azure inventory or flow logs monitoring integration. (required) + :type integration_id: str + :param azure_inventory_integration_request: (required) + :type azure_inventory_integration_request: AzureInventoryIntegrationRequest + :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 + 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._update_azure_inventory_monitoring_integration_serialize( + integration_id=integration_id, + azure_inventory_integration_request=azure_inventory_integration_request, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AzureMonitoringIntegration", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_azure_inventory_monitoring_integration_serialize( + self, + integration_id, + azure_inventory_integration_request, + aid, + _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 + if integration_id is not None: + _path_params['integrationId'] = integration_id + # process the query parameters + if aid is not None: + + _query_params.append(('aid', aid)) + + # process the header parameters + # process the form parameters + # process the body parameter + if azure_inventory_integration_request is not None: + _body_params = azure_inventory_integration_request + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/hal+json', + 'application/json', + 'application/problem+json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/cloud-insights/integration/azure/inventory/{integrationId}', + 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 + ) + + diff --git a/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/__init__.py b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/__init__.py new file mode 100644 index 000000000..091a5c5f1 --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/__init__.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +# flake8: noqa +""" + Cloud Insights Integrations API + + **Note:** All Cloud Insights APIs are not available for ThousandEyes for Government instance. The Cloud Insights Integrations API lets you programmatically manage **AWS** and **Azure** monitoring integrations in ThousandEyes. ### What You Can Do - **List** all integrations. - **Get** details for a specific integration. - **Delete** an existing integration. - **Create** integrations for: - **AWS**: inventory monitoring and flow logs monitoring. - **Azure**: inventory monitoring and flow logs monitoring. - **Update** integrations for: - **Azure**: inventory monitoring and flow logs monitoring. - **Fetch AWS IAM policy documents** required to configure AWS inventory and flow-logs integrations. - **Retrieve** the current AWS and Azure integration policy settings to understand which AWS and Azure resource groups, AWS regions, Azure subscription rules are enabled and whether CloudTrail is enabled for Cloud Insights for inventory monitoring. - **Update** policy settings to change the approved AWS resource groups, AWS regions, and Azure subscription rules that ThousandEyes should inventory. ### Scope and Tenancy All operations are scoped to the authenticated account group. Responses include only resources associated with that group. ### Payloads and formats - **Requests:** `application/json` - **Responses:** primarily `application/hal+json` for resource representations and `application/json` for policy documents. - HAL responses include `_links` with a `self` relation for direct navigation. ### Integration Types - **Inventory monitoring** - AWS: reads inventory and network topology via read-only IAM permissions. - Azure: authenticates with a Service Principal to read inventory and network topology. - **Flow logs monitoring** - AWS: reads flow logs from S3 buckets and uses SNS for notifications. - Azure: reads flow logs via **Service Bus Queue** (`serviceBusQueueUrl`). ### Policy Helpers (AWS) Dedicated endpoints return **Trusted Policy**, **Permissions Policy**, and **SNS Topic Access Policy** documents to simplify role setup for inventory and flow logs integrations. ### Notes - All example values in this specification are **fictitious**. For more information about Cloud Insights, see [Cloud Insights](https://docs.thousandeyes.com/product-documentation/cloud-insights). + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import models into model package +from thousandeyes_sdk.cloud_insights_integrations.models.aws_flow_logs_integration_request import AwsFlowLogsIntegrationRequest +from thousandeyes_sdk.cloud_insights_integrations.models.aws_integration_policy_setting import AwsIntegrationPolicySetting +from thousandeyes_sdk.cloud_insights_integrations.models.aws_inventory_integration_request import AwsInventoryIntegrationRequest +from thousandeyes_sdk.cloud_insights_integrations.models.aws_monitoring_integration import AwsMonitoringIntegration +from thousandeyes_sdk.cloud_insights_integrations.models.aws_monitoring_integrations import AwsMonitoringIntegrations +from thousandeyes_sdk.cloud_insights_integrations.models.aws_region import AwsRegion +from thousandeyes_sdk.cloud_insights_integrations.models.aws_resource_group_type import AwsResourceGroupType +from thousandeyes_sdk.cloud_insights_integrations.models.azure_flow_logs_integration_request import AzureFlowLogsIntegrationRequest +from thousandeyes_sdk.cloud_insights_integrations.models.azure_integration_policy_setting import AzureIntegrationPolicySetting +from thousandeyes_sdk.cloud_insights_integrations.models.azure_inventory_integration_request import AzureInventoryIntegrationRequest +from thousandeyes_sdk.cloud_insights_integrations.models.azure_monitoring_integration import AzureMonitoringIntegration +from thousandeyes_sdk.cloud_insights_integrations.models.azure_monitoring_integrations import AzureMonitoringIntegrations +from thousandeyes_sdk.cloud_insights_integrations.models.azure_resource_group_type import AzureResourceGroupType +from thousandeyes_sdk.cloud_insights_integrations.models.error import Error +from thousandeyes_sdk.cloud_insights_integrations.models.link import Link +from thousandeyes_sdk.cloud_insights_integrations.models.self_links import SelfLinks +from thousandeyes_sdk.cloud_insights_integrations.models.subscriptions_policy import SubscriptionsPolicy +from thousandeyes_sdk.cloud_insights_integrations.models.subscriptions_policy_rule import SubscriptionsPolicyRule +from thousandeyes_sdk.cloud_insights_integrations.models.subscriptions_policy_rule_action import SubscriptionsPolicyRuleAction +from thousandeyes_sdk.cloud_insights_integrations.models.subscriptions_policy_rule_field import SubscriptionsPolicyRuleField +from thousandeyes_sdk.cloud_insights_integrations.models.unauthorized_error import UnauthorizedError +from thousandeyes_sdk.cloud_insights_integrations.models.validation_error import ValidationError +from thousandeyes_sdk.cloud_insights_integrations.models.validation_error_item import ValidationErrorItem diff --git a/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/aws_flow_logs_integration_request.py b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/aws_flow_logs_integration_request.py new file mode 100644 index 000000000..4459db8e6 --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/aws_flow_logs_integration_request.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Cloud Insights Integrations API + + **Note:** All Cloud Insights APIs are not available for ThousandEyes for Government instance. The Cloud Insights Integrations API lets you programmatically manage **AWS** and **Azure** monitoring integrations in ThousandEyes. ### What You Can Do - **List** all integrations. - **Get** details for a specific integration. - **Delete** an existing integration. - **Create** integrations for: - **AWS**: inventory monitoring and flow logs monitoring. - **Azure**: inventory monitoring and flow logs monitoring. - **Update** integrations for: - **Azure**: inventory monitoring and flow logs monitoring. - **Fetch AWS IAM policy documents** required to configure AWS inventory and flow-logs integrations. - **Retrieve** the current AWS and Azure integration policy settings to understand which AWS and Azure resource groups, AWS regions, Azure subscription rules are enabled and whether CloudTrail is enabled for Cloud Insights for inventory monitoring. - **Update** policy settings to change the approved AWS resource groups, AWS regions, and Azure subscription rules that ThousandEyes should inventory. ### Scope and Tenancy All operations are scoped to the authenticated account group. Responses include only resources associated with that group. ### Payloads and formats - **Requests:** `application/json` - **Responses:** primarily `application/hal+json` for resource representations and `application/json` for policy documents. - HAL responses include `_links` with a `self` relation for direct navigation. ### Integration Types - **Inventory monitoring** - AWS: reads inventory and network topology via read-only IAM permissions. - Azure: authenticates with a Service Principal to read inventory and network topology. - **Flow logs monitoring** - AWS: reads flow logs from S3 buckets and uses SNS for notifications. - Azure: reads flow logs via **Service Bus Queue** (`serviceBusQueueUrl`). ### Policy Helpers (AWS) Dedicated endpoints return **Trusted Policy**, **Permissions Policy**, and **SNS Topic Access Policy** documents to simplify role setup for inventory and flow logs integrations. ### Notes - All example values in this specification are **fictitious**. For more information about Cloud Insights, see [Cloud Insights](https://docs.thousandeyes.com/product-documentation/cloud-insights). + + 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 typing import Optional, Set +from typing_extensions import Self + +class AwsFlowLogsIntegrationRequest(BaseModel): + """ + AwsFlowLogsIntegrationRequest + """ # noqa: E501 + name: StrictStr = Field(description="The name of the AWS flow logs monitoring integration.") + role_arn: StrictStr = Field(description="The ARN of the AWS role to be monitored.", alias="roleArn") + sns_topics_arns: List[StrictStr] = Field(description="The array of SNS topics ARNs.", alias="snsTopicsArns") + __properties: ClassVar[List[str]] = ["name", "roleArn", "snsTopicsArns"] + + 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 AwsFlowLogsIntegrationRequest 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 AwsFlowLogsIntegrationRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "roleArn": obj.get("roleArn"), + "snsTopicsArns": obj.get("snsTopicsArns") + }) + return _obj + + diff --git a/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/aws_integration_policy_setting.py b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/aws_integration_policy_setting.py new file mode 100644 index 000000000..a3c22251c --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/aws_integration_policy_setting.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Cloud Insights Integrations API + + **Note:** All Cloud Insights APIs are not available for ThousandEyes for Government instance. The Cloud Insights Integrations API lets you programmatically manage **AWS** and **Azure** monitoring integrations in ThousandEyes. ### What You Can Do - **List** all integrations. - **Get** details for a specific integration. - **Delete** an existing integration. - **Create** integrations for: - **AWS**: inventory monitoring and flow logs monitoring. - **Azure**: inventory monitoring and flow logs monitoring. - **Update** integrations for: - **Azure**: inventory monitoring and flow logs monitoring. - **Fetch AWS IAM policy documents** required to configure AWS inventory and flow-logs integrations. - **Retrieve** the current AWS and Azure integration policy settings to understand which AWS and Azure resource groups, AWS regions, Azure subscription rules are enabled and whether CloudTrail is enabled for Cloud Insights for inventory monitoring. - **Update** policy settings to change the approved AWS resource groups, AWS regions, and Azure subscription rules that ThousandEyes should inventory. ### Scope and Tenancy All operations are scoped to the authenticated account group. Responses include only resources associated with that group. ### Payloads and formats - **Requests:** `application/json` - **Responses:** primarily `application/hal+json` for resource representations and `application/json` for policy documents. - HAL responses include `_links` with a `self` relation for direct navigation. ### Integration Types - **Inventory monitoring** - AWS: reads inventory and network topology via read-only IAM permissions. - Azure: authenticates with a Service Principal to read inventory and network topology. - **Flow logs monitoring** - AWS: reads flow logs from S3 buckets and uses SNS for notifications. - Azure: reads flow logs via **Service Bus Queue** (`serviceBusQueueUrl`). ### Policy Helpers (AWS) Dedicated endpoints return **Trusted Policy**, **Permissions Policy**, and **SNS Topic Access Policy** documents to simplify role setup for inventory and flow logs integrations. ### Notes - All example values in this specification are **fictitious**. For more information about Cloud Insights, see [Cloud Insights](https://docs.thousandeyes.com/product-documentation/cloud-insights). + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from thousandeyes_sdk.cloud_insights_integrations.models.aws_region import AwsRegion +from thousandeyes_sdk.cloud_insights_integrations.models.aws_resource_group_type import AwsResourceGroupType +from thousandeyes_sdk.cloud_insights_integrations.models.self_links import SelfLinks +from typing import Optional, Set +from typing_extensions import Self + +class AwsIntegrationPolicySetting(BaseModel): + """ + AWS integration policy configuration that controls which resource groups and regions ThousandEyes inventories, and whether CloudTrail is enabled. + """ # noqa: E501 + enabled_resource_group_types: List[AwsResourceGroupType] = Field(description="The set of AWS resource group types included in inventory monitoring.", alias="enabledResourceGroupTypes") + enabled_regions: List[AwsRegion] = Field(description="The AWS regions that ThousandEyes inventories for the account group.", alias="enabledRegions") + enabled_cloudtrail: StrictBool = Field(description="Indicates whether CloudTrail integration is enabled for AWS inventory monitoring.", alias="enabledCloudtrail") + links: Optional[SelfLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["enabledResourceGroupTypes", "enabledRegions", "enabledCloudtrail", "_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 AwsIntegrationPolicySetting 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 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 AwsIntegrationPolicySetting from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "enabledResourceGroupTypes": obj.get("enabledResourceGroupTypes"), + "enabledRegions": obj.get("enabledRegions"), + "enabledCloudtrail": obj.get("enabledCloudtrail"), + "_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/aws_inventory_integration_request.py b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/aws_inventory_integration_request.py new file mode 100644 index 000000000..488eef153 --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/aws_inventory_integration_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Cloud Insights Integrations API + + **Note:** All Cloud Insights APIs are not available for ThousandEyes for Government instance. The Cloud Insights Integrations API lets you programmatically manage **AWS** and **Azure** monitoring integrations in ThousandEyes. ### What You Can Do - **List** all integrations. - **Get** details for a specific integration. - **Delete** an existing integration. - **Create** integrations for: - **AWS**: inventory monitoring and flow logs monitoring. - **Azure**: inventory monitoring and flow logs monitoring. - **Update** integrations for: - **Azure**: inventory monitoring and flow logs monitoring. - **Fetch AWS IAM policy documents** required to configure AWS inventory and flow-logs integrations. - **Retrieve** the current AWS and Azure integration policy settings to understand which AWS and Azure resource groups, AWS regions, Azure subscription rules are enabled and whether CloudTrail is enabled for Cloud Insights for inventory monitoring. - **Update** policy settings to change the approved AWS resource groups, AWS regions, and Azure subscription rules that ThousandEyes should inventory. ### Scope and Tenancy All operations are scoped to the authenticated account group. Responses include only resources associated with that group. ### Payloads and formats - **Requests:** `application/json` - **Responses:** primarily `application/hal+json` for resource representations and `application/json` for policy documents. - HAL responses include `_links` with a `self` relation for direct navigation. ### Integration Types - **Inventory monitoring** - AWS: reads inventory and network topology via read-only IAM permissions. - Azure: authenticates with a Service Principal to read inventory and network topology. - **Flow logs monitoring** - AWS: reads flow logs from S3 buckets and uses SNS for notifications. - Azure: reads flow logs via **Service Bus Queue** (`serviceBusQueueUrl`). ### Policy Helpers (AWS) Dedicated endpoints return **Trusted Policy**, **Permissions Policy**, and **SNS Topic Access Policy** documents to simplify role setup for inventory and flow logs integrations. ### Notes - All example values in this specification are **fictitious**. For more information about Cloud Insights, see [Cloud Insights](https://docs.thousandeyes.com/product-documentation/cloud-insights). + + 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 typing import Optional, Set +from typing_extensions import Self + +class AwsInventoryIntegrationRequest(BaseModel): + """ + AwsInventoryIntegrationRequest + """ # noqa: E501 + name: StrictStr = Field(description="The name of the AWS inventory monitoring integration.") + role_arn: StrictStr = Field(description="The ARN of the AWS role to be monitored.", alias="roleArn") + __properties: ClassVar[List[str]] = ["name", "roleArn"] + + 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 AwsInventoryIntegrationRequest 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 AwsInventoryIntegrationRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "roleArn": obj.get("roleArn") + }) + return _obj + + diff --git a/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/aws_monitoring_integration.py b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/aws_monitoring_integration.py new file mode 100644 index 000000000..ad6c9d25a --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/aws_monitoring_integration.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Cloud Insights Integrations API + + **Note:** All Cloud Insights APIs are not available for ThousandEyes for Government instance. The Cloud Insights Integrations API lets you programmatically manage **AWS** and **Azure** monitoring integrations in ThousandEyes. ### What You Can Do - **List** all integrations. - **Get** details for a specific integration. - **Delete** an existing integration. - **Create** integrations for: - **AWS**: inventory monitoring and flow logs monitoring. - **Azure**: inventory monitoring and flow logs monitoring. - **Update** integrations for: - **Azure**: inventory monitoring and flow logs monitoring. - **Fetch AWS IAM policy documents** required to configure AWS inventory and flow-logs integrations. - **Retrieve** the current AWS and Azure integration policy settings to understand which AWS and Azure resource groups, AWS regions, Azure subscription rules are enabled and whether CloudTrail is enabled for Cloud Insights for inventory monitoring. - **Update** policy settings to change the approved AWS resource groups, AWS regions, and Azure subscription rules that ThousandEyes should inventory. ### Scope and Tenancy All operations are scoped to the authenticated account group. Responses include only resources associated with that group. ### Payloads and formats - **Requests:** `application/json` - **Responses:** primarily `application/hal+json` for resource representations and `application/json` for policy documents. - HAL responses include `_links` with a `self` relation for direct navigation. ### Integration Types - **Inventory monitoring** - AWS: reads inventory and network topology via read-only IAM permissions. - Azure: authenticates with a Service Principal to read inventory and network topology. - **Flow logs monitoring** - AWS: reads flow logs from S3 buckets and uses SNS for notifications. - Azure: reads flow logs via **Service Bus Queue** (`serviceBusQueueUrl`). ### Policy Helpers (AWS) Dedicated endpoints return **Trusted Policy**, **Permissions Policy**, and **SNS Topic Access Policy** documents to simplify role setup for inventory and flow logs integrations. ### Notes - All example values in this specification are **fictitious**. For more information about Cloud Insights, see [Cloud Insights](https://docs.thousandeyes.com/product-documentation/cloud-insights). + + 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, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from thousandeyes_sdk.cloud_insights_integrations.models.self_links import SelfLinks +from typing import Optional, Set +from typing_extensions import Self + +class AwsMonitoringIntegration(BaseModel): + """ + AwsMonitoringIntegration + """ # noqa: E501 + id: StrictStr = Field(description="The unique ID for the AWS inventory or flow logs monitoring integration.") + name: StrictStr = Field(description="The name of the AWS inventory or flow logs monitoring integration.") + role_arn: StrictStr = Field(description="The ARN of the AWS role to be monitored.", alias="roleArn") + external_id: StrictStr = Field(description="The external ID associated with the account group.", alias="externalId") + monitoring_type: StrictStr = Field(description="The type of monitoring integration.", alias="monitoringType") + sns_topics_arns: Optional[List[StrictStr]] = Field(default=None, description="The array of SNS topic ARNs. Relevant only for flow logs monitoring integrations.", alias="snsTopicsArns") + links: Optional[SelfLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["id", "name", "roleArn", "externalId", "monitoringType", "snsTopicsArns", "_links"] + + @field_validator('monitoring_type') + def monitoring_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['inventory-monitoring', 'flow-logs-monitoring', 'unknown']): + raise ValueError("must be one of enum values ('inventory-monitoring', 'flow-logs-monitoring', 'unknown')") + return value + + 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 AwsMonitoringIntegration 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 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 AwsMonitoringIntegration 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"), + "roleArn": obj.get("roleArn"), + "externalId": obj.get("externalId"), + "monitoringType": obj.get("monitoringType"), + "snsTopicsArns": obj.get("snsTopicsArns"), + "_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/aws_monitoring_integrations.py b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/aws_monitoring_integrations.py new file mode 100644 index 000000000..69456c3b9 --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/aws_monitoring_integrations.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Cloud Insights Integrations API + + **Note:** All Cloud Insights APIs are not available for ThousandEyes for Government instance. The Cloud Insights Integrations API lets you programmatically manage **AWS** and **Azure** monitoring integrations in ThousandEyes. ### What You Can Do - **List** all integrations. - **Get** details for a specific integration. - **Delete** an existing integration. - **Create** integrations for: - **AWS**: inventory monitoring and flow logs monitoring. - **Azure**: inventory monitoring and flow logs monitoring. - **Update** integrations for: - **Azure**: inventory monitoring and flow logs monitoring. - **Fetch AWS IAM policy documents** required to configure AWS inventory and flow-logs integrations. - **Retrieve** the current AWS and Azure integration policy settings to understand which AWS and Azure resource groups, AWS regions, Azure subscription rules are enabled and whether CloudTrail is enabled for Cloud Insights for inventory monitoring. - **Update** policy settings to change the approved AWS resource groups, AWS regions, and Azure subscription rules that ThousandEyes should inventory. ### Scope and Tenancy All operations are scoped to the authenticated account group. Responses include only resources associated with that group. ### Payloads and formats - **Requests:** `application/json` - **Responses:** primarily `application/hal+json` for resource representations and `application/json` for policy documents. - HAL responses include `_links` with a `self` relation for direct navigation. ### Integration Types - **Inventory monitoring** - AWS: reads inventory and network topology via read-only IAM permissions. - Azure: authenticates with a Service Principal to read inventory and network topology. - **Flow logs monitoring** - AWS: reads flow logs from S3 buckets and uses SNS for notifications. - Azure: reads flow logs via **Service Bus Queue** (`serviceBusQueueUrl`). ### Policy Helpers (AWS) Dedicated endpoints return **Trusted Policy**, **Permissions Policy**, and **SNS Topic Access Policy** documents to simplify role setup for inventory and flow logs integrations. ### Notes - All example values in this specification are **fictitious**. For more information about Cloud Insights, see [Cloud Insights](https://docs.thousandeyes.com/product-documentation/cloud-insights). + + 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.cloud_insights_integrations.models.aws_monitoring_integration import AwsMonitoringIntegration +from thousandeyes_sdk.cloud_insights_integrations.models.self_links import SelfLinks +from typing import Optional, Set +from typing_extensions import Self + +class AwsMonitoringIntegrations(BaseModel): + """ + A HAL resource containing a list of AWS monitoring integrations and navigation links. + """ # noqa: E501 + integrations: List[AwsMonitoringIntegration] = Field(description="The list of AWS inventory and flow logs monitoring integrations.") + links: Optional[SelfLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["integrations", "_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 AwsMonitoringIntegrations 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 integrations (list) + _items = [] + if self.integrations: + for _item in self.integrations: + if _item: + _items.append(_item.to_dict()) + _dict['integrations'] = _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 AwsMonitoringIntegrations from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "integrations": [AwsMonitoringIntegration.from_dict(_item) for _item in obj["integrations"]] if obj.get("integrations") is not None else None, + "_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/aws_region.py b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/aws_region.py new file mode 100644 index 000000000..7fac18bec --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/aws_region.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + Cloud Insights Integrations API + + **Note:** All Cloud Insights APIs are not available for ThousandEyes for Government instance. The Cloud Insights Integrations API lets you programmatically manage **AWS** and **Azure** monitoring integrations in ThousandEyes. ### What You Can Do - **List** all integrations. - **Get** details for a specific integration. - **Delete** an existing integration. - **Create** integrations for: - **AWS**: inventory monitoring and flow logs monitoring. - **Azure**: inventory monitoring and flow logs monitoring. - **Update** integrations for: - **Azure**: inventory monitoring and flow logs monitoring. - **Fetch AWS IAM policy documents** required to configure AWS inventory and flow-logs integrations. - **Retrieve** the current AWS and Azure integration policy settings to understand which AWS and Azure resource groups, AWS regions, Azure subscription rules are enabled and whether CloudTrail is enabled for Cloud Insights for inventory monitoring. - **Update** policy settings to change the approved AWS resource groups, AWS regions, and Azure subscription rules that ThousandEyes should inventory. ### Scope and Tenancy All operations are scoped to the authenticated account group. Responses include only resources associated with that group. ### Payloads and formats - **Requests:** `application/json` - **Responses:** primarily `application/hal+json` for resource representations and `application/json` for policy documents. - HAL responses include `_links` with a `self` relation for direct navigation. ### Integration Types - **Inventory monitoring** - AWS: reads inventory and network topology via read-only IAM permissions. - Azure: authenticates with a Service Principal to read inventory and network topology. - **Flow logs monitoring** - AWS: reads flow logs from S3 buckets and uses SNS for notifications. - Azure: reads flow logs via **Service Bus Queue** (`serviceBusQueueUrl`). ### Policy Helpers (AWS) Dedicated endpoints return **Trusted Policy**, **Permissions Policy**, and **SNS Topic Access Policy** documents to simplify role setup for inventory and flow logs integrations. ### Notes - All example values in this specification are **fictitious**. For more information about Cloud Insights, see [Cloud Insights](https://docs.thousandeyes.com/product-documentation/cloud-insights). + + 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 AwsRegion(str, Enum): + """ + AWS region identifier that can be enabled for Cloud Insights inventory monitoring. + """ + + """ + allowed enum values + """ + US_MINUS_EAST_MINUS_1 = 'us-east-1' + US_MINUS_EAST_MINUS_2 = 'us-east-2' + US_MINUS_WEST_MINUS_1 = 'us-west-1' + US_MINUS_WEST_MINUS_2 = 'us-west-2' + CA_MINUS_CENTRAL_MINUS_1 = 'ca-central-1' + CA_MINUS_WEST_MINUS_1 = 'ca-west-1' + MX_MINUS_CENTRAL_MINUS_1 = 'mx-central-1' + SA_MINUS_EAST_MINUS_1 = 'sa-east-1' + EU_MINUS_CENTRAL_MINUS_1 = 'eu-central-1' + EU_MINUS_WEST_MINUS_1 = 'eu-west-1' + EU_MINUS_WEST_MINUS_2 = 'eu-west-2' + EU_MINUS_SOUTH_MINUS_1 = 'eu-south-1' + EU_MINUS_WEST_MINUS_3 = 'eu-west-3' + EU_MINUS_SOUTH_MINUS_2 = 'eu-south-2' + EU_MINUS_NORTH_MINUS_1 = 'eu-north-1' + EU_MINUS_CENTRAL_MINUS_2 = 'eu-central-2' + IL_MINUS_CENTRAL_MINUS_1 = 'il-central-1' + ME_MINUS_SOUTH_MINUS_1 = 'me-south-1' + ME_MINUS_CENTRAL_MINUS_1 = 'me-central-1' + AF_MINUS_SOUTH_MINUS_1 = 'af-south-1' + AP_MINUS_EAST_MINUS_1 = 'ap-east-1' + AP_MINUS_SOUTH_MINUS_2 = 'ap-south-2' + AP_MINUS_SOUTHEAST_MINUS_3 = 'ap-southeast-3' + AP_MINUS_SOUTHEAST_MINUS_5 = 'ap-southeast-5' + AP_MINUS_SOUTHEAST_MINUS_4 = 'ap-southeast-4' + AP_MINUS_SOUTHEAST_MINUS_7 = 'ap-southeast-7' + AP_MINUS_SOUTH_MINUS_1 = 'ap-south-1' + AP_MINUS_NORTHEAST_MINUS_3 = 'ap-northeast-3' + AP_MINUS_NORTHEAST_MINUS_2 = 'ap-northeast-2' + AP_MINUS_SOUTHEAST_MINUS_1 = 'ap-southeast-1' + AP_MINUS_SOUTHEAST_MINUS_2 = 'ap-southeast-2' + AP_MINUS_NORTHEAST_MINUS_1 = 'ap-northeast-1' + UNKNOWN = 'unknown' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AwsRegion from a JSON string""" + return cls(json.loads(json_str)) + + @classmethod + def _missing_(cls, value): + """Handle unknown values""" + return cls.UNKNOWN + diff --git a/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/aws_resource_group_type.py b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/aws_resource_group_type.py new file mode 100644 index 000000000..85f46804a --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/aws_resource_group_type.py @@ -0,0 +1,47 @@ +# coding: utf-8 + +""" + Cloud Insights Integrations API + + **Note:** All Cloud Insights APIs are not available for ThousandEyes for Government instance. The Cloud Insights Integrations API lets you programmatically manage **AWS** and **Azure** monitoring integrations in ThousandEyes. ### What You Can Do - **List** all integrations. - **Get** details for a specific integration. - **Delete** an existing integration. - **Create** integrations for: - **AWS**: inventory monitoring and flow logs monitoring. - **Azure**: inventory monitoring and flow logs monitoring. - **Update** integrations for: - **Azure**: inventory monitoring and flow logs monitoring. - **Fetch AWS IAM policy documents** required to configure AWS inventory and flow-logs integrations. - **Retrieve** the current AWS and Azure integration policy settings to understand which AWS and Azure resource groups, AWS regions, Azure subscription rules are enabled and whether CloudTrail is enabled for Cloud Insights for inventory monitoring. - **Update** policy settings to change the approved AWS resource groups, AWS regions, and Azure subscription rules that ThousandEyes should inventory. ### Scope and Tenancy All operations are scoped to the authenticated account group. Responses include only resources associated with that group. ### Payloads and formats - **Requests:** `application/json` - **Responses:** primarily `application/hal+json` for resource representations and `application/json` for policy documents. - HAL responses include `_links` with a `self` relation for direct navigation. ### Integration Types - **Inventory monitoring** - AWS: reads inventory and network topology via read-only IAM permissions. - Azure: authenticates with a Service Principal to read inventory and network topology. - **Flow logs monitoring** - AWS: reads flow logs from S3 buckets and uses SNS for notifications. - Azure: reads flow logs via **Service Bus Queue** (`serviceBusQueueUrl`). ### Policy Helpers (AWS) Dedicated endpoints return **Trusted Policy**, **Permissions Policy**, and **SNS Topic Access Policy** documents to simplify role setup for inventory and flow logs integrations. ### Notes - All example values in this specification are **fictitious**. For more information about Cloud Insights, see [Cloud Insights](https://docs.thousandeyes.com/product-documentation/cloud-insights). + + 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 AwsResourceGroupType(str, Enum): + """ + Supported AWS resource group types that can be toggled within policy settings. Note that ec2 is a mandatory resource group type and will be enabled regardless of user configuration. + """ + + """ + allowed enum values + """ + CLOUDFRONT = 'cloudfront' + EC2 = 'ec2' + EKS_MINUS_ECS = 'eks-ecs' + GLOBAL_MINUS_ACCELERATOR = 'global-accelerator' + DIRECT_MINUS_CONNECT = 'direct-connect' + S3_MINUS_BUCKET = 's3-bucket' + NETWORK_MINUS_FIREWALL = 'network-firewall' + GLOBAL_MINUS_NETWORK = 'global-network' + UNKNOWN = 'unknown' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AwsResourceGroupType from a JSON string""" + return cls(json.loads(json_str)) + + @classmethod + def _missing_(cls, value): + """Handle unknown values""" + return cls.UNKNOWN + diff --git a/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/azure_flow_logs_integration_request.py b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/azure_flow_logs_integration_request.py new file mode 100644 index 000000000..c8f301bcb --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/azure_flow_logs_integration_request.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Cloud Insights Integrations API + + **Note:** All Cloud Insights APIs are not available for ThousandEyes for Government instance. The Cloud Insights Integrations API lets you programmatically manage **AWS** and **Azure** monitoring integrations in ThousandEyes. ### What You Can Do - **List** all integrations. - **Get** details for a specific integration. - **Delete** an existing integration. - **Create** integrations for: - **AWS**: inventory monitoring and flow logs monitoring. - **Azure**: inventory monitoring and flow logs monitoring. - **Update** integrations for: - **Azure**: inventory monitoring and flow logs monitoring. - **Fetch AWS IAM policy documents** required to configure AWS inventory and flow-logs integrations. - **Retrieve** the current AWS and Azure integration policy settings to understand which AWS and Azure resource groups, AWS regions, Azure subscription rules are enabled and whether CloudTrail is enabled for Cloud Insights for inventory monitoring. - **Update** policy settings to change the approved AWS resource groups, AWS regions, and Azure subscription rules that ThousandEyes should inventory. ### Scope and Tenancy All operations are scoped to the authenticated account group. Responses include only resources associated with that group. ### Payloads and formats - **Requests:** `application/json` - **Responses:** primarily `application/hal+json` for resource representations and `application/json` for policy documents. - HAL responses include `_links` with a `self` relation for direct navigation. ### Integration Types - **Inventory monitoring** - AWS: reads inventory and network topology via read-only IAM permissions. - Azure: authenticates with a Service Principal to read inventory and network topology. - **Flow logs monitoring** - AWS: reads flow logs from S3 buckets and uses SNS for notifications. - Azure: reads flow logs via **Service Bus Queue** (`serviceBusQueueUrl`). ### Policy Helpers (AWS) Dedicated endpoints return **Trusted Policy**, **Permissions Policy**, and **SNS Topic Access Policy** documents to simplify role setup for inventory and flow logs integrations. ### Notes - All example values in this specification are **fictitious**. For more information about Cloud Insights, see [Cloud Insights](https://docs.thousandeyes.com/product-documentation/cloud-insights). + + 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 typing import Optional, Set +from typing_extensions import Self + +class AzureFlowLogsIntegrationRequest(BaseModel): + """ + AzureFlowLogsIntegrationRequest + """ # noqa: E501 + name: StrictStr = Field(description="The name of the Azure flow logs monitoring integration.") + app_id: StrictStr = Field(description="The Application (client) ID of the service principal.", alias="appId") + password: StrictStr = Field(description="The client secret value.") + azure_tenant_id: StrictStr = Field(description="The Azure Active Directory tenant ID.", alias="azureTenantId") + service_bus_queue_url: StrictStr = Field(description="The URL of the Service Bus Queue.", alias="serviceBusQueueUrl") + __properties: ClassVar[List[str]] = ["name", "appId", "password", "azureTenantId", "serviceBusQueueUrl"] + + 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 AzureFlowLogsIntegrationRequest 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 AzureFlowLogsIntegrationRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "appId": obj.get("appId"), + "password": obj.get("password"), + "azureTenantId": obj.get("azureTenantId"), + "serviceBusQueueUrl": obj.get("serviceBusQueueUrl") + }) + return _obj + + diff --git a/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/azure_integration_policy_setting.py b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/azure_integration_policy_setting.py new file mode 100644 index 000000000..f1fd7842d --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/azure_integration_policy_setting.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + Cloud Insights Integrations API + + **Note:** All Cloud Insights APIs are not available for ThousandEyes for Government instance. The Cloud Insights Integrations API lets you programmatically manage **AWS** and **Azure** monitoring integrations in ThousandEyes. ### What You Can Do - **List** all integrations. - **Get** details for a specific integration. - **Delete** an existing integration. - **Create** integrations for: - **AWS**: inventory monitoring and flow logs monitoring. - **Azure**: inventory monitoring and flow logs monitoring. - **Update** integrations for: - **Azure**: inventory monitoring and flow logs monitoring. - **Fetch AWS IAM policy documents** required to configure AWS inventory and flow-logs integrations. - **Retrieve** the current AWS and Azure integration policy settings to understand which AWS and Azure resource groups, AWS regions, Azure subscription rules are enabled and whether CloudTrail is enabled for Cloud Insights for inventory monitoring. - **Update** policy settings to change the approved AWS resource groups, AWS regions, and Azure subscription rules that ThousandEyes should inventory. ### Scope and Tenancy All operations are scoped to the authenticated account group. Responses include only resources associated with that group. ### Payloads and formats - **Requests:** `application/json` - **Responses:** primarily `application/hal+json` for resource representations and `application/json` for policy documents. - HAL responses include `_links` with a `self` relation for direct navigation. ### Integration Types - **Inventory monitoring** - AWS: reads inventory and network topology via read-only IAM permissions. - Azure: authenticates with a Service Principal to read inventory and network topology. - **Flow logs monitoring** - AWS: reads flow logs from S3 buckets and uses SNS for notifications. - Azure: reads flow logs via **Service Bus Queue** (`serviceBusQueueUrl`). ### Policy Helpers (AWS) Dedicated endpoints return **Trusted Policy**, **Permissions Policy**, and **SNS Topic Access Policy** documents to simplify role setup for inventory and flow logs integrations. ### Notes - All example values in this specification are **fictitious**. For more information about Cloud Insights, see [Cloud Insights](https://docs.thousandeyes.com/product-documentation/cloud-insights). + + 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.cloud_insights_integrations.models.azure_resource_group_type import AzureResourceGroupType +from thousandeyes_sdk.cloud_insights_integrations.models.self_links import SelfLinks +from thousandeyes_sdk.cloud_insights_integrations.models.subscriptions_policy import SubscriptionsPolicy +from typing import Optional, Set +from typing_extensions import Self + +class AzureIntegrationPolicySetting(BaseModel): + """ + Azure integration policy configuration that defines the monitored Azure resource groups and the subscription policy that ThousandEyes enforces. + """ # noqa: E501 + enabled_resource_group_types: List[AzureResourceGroupType] = Field(description="The set of Azure resource group types included in inventory monitoring.", alias="enabledResourceGroupTypes") + subscriptions_policy: SubscriptionsPolicy = Field(alias="subscriptionsPolicy") + links: Optional[SelfLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["enabledResourceGroupTypes", "subscriptionsPolicy", "_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 AzureIntegrationPolicySetting 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 subscriptions_policy + if self.subscriptions_policy: + _dict['subscriptionsPolicy'] = self.subscriptions_policy.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 AzureIntegrationPolicySetting from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "enabledResourceGroupTypes": obj.get("enabledResourceGroupTypes"), + "subscriptionsPolicy": SubscriptionsPolicy.from_dict(obj["subscriptionsPolicy"]) if obj.get("subscriptionsPolicy") is not None else None, + "_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/azure_inventory_integration_request.py b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/azure_inventory_integration_request.py new file mode 100644 index 000000000..bca5cf834 --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/azure_inventory_integration_request.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Cloud Insights Integrations API + + **Note:** All Cloud Insights APIs are not available for ThousandEyes for Government instance. The Cloud Insights Integrations API lets you programmatically manage **AWS** and **Azure** monitoring integrations in ThousandEyes. ### What You Can Do - **List** all integrations. - **Get** details for a specific integration. - **Delete** an existing integration. - **Create** integrations for: - **AWS**: inventory monitoring and flow logs monitoring. - **Azure**: inventory monitoring and flow logs monitoring. - **Update** integrations for: - **Azure**: inventory monitoring and flow logs monitoring. - **Fetch AWS IAM policy documents** required to configure AWS inventory and flow-logs integrations. - **Retrieve** the current AWS and Azure integration policy settings to understand which AWS and Azure resource groups, AWS regions, Azure subscription rules are enabled and whether CloudTrail is enabled for Cloud Insights for inventory monitoring. - **Update** policy settings to change the approved AWS resource groups, AWS regions, and Azure subscription rules that ThousandEyes should inventory. ### Scope and Tenancy All operations are scoped to the authenticated account group. Responses include only resources associated with that group. ### Payloads and formats - **Requests:** `application/json` - **Responses:** primarily `application/hal+json` for resource representations and `application/json` for policy documents. - HAL responses include `_links` with a `self` relation for direct navigation. ### Integration Types - **Inventory monitoring** - AWS: reads inventory and network topology via read-only IAM permissions. - Azure: authenticates with a Service Principal to read inventory and network topology. - **Flow logs monitoring** - AWS: reads flow logs from S3 buckets and uses SNS for notifications. - Azure: reads flow logs via **Service Bus Queue** (`serviceBusQueueUrl`). ### Policy Helpers (AWS) Dedicated endpoints return **Trusted Policy**, **Permissions Policy**, and **SNS Topic Access Policy** documents to simplify role setup for inventory and flow logs integrations. ### Notes - All example values in this specification are **fictitious**. For more information about Cloud Insights, see [Cloud Insights](https://docs.thousandeyes.com/product-documentation/cloud-insights). + + 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 typing import Optional, Set +from typing_extensions import Self + +class AzureInventoryIntegrationRequest(BaseModel): + """ + AzureInventoryIntegrationRequest + """ # noqa: E501 + name: StrictStr = Field(description="The name of the Azure inventory monitoring integration.") + app_id: StrictStr = Field(description="The Application (client) ID of the service principal.", alias="appId") + password: StrictStr = Field(description="The client secret value.") + azure_tenant_id: StrictStr = Field(description="The Azure Active Directory tenant ID.", alias="azureTenantId") + __properties: ClassVar[List[str]] = ["name", "appId", "password", "azureTenantId"] + + 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 AzureInventoryIntegrationRequest 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 AzureInventoryIntegrationRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "appId": obj.get("appId"), + "password": obj.get("password"), + "azureTenantId": obj.get("azureTenantId") + }) + return _obj + + diff --git a/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/azure_monitoring_integration.py b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/azure_monitoring_integration.py new file mode 100644 index 000000000..8088d7eef --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/azure_monitoring_integration.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + Cloud Insights Integrations API + + **Note:** All Cloud Insights APIs are not available for ThousandEyes for Government instance. The Cloud Insights Integrations API lets you programmatically manage **AWS** and **Azure** monitoring integrations in ThousandEyes. ### What You Can Do - **List** all integrations. - **Get** details for a specific integration. - **Delete** an existing integration. - **Create** integrations for: - **AWS**: inventory monitoring and flow logs monitoring. - **Azure**: inventory monitoring and flow logs monitoring. - **Update** integrations for: - **Azure**: inventory monitoring and flow logs monitoring. - **Fetch AWS IAM policy documents** required to configure AWS inventory and flow-logs integrations. - **Retrieve** the current AWS and Azure integration policy settings to understand which AWS and Azure resource groups, AWS regions, Azure subscription rules are enabled and whether CloudTrail is enabled for Cloud Insights for inventory monitoring. - **Update** policy settings to change the approved AWS resource groups, AWS regions, and Azure subscription rules that ThousandEyes should inventory. ### Scope and Tenancy All operations are scoped to the authenticated account group. Responses include only resources associated with that group. ### Payloads and formats - **Requests:** `application/json` - **Responses:** primarily `application/hal+json` for resource representations and `application/json` for policy documents. - HAL responses include `_links` with a `self` relation for direct navigation. ### Integration Types - **Inventory monitoring** - AWS: reads inventory and network topology via read-only IAM permissions. - Azure: authenticates with a Service Principal to read inventory and network topology. - **Flow logs monitoring** - AWS: reads flow logs from S3 buckets and uses SNS for notifications. - Azure: reads flow logs via **Service Bus Queue** (`serviceBusQueueUrl`). ### Policy Helpers (AWS) Dedicated endpoints return **Trusted Policy**, **Permissions Policy**, and **SNS Topic Access Policy** documents to simplify role setup for inventory and flow logs integrations. ### Notes - All example values in this specification are **fictitious**. For more information about Cloud Insights, see [Cloud Insights](https://docs.thousandeyes.com/product-documentation/cloud-insights). + + 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, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from thousandeyes_sdk.cloud_insights_integrations.models.self_links import SelfLinks +from typing import Optional, Set +from typing_extensions import Self + +class AzureMonitoringIntegration(BaseModel): + """ + AzureMonitoringIntegration + """ # noqa: E501 + id: StrictStr = Field(description="The unique ID for the Azure inventory or flow logs monitoring integration.") + name: StrictStr = Field(description="The name of the Azure inventory or flow logs monitoring integration.") + app_id: StrictStr = Field(description="The Application (client) ID of the service principal.", alias="appId") + password: StrictStr = Field(description="The client secret value. For security reasons, the client secret value is masked.") + azure_tenant_id: StrictStr = Field(description="The Azure Active Directory tenant ID.", alias="azureTenantId") + service_bus_queue_url: Optional[StrictStr] = Field(default=None, description="The URL of the Service Bus Queue. Relevant only for flow logs monitoring integrations.", alias="serviceBusQueueUrl") + monitoring_type: StrictStr = Field(description="The type of monitoring integration.", alias="monitoringType") + links: Optional[SelfLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["id", "name", "appId", "password", "azureTenantId", "serviceBusQueueUrl", "monitoringType", "_links"] + + @field_validator('monitoring_type') + def monitoring_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['azure-inventory-monitoring', 'azure-flow-logs-monitoring', 'unknown']): + raise ValueError("must be one of enum values ('azure-inventory-monitoring', 'azure-flow-logs-monitoring', 'unknown')") + return value + + 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 AzureMonitoringIntegration 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 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 AzureMonitoringIntegration 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"), + "appId": obj.get("appId"), + "password": obj.get("password"), + "azureTenantId": obj.get("azureTenantId"), + "serviceBusQueueUrl": obj.get("serviceBusQueueUrl"), + "monitoringType": obj.get("monitoringType"), + "_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/azure_monitoring_integrations.py b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/azure_monitoring_integrations.py new file mode 100644 index 000000000..9def06cc8 --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/azure_monitoring_integrations.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Cloud Insights Integrations API + + **Note:** All Cloud Insights APIs are not available for ThousandEyes for Government instance. The Cloud Insights Integrations API lets you programmatically manage **AWS** and **Azure** monitoring integrations in ThousandEyes. ### What You Can Do - **List** all integrations. - **Get** details for a specific integration. - **Delete** an existing integration. - **Create** integrations for: - **AWS**: inventory monitoring and flow logs monitoring. - **Azure**: inventory monitoring and flow logs monitoring. - **Update** integrations for: - **Azure**: inventory monitoring and flow logs monitoring. - **Fetch AWS IAM policy documents** required to configure AWS inventory and flow-logs integrations. - **Retrieve** the current AWS and Azure integration policy settings to understand which AWS and Azure resource groups, AWS regions, Azure subscription rules are enabled and whether CloudTrail is enabled for Cloud Insights for inventory monitoring. - **Update** policy settings to change the approved AWS resource groups, AWS regions, and Azure subscription rules that ThousandEyes should inventory. ### Scope and Tenancy All operations are scoped to the authenticated account group. Responses include only resources associated with that group. ### Payloads and formats - **Requests:** `application/json` - **Responses:** primarily `application/hal+json` for resource representations and `application/json` for policy documents. - HAL responses include `_links` with a `self` relation for direct navigation. ### Integration Types - **Inventory monitoring** - AWS: reads inventory and network topology via read-only IAM permissions. - Azure: authenticates with a Service Principal to read inventory and network topology. - **Flow logs monitoring** - AWS: reads flow logs from S3 buckets and uses SNS for notifications. - Azure: reads flow logs via **Service Bus Queue** (`serviceBusQueueUrl`). ### Policy Helpers (AWS) Dedicated endpoints return **Trusted Policy**, **Permissions Policy**, and **SNS Topic Access Policy** documents to simplify role setup for inventory and flow logs integrations. ### Notes - All example values in this specification are **fictitious**. For more information about Cloud Insights, see [Cloud Insights](https://docs.thousandeyes.com/product-documentation/cloud-insights). + + 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.cloud_insights_integrations.models.azure_monitoring_integration import AzureMonitoringIntegration +from thousandeyes_sdk.cloud_insights_integrations.models.self_links import SelfLinks +from typing import Optional, Set +from typing_extensions import Self + +class AzureMonitoringIntegrations(BaseModel): + """ + A HAL resource containing a list of Azure inventory and flow logs monitoring integrations. + """ # noqa: E501 + integrations: List[AzureMonitoringIntegration] = Field(description="The list of Azure inventory and flow logs monitoring integrations.") + links: Optional[SelfLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["integrations", "_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 AzureMonitoringIntegrations 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 integrations (list) + _items = [] + if self.integrations: + for _item in self.integrations: + if _item: + _items.append(_item.to_dict()) + _dict['integrations'] = _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 AzureMonitoringIntegrations from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "integrations": [AzureMonitoringIntegration.from_dict(_item) for _item in obj["integrations"]] if obj.get("integrations") is not None else None, + "_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/azure_resource_group_type.py b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/azure_resource_group_type.py new file mode 100644 index 000000000..d82309770 --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/azure_resource_group_type.py @@ -0,0 +1,45 @@ +# coding: utf-8 + +""" + Cloud Insights Integrations API + + **Note:** All Cloud Insights APIs are not available for ThousandEyes for Government instance. The Cloud Insights Integrations API lets you programmatically manage **AWS** and **Azure** monitoring integrations in ThousandEyes. ### What You Can Do - **List** all integrations. - **Get** details for a specific integration. - **Delete** an existing integration. - **Create** integrations for: - **AWS**: inventory monitoring and flow logs monitoring. - **Azure**: inventory monitoring and flow logs monitoring. - **Update** integrations for: - **Azure**: inventory monitoring and flow logs monitoring. - **Fetch AWS IAM policy documents** required to configure AWS inventory and flow-logs integrations. - **Retrieve** the current AWS and Azure integration policy settings to understand which AWS and Azure resource groups, AWS regions, Azure subscription rules are enabled and whether CloudTrail is enabled for Cloud Insights for inventory monitoring. - **Update** policy settings to change the approved AWS resource groups, AWS regions, and Azure subscription rules that ThousandEyes should inventory. ### Scope and Tenancy All operations are scoped to the authenticated account group. Responses include only resources associated with that group. ### Payloads and formats - **Requests:** `application/json` - **Responses:** primarily `application/hal+json` for resource representations and `application/json` for policy documents. - HAL responses include `_links` with a `self` relation for direct navigation. ### Integration Types - **Inventory monitoring** - AWS: reads inventory and network topology via read-only IAM permissions. - Azure: authenticates with a Service Principal to read inventory and network topology. - **Flow logs monitoring** - AWS: reads flow logs from S3 buckets and uses SNS for notifications. - Azure: reads flow logs via **Service Bus Queue** (`serviceBusQueueUrl`). ### Policy Helpers (AWS) Dedicated endpoints return **Trusted Policy**, **Permissions Policy**, and **SNS Topic Access Policy** documents to simplify role setup for inventory and flow logs integrations. ### Notes - All example values in this specification are **fictitious**. For more information about Cloud Insights, see [Cloud Insights](https://docs.thousandeyes.com/product-documentation/cloud-insights). + + 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 AzureResourceGroupType(str, Enum): + """ + Supported Azure resource group types that can be toggled within policy settings. Note that networking is a mandatory resource group type and will be enabled regardless of user configuration. + """ + + """ + allowed enum values + """ + AFD = 'afd' + SECURITY = 'security' + EXPRESS_MINUS_ROUTE = 'express-route' + VIRTUAL_MINUS_WAN = 'virtual-wan' + TRAFFIC_MINUS_MANAGER = 'traffic-manager' + NETWORKING = 'networking' + UNKNOWN = 'unknown' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AzureResourceGroupType from a JSON string""" + return cls(json.loads(json_str)) + + @classmethod + def _missing_(cls, value): + """Handle unknown values""" + return cls.UNKNOWN + diff --git a/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/error.py b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/error.py new file mode 100644 index 000000000..1a86c1c5b --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/error.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Cloud Insights Integrations API + + **Note:** All Cloud Insights APIs are not available for ThousandEyes for Government instance. The Cloud Insights Integrations API lets you programmatically manage **AWS** and **Azure** monitoring integrations in ThousandEyes. ### What You Can Do - **List** all integrations. - **Get** details for a specific integration. - **Delete** an existing integration. - **Create** integrations for: - **AWS**: inventory monitoring and flow logs monitoring. - **Azure**: inventory monitoring and flow logs monitoring. - **Update** integrations for: - **Azure**: inventory monitoring and flow logs monitoring. - **Fetch AWS IAM policy documents** required to configure AWS inventory and flow-logs integrations. - **Retrieve** the current AWS and Azure integration policy settings to understand which AWS and Azure resource groups, AWS regions, Azure subscription rules are enabled and whether CloudTrail is enabled for Cloud Insights for inventory monitoring. - **Update** policy settings to change the approved AWS resource groups, AWS regions, and Azure subscription rules that ThousandEyes should inventory. ### Scope and Tenancy All operations are scoped to the authenticated account group. Responses include only resources associated with that group. ### Payloads and formats - **Requests:** `application/json` - **Responses:** primarily `application/hal+json` for resource representations and `application/json` for policy documents. - HAL responses include `_links` with a `self` relation for direct navigation. ### Integration Types - **Inventory monitoring** - AWS: reads inventory and network topology via read-only IAM permissions. - Azure: authenticates with a Service Principal to read inventory and network topology. - **Flow logs monitoring** - AWS: reads flow logs from S3 buckets and uses SNS for notifications. - Azure: reads flow logs via **Service Bus Queue** (`serviceBusQueueUrl`). ### Policy Helpers (AWS) Dedicated endpoints return **Trusted Policy**, **Permissions Policy**, and **SNS Topic Access Policy** documents to simplify role setup for inventory and flow logs integrations. ### Notes - All example values in this specification are **fictitious**. For more information about Cloud Insights, see [Cloud Insights](https://docs.thousandeyes.com/product-documentation/cloud-insights). + + 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 typing import Optional, Set +from typing_extensions import Self + +class Error(BaseModel): + """ + Error + """ # noqa: E501 + type: Optional[StrictStr] = Field(default=None, description="A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \"about:blank\".") + title: Optional[StrictStr] = Field(default=None, description="A short, human-readable summary of the problem type.") + status: Optional[StrictInt] = Field(default=None, description="The HTTP status code generated by the origin server for this occurrence of the problem.") + detail: Optional[StrictStr] = Field(default=None, description="A human-readable explanation specific to this occurrence of the problem.") + instance: Optional[StrictStr] = Field(default=None, description="A URI reference that identifies the specific occurrence of the problem.") + __properties: ClassVar[List[str]] = ["type", "title", "status", "detail", "instance"] + + 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 Error 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 Error from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "title": obj.get("title"), + "status": obj.get("status"), + "detail": obj.get("detail"), + "instance": obj.get("instance") + }) + return _obj + + diff --git a/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/link.py b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/link.py new file mode 100644 index 000000000..5d04a1bdb --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/link.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Cloud Insights Integrations API + + **Note:** All Cloud Insights APIs are not available for ThousandEyes for Government instance. The Cloud Insights Integrations API lets you programmatically manage **AWS** and **Azure** monitoring integrations in ThousandEyes. ### What You Can Do - **List** all integrations. - **Get** details for a specific integration. - **Delete** an existing integration. - **Create** integrations for: - **AWS**: inventory monitoring and flow logs monitoring. - **Azure**: inventory monitoring and flow logs monitoring. - **Update** integrations for: - **Azure**: inventory monitoring and flow logs monitoring. - **Fetch AWS IAM policy documents** required to configure AWS inventory and flow-logs integrations. - **Retrieve** the current AWS and Azure integration policy settings to understand which AWS and Azure resource groups, AWS regions, Azure subscription rules are enabled and whether CloudTrail is enabled for Cloud Insights for inventory monitoring. - **Update** policy settings to change the approved AWS resource groups, AWS regions, and Azure subscription rules that ThousandEyes should inventory. ### Scope and Tenancy All operations are scoped to the authenticated account group. Responses include only resources associated with that group. ### Payloads and formats - **Requests:** `application/json` - **Responses:** primarily `application/hal+json` for resource representations and `application/json` for policy documents. - HAL responses include `_links` with a `self` relation for direct navigation. ### Integration Types - **Inventory monitoring** - AWS: reads inventory and network topology via read-only IAM permissions. - Azure: authenticates with a Service Principal to read inventory and network topology. - **Flow logs monitoring** - AWS: reads flow logs from S3 buckets and uses SNS for notifications. - Azure: reads flow logs via **Service Bus Queue** (`serviceBusQueueUrl`). ### Policy Helpers (AWS) Dedicated endpoints return **Trusted Policy**, **Permissions Policy**, and **SNS Topic Access Policy** documents to simplify role setup for inventory and flow logs integrations. ### Notes - All example values in this specification are **fictitious**. For more information about Cloud Insights, see [Cloud Insights](https://docs.thousandeyes.com/product-documentation/cloud-insights). + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class Link(BaseModel): + """ + A hyperlink from the containing resource to a URI. + """ # noqa: E501 + href: StrictStr = Field(description="Its value is either a URI [RFC3986] or a URI template [RFC6570].") + templated: Optional[StrictBool] = Field(default=None, description="Should be true when the link object's \"href\" property is a URI template.") + type: Optional[StrictStr] = Field(default=None, description="Used as a hint to indicate the media type expected when dereferencing the target resource.") + deprecation: Optional[StrictStr] = Field(default=None, description="Its presence indicates that the link is to be deprecated at a future date. Its value is a URL that should provide further information about the deprecation.") + name: Optional[StrictStr] = Field(default=None, description="Its value may be used as a secondary key for selecting link objects that share the same relation type.") + profile: Optional[StrictStr] = Field(default=None, description="A URI that hints about the profile of the target resource.") + title: Optional[StrictStr] = Field(default=None, description="Intended for labelling the link with a human-readable identifier") + hreflang: Optional[StrictStr] = Field(default=None, description="Indicates the language of the target resource") + __properties: ClassVar[List[str]] = ["href", "templated", "type", "deprecation", "name", "profile", "title", "hreflang"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + extra="allow", + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Link 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 Link from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "href": obj.get("href"), + "templated": obj.get("templated"), + "type": obj.get("type"), + "deprecation": obj.get("deprecation"), + "name": obj.get("name"), + "profile": obj.get("profile"), + "title": obj.get("title"), + "hreflang": obj.get("hreflang") + }) + return _obj + + diff --git a/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/self_links.py b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/self_links.py new file mode 100644 index 000000000..0a7c4f12b --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/self_links.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Cloud Insights Integrations API + + **Note:** All Cloud Insights APIs are not available for ThousandEyes for Government instance. The Cloud Insights Integrations API lets you programmatically manage **AWS** and **Azure** monitoring integrations in ThousandEyes. ### What You Can Do - **List** all integrations. - **Get** details for a specific integration. - **Delete** an existing integration. - **Create** integrations for: - **AWS**: inventory monitoring and flow logs monitoring. - **Azure**: inventory monitoring and flow logs monitoring. - **Update** integrations for: - **Azure**: inventory monitoring and flow logs monitoring. - **Fetch AWS IAM policy documents** required to configure AWS inventory and flow-logs integrations. - **Retrieve** the current AWS and Azure integration policy settings to understand which AWS and Azure resource groups, AWS regions, Azure subscription rules are enabled and whether CloudTrail is enabled for Cloud Insights for inventory monitoring. - **Update** policy settings to change the approved AWS resource groups, AWS regions, and Azure subscription rules that ThousandEyes should inventory. ### Scope and Tenancy All operations are scoped to the authenticated account group. Responses include only resources associated with that group. ### Payloads and formats - **Requests:** `application/json` - **Responses:** primarily `application/hal+json` for resource representations and `application/json` for policy documents. - HAL responses include `_links` with a `self` relation for direct navigation. ### Integration Types - **Inventory monitoring** - AWS: reads inventory and network topology via read-only IAM permissions. - Azure: authenticates with a Service Principal to read inventory and network topology. - **Flow logs monitoring** - AWS: reads flow logs from S3 buckets and uses SNS for notifications. - Azure: reads flow logs via **Service Bus Queue** (`serviceBusQueueUrl`). ### Policy Helpers (AWS) Dedicated endpoints return **Trusted Policy**, **Permissions Policy**, and **SNS Topic Access Policy** documents to simplify role setup for inventory and flow logs integrations. ### Notes - All example values in this specification are **fictitious**. For more information about Cloud Insights, see [Cloud Insights](https://docs.thousandeyes.com/product-documentation/cloud-insights). + + 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.cloud_insights_integrations.models.link import Link +from typing import Optional, Set +from typing_extensions import Self + +class SelfLinks(BaseModel): + """ + A links object containing the self link. + """ # noqa: E501 + var_self: Optional[Link] = Field(default=None, alias="self") + __properties: ClassVar[List[str]] = ["self"] + + 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 SelfLinks from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of var_self + if self.var_self: + _dict['self'] = self.var_self.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SelfLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "self": Link.from_dict(obj["self"]) if obj.get("self") is not None else None + }) + return _obj + + diff --git a/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/subscriptions_policy.py b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/subscriptions_policy.py new file mode 100644 index 000000000..688c55521 --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/subscriptions_policy.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Cloud Insights Integrations API + + **Note:** All Cloud Insights APIs are not available for ThousandEyes for Government instance. The Cloud Insights Integrations API lets you programmatically manage **AWS** and **Azure** monitoring integrations in ThousandEyes. ### What You Can Do - **List** all integrations. - **Get** details for a specific integration. - **Delete** an existing integration. - **Create** integrations for: - **AWS**: inventory monitoring and flow logs monitoring. - **Azure**: inventory monitoring and flow logs monitoring. - **Update** integrations for: - **Azure**: inventory monitoring and flow logs monitoring. - **Fetch AWS IAM policy documents** required to configure AWS inventory and flow-logs integrations. - **Retrieve** the current AWS and Azure integration policy settings to understand which AWS and Azure resource groups, AWS regions, Azure subscription rules are enabled and whether CloudTrail is enabled for Cloud Insights for inventory monitoring. - **Update** policy settings to change the approved AWS resource groups, AWS regions, and Azure subscription rules that ThousandEyes should inventory. ### Scope and Tenancy All operations are scoped to the authenticated account group. Responses include only resources associated with that group. ### Payloads and formats - **Requests:** `application/json` - **Responses:** primarily `application/hal+json` for resource representations and `application/json` for policy documents. - HAL responses include `_links` with a `self` relation for direct navigation. ### Integration Types - **Inventory monitoring** - AWS: reads inventory and network topology via read-only IAM permissions. - Azure: authenticates with a Service Principal to read inventory and network topology. - **Flow logs monitoring** - AWS: reads flow logs from S3 buckets and uses SNS for notifications. - Azure: reads flow logs via **Service Bus Queue** (`serviceBusQueueUrl`). ### Policy Helpers (AWS) Dedicated endpoints return **Trusted Policy**, **Permissions Policy**, and **SNS Topic Access Policy** documents to simplify role setup for inventory and flow logs integrations. ### Notes - All example values in this specification are **fictitious**. For more information about Cloud Insights, see [Cloud Insights](https://docs.thousandeyes.com/product-documentation/cloud-insights). + + 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 +from typing_extensions import Annotated +from thousandeyes_sdk.cloud_insights_integrations.models.subscriptions_policy_rule import SubscriptionsPolicyRule +from thousandeyes_sdk.cloud_insights_integrations.models.subscriptions_policy_rule_action import SubscriptionsPolicyRuleAction +from typing import Optional, Set +from typing_extensions import Self + +class SubscriptionsPolicy(BaseModel): + """ + Policy document that controls which Azure subscriptions are inventoried. Up to 10 rules can be provided. Rules are evaluated in order; if none match, the defaultAction is applied. + """ # noqa: E501 + rules: Annotated[List[SubscriptionsPolicyRule], Field(max_length=10)] = Field(description="Ordered list of subscription policy rules. Maximum of 10 entries.") + default_action: SubscriptionsPolicyRuleAction = Field(alias="defaultAction") + __properties: ClassVar[List[str]] = ["rules", "defaultAction"] + + 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 SubscriptionsPolicy 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 rules (list) + _items = [] + if self.rules: + for _item in self.rules: + if _item: + _items.append(_item.to_dict()) + _dict['rules'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubscriptionsPolicy from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rules": [SubscriptionsPolicyRule.from_dict(_item) for _item in obj["rules"]] if obj.get("rules") is not None else None, + "defaultAction": obj.get("defaultAction") + }) + return _obj + + diff --git a/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/subscriptions_policy_rule.py b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/subscriptions_policy_rule.py new file mode 100644 index 000000000..c7afd14ea --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/subscriptions_policy_rule.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Cloud Insights Integrations API + + **Note:** All Cloud Insights APIs are not available for ThousandEyes for Government instance. The Cloud Insights Integrations API lets you programmatically manage **AWS** and **Azure** monitoring integrations in ThousandEyes. ### What You Can Do - **List** all integrations. - **Get** details for a specific integration. - **Delete** an existing integration. - **Create** integrations for: - **AWS**: inventory monitoring and flow logs monitoring. - **Azure**: inventory monitoring and flow logs monitoring. - **Update** integrations for: - **Azure**: inventory monitoring and flow logs monitoring. - **Fetch AWS IAM policy documents** required to configure AWS inventory and flow-logs integrations. - **Retrieve** the current AWS and Azure integration policy settings to understand which AWS and Azure resource groups, AWS regions, Azure subscription rules are enabled and whether CloudTrail is enabled for Cloud Insights for inventory monitoring. - **Update** policy settings to change the approved AWS resource groups, AWS regions, and Azure subscription rules that ThousandEyes should inventory. ### Scope and Tenancy All operations are scoped to the authenticated account group. Responses include only resources associated with that group. ### Payloads and formats - **Requests:** `application/json` - **Responses:** primarily `application/hal+json` for resource representations and `application/json` for policy documents. - HAL responses include `_links` with a `self` relation for direct navigation. ### Integration Types - **Inventory monitoring** - AWS: reads inventory and network topology via read-only IAM permissions. - Azure: authenticates with a Service Principal to read inventory and network topology. - **Flow logs monitoring** - AWS: reads flow logs from S3 buckets and uses SNS for notifications. - Azure: reads flow logs via **Service Bus Queue** (`serviceBusQueueUrl`). ### Policy Helpers (AWS) Dedicated endpoints return **Trusted Policy**, **Permissions Policy**, and **SNS Topic Access Policy** documents to simplify role setup for inventory and flow logs integrations. ### Notes - All example values in this specification are **fictitious**. For more information about Cloud Insights, see [Cloud Insights](https://docs.thousandeyes.com/product-documentation/cloud-insights). + + 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.cloud_insights_integrations.models.subscriptions_policy_rule_action import SubscriptionsPolicyRuleAction +from thousandeyes_sdk.cloud_insights_integrations.models.subscriptions_policy_rule_field import SubscriptionsPolicyRuleField +from typing import Optional, Set +from typing_extensions import Self + +class SubscriptionsPolicyRule(BaseModel): + """ + A single subscription rule consisting of a field, pattern, and action. + """ # noqa: E501 + var_field: SubscriptionsPolicyRuleField = Field(alias="field") + pattern: StrictStr = Field(description="String or regular expression used to match subscription identifiers or names.") + action: SubscriptionsPolicyRuleAction + __properties: ClassVar[List[str]] = ["field", "pattern", "action"] + + 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 SubscriptionsPolicyRule 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 SubscriptionsPolicyRule from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "field": obj.get("field"), + "pattern": obj.get("pattern"), + "action": obj.get("action") + }) + return _obj + + diff --git a/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/subscriptions_policy_rule_action.py b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/subscriptions_policy_rule_action.py new file mode 100644 index 000000000..e36d37510 --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/subscriptions_policy_rule_action.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + Cloud Insights Integrations API + + **Note:** All Cloud Insights APIs are not available for ThousandEyes for Government instance. The Cloud Insights Integrations API lets you programmatically manage **AWS** and **Azure** monitoring integrations in ThousandEyes. ### What You Can Do - **List** all integrations. - **Get** details for a specific integration. - **Delete** an existing integration. - **Create** integrations for: - **AWS**: inventory monitoring and flow logs monitoring. - **Azure**: inventory monitoring and flow logs monitoring. - **Update** integrations for: - **Azure**: inventory monitoring and flow logs monitoring. - **Fetch AWS IAM policy documents** required to configure AWS inventory and flow-logs integrations. - **Retrieve** the current AWS and Azure integration policy settings to understand which AWS and Azure resource groups, AWS regions, Azure subscription rules are enabled and whether CloudTrail is enabled for Cloud Insights for inventory monitoring. - **Update** policy settings to change the approved AWS resource groups, AWS regions, and Azure subscription rules that ThousandEyes should inventory. ### Scope and Tenancy All operations are scoped to the authenticated account group. Responses include only resources associated with that group. ### Payloads and formats - **Requests:** `application/json` - **Responses:** primarily `application/hal+json` for resource representations and `application/json` for policy documents. - HAL responses include `_links` with a `self` relation for direct navigation. ### Integration Types - **Inventory monitoring** - AWS: reads inventory and network topology via read-only IAM permissions. - Azure: authenticates with a Service Principal to read inventory and network topology. - **Flow logs monitoring** - AWS: reads flow logs from S3 buckets and uses SNS for notifications. - Azure: reads flow logs via **Service Bus Queue** (`serviceBusQueueUrl`). ### Policy Helpers (AWS) Dedicated endpoints return **Trusted Policy**, **Permissions Policy**, and **SNS Topic Access Policy** documents to simplify role setup for inventory and flow logs integrations. ### Notes - All example values in this specification are **fictitious**. For more information about Cloud Insights, see [Cloud Insights](https://docs.thousandeyes.com/product-documentation/cloud-insights). + + 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 SubscriptionsPolicyRuleAction(str, Enum): + """ + Action applied when a subscriptions policy rule matches. + """ + + """ + allowed enum values + """ + INCLUDE = 'include' + EXCLUDE = 'exclude' + UNKNOWN = 'unknown' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of SubscriptionsPolicyRuleAction from a JSON string""" + return cls(json.loads(json_str)) + + @classmethod + def _missing_(cls, value): + """Handle unknown values""" + return cls.UNKNOWN + diff --git a/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/subscriptions_policy_rule_field.py b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/subscriptions_policy_rule_field.py new file mode 100644 index 000000000..92b209ded --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/subscriptions_policy_rule_field.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + Cloud Insights Integrations API + + **Note:** All Cloud Insights APIs are not available for ThousandEyes for Government instance. The Cloud Insights Integrations API lets you programmatically manage **AWS** and **Azure** monitoring integrations in ThousandEyes. ### What You Can Do - **List** all integrations. - **Get** details for a specific integration. - **Delete** an existing integration. - **Create** integrations for: - **AWS**: inventory monitoring and flow logs monitoring. - **Azure**: inventory monitoring and flow logs monitoring. - **Update** integrations for: - **Azure**: inventory monitoring and flow logs monitoring. - **Fetch AWS IAM policy documents** required to configure AWS inventory and flow-logs integrations. - **Retrieve** the current AWS and Azure integration policy settings to understand which AWS and Azure resource groups, AWS regions, Azure subscription rules are enabled and whether CloudTrail is enabled for Cloud Insights for inventory monitoring. - **Update** policy settings to change the approved AWS resource groups, AWS regions, and Azure subscription rules that ThousandEyes should inventory. ### Scope and Tenancy All operations are scoped to the authenticated account group. Responses include only resources associated with that group. ### Payloads and formats - **Requests:** `application/json` - **Responses:** primarily `application/hal+json` for resource representations and `application/json` for policy documents. - HAL responses include `_links` with a `self` relation for direct navigation. ### Integration Types - **Inventory monitoring** - AWS: reads inventory and network topology via read-only IAM permissions. - Azure: authenticates with a Service Principal to read inventory and network topology. - **Flow logs monitoring** - AWS: reads flow logs from S3 buckets and uses SNS for notifications. - Azure: reads flow logs via **Service Bus Queue** (`serviceBusQueueUrl`). ### Policy Helpers (AWS) Dedicated endpoints return **Trusted Policy**, **Permissions Policy**, and **SNS Topic Access Policy** documents to simplify role setup for inventory and flow logs integrations. ### Notes - All example values in this specification are **fictitious**. For more information about Cloud Insights, see [Cloud Insights](https://docs.thousandeyes.com/product-documentation/cloud-insights). + + 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 SubscriptionsPolicyRuleField(str, Enum): + """ + Identifies whether the rule evaluates subscription IDs or subscription names. + """ + + """ + allowed enum values + """ + SUBSCRIPTION_MINUS_ID = 'subscription-id' + SUBSCRIPTION_MINUS_NAME = 'subscription-name' + UNKNOWN = 'unknown' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of SubscriptionsPolicyRuleField from a JSON string""" + return cls(json.loads(json_str)) + + @classmethod + def _missing_(cls, value): + """Handle unknown values""" + return cls.UNKNOWN + diff --git a/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/unauthorized_error.py b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/unauthorized_error.py new file mode 100644 index 000000000..8d5f0817b --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/unauthorized_error.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Cloud Insights Integrations API + + **Note:** All Cloud Insights APIs are not available for ThousandEyes for Government instance. The Cloud Insights Integrations API lets you programmatically manage **AWS** and **Azure** monitoring integrations in ThousandEyes. ### What You Can Do - **List** all integrations. - **Get** details for a specific integration. - **Delete** an existing integration. - **Create** integrations for: - **AWS**: inventory monitoring and flow logs monitoring. - **Azure**: inventory monitoring and flow logs monitoring. - **Update** integrations for: - **Azure**: inventory monitoring and flow logs monitoring. - **Fetch AWS IAM policy documents** required to configure AWS inventory and flow-logs integrations. - **Retrieve** the current AWS and Azure integration policy settings to understand which AWS and Azure resource groups, AWS regions, Azure subscription rules are enabled and whether CloudTrail is enabled for Cloud Insights for inventory monitoring. - **Update** policy settings to change the approved AWS resource groups, AWS regions, and Azure subscription rules that ThousandEyes should inventory. ### Scope and Tenancy All operations are scoped to the authenticated account group. Responses include only resources associated with that group. ### Payloads and formats - **Requests:** `application/json` - **Responses:** primarily `application/hal+json` for resource representations and `application/json` for policy documents. - HAL responses include `_links` with a `self` relation for direct navigation. ### Integration Types - **Inventory monitoring** - AWS: reads inventory and network topology via read-only IAM permissions. - Azure: authenticates with a Service Principal to read inventory and network topology. - **Flow logs monitoring** - AWS: reads flow logs from S3 buckets and uses SNS for notifications. - Azure: reads flow logs via **Service Bus Queue** (`serviceBusQueueUrl`). ### Policy Helpers (AWS) Dedicated endpoints return **Trusted Policy**, **Permissions Policy**, and **SNS Topic Access Policy** documents to simplify role setup for inventory and flow logs integrations. ### Notes - All example values in this specification are **fictitious**. For more information about Cloud Insights, see [Cloud Insights](https://docs.thousandeyes.com/product-documentation/cloud-insights). + + 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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UnauthorizedError(BaseModel): + """ + UnauthorizedError + """ # noqa: E501 + error: Optional[StrictStr] = None + error_description: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["error", "error_description"] + + 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 UnauthorizedError 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 UnauthorizedError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": obj.get("error"), + "error_description": obj.get("error_description") + }) + return _obj + + diff --git a/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/validation_error.py b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/validation_error.py new file mode 100644 index 000000000..51a629117 --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/validation_error.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Cloud Insights Integrations API + + **Note:** All Cloud Insights APIs are not available for ThousandEyes for Government instance. The Cloud Insights Integrations API lets you programmatically manage **AWS** and **Azure** monitoring integrations in ThousandEyes. ### What You Can Do - **List** all integrations. - **Get** details for a specific integration. - **Delete** an existing integration. - **Create** integrations for: - **AWS**: inventory monitoring and flow logs monitoring. - **Azure**: inventory monitoring and flow logs monitoring. - **Update** integrations for: - **Azure**: inventory monitoring and flow logs monitoring. - **Fetch AWS IAM policy documents** required to configure AWS inventory and flow-logs integrations. - **Retrieve** the current AWS and Azure integration policy settings to understand which AWS and Azure resource groups, AWS regions, Azure subscription rules are enabled and whether CloudTrail is enabled for Cloud Insights for inventory monitoring. - **Update** policy settings to change the approved AWS resource groups, AWS regions, and Azure subscription rules that ThousandEyes should inventory. ### Scope and Tenancy All operations are scoped to the authenticated account group. Responses include only resources associated with that group. ### Payloads and formats - **Requests:** `application/json` - **Responses:** primarily `application/hal+json` for resource representations and `application/json` for policy documents. - HAL responses include `_links` with a `self` relation for direct navigation. ### Integration Types - **Inventory monitoring** - AWS: reads inventory and network topology via read-only IAM permissions. - Azure: authenticates with a Service Principal to read inventory and network topology. - **Flow logs monitoring** - AWS: reads flow logs from S3 buckets and uses SNS for notifications. - Azure: reads flow logs via **Service Bus Queue** (`serviceBusQueueUrl`). ### Policy Helpers (AWS) Dedicated endpoints return **Trusted Policy**, **Permissions Policy**, and **SNS Topic Access Policy** documents to simplify role setup for inventory and flow logs integrations. ### Notes - All example values in this specification are **fictitious**. For more information about Cloud Insights, see [Cloud Insights](https://docs.thousandeyes.com/product-documentation/cloud-insights). + + 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.cloud_insights_integrations.models.validation_error_item import ValidationErrorItem +from typing import Optional, Set +from typing_extensions import Self + +class ValidationError(BaseModel): + """ + ValidationError + """ # noqa: E501 + type: Optional[StrictStr] = Field(default=None, description="A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \"about:blank\".") + title: Optional[StrictStr] = Field(default=None, description="A short, human-readable summary of the problem type.") + status: Optional[StrictInt] = Field(default=None, description="The HTTP status code generated by the origin server for this occurrence of the problem.") + detail: Optional[StrictStr] = Field(default=None, description="A human-readable explanation specific to this occurrence of the problem.") + instance: Optional[StrictStr] = Field(default=None, description="A URI reference that identifies the specific occurrence of the problem.") + errors: Optional[List[ValidationErrorItem]] = Field(default=None, description="(Optional) When multiple errors occur, the details for each error are listed.") + __properties: ClassVar[List[str]] = ["type", "title", "status", "detail", "instance", "errors"] + + 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 ValidationError 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 errors (list) + _items = [] + if self.errors: + for _item in self.errors: + if _item: + _items.append(_item.to_dict()) + _dict['errors'] = _items + # set to None if errors (nullable) is None + # and model_fields_set contains the field + if self.errors is None and "errors" in self.model_fields_set: + _dict['errors'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ValidationError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "title": obj.get("title"), + "status": obj.get("status"), + "detail": obj.get("detail"), + "instance": obj.get("instance"), + "errors": [ValidationErrorItem.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None + }) + return _obj + + diff --git a/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/validation_error_item.py b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/validation_error_item.py new file mode 100644 index 000000000..64bbb303f --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/models/validation_error_item.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Cloud Insights Integrations API + + **Note:** All Cloud Insights APIs are not available for ThousandEyes for Government instance. The Cloud Insights Integrations API lets you programmatically manage **AWS** and **Azure** monitoring integrations in ThousandEyes. ### What You Can Do - **List** all integrations. - **Get** details for a specific integration. - **Delete** an existing integration. - **Create** integrations for: - **AWS**: inventory monitoring and flow logs monitoring. - **Azure**: inventory monitoring and flow logs monitoring. - **Update** integrations for: - **Azure**: inventory monitoring and flow logs monitoring. - **Fetch AWS IAM policy documents** required to configure AWS inventory and flow-logs integrations. - **Retrieve** the current AWS and Azure integration policy settings to understand which AWS and Azure resource groups, AWS regions, Azure subscription rules are enabled and whether CloudTrail is enabled for Cloud Insights for inventory monitoring. - **Update** policy settings to change the approved AWS resource groups, AWS regions, and Azure subscription rules that ThousandEyes should inventory. ### Scope and Tenancy All operations are scoped to the authenticated account group. Responses include only resources associated with that group. ### Payloads and formats - **Requests:** `application/json` - **Responses:** primarily `application/hal+json` for resource representations and `application/json` for policy documents. - HAL responses include `_links` with a `self` relation for direct navigation. ### Integration Types - **Inventory monitoring** - AWS: reads inventory and network topology via read-only IAM permissions. - Azure: authenticates with a Service Principal to read inventory and network topology. - **Flow logs monitoring** - AWS: reads flow logs from S3 buckets and uses SNS for notifications. - Azure: reads flow logs via **Service Bus Queue** (`serviceBusQueueUrl`). ### Policy Helpers (AWS) Dedicated endpoints return **Trusted Policy**, **Permissions Policy**, and **SNS Topic Access Policy** documents to simplify role setup for inventory and flow logs integrations. ### Notes - All example values in this specification are **fictitious**. For more information about Cloud Insights, see [Cloud Insights](https://docs.thousandeyes.com/product-documentation/cloud-insights). + + 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 ValidationErrorItem(BaseModel): + """ + ValidationErrorItem + """ # noqa: E501 + code: Optional[StrictStr] = Field(default=None, description="(Optional) A unique error type/code that can be referenced in the documentation for further details.") + var_field: Optional[StrictStr] = Field(default=None, description="Identifies the field that triggered this particular error.", alias="field") + message: Optional[StrictStr] = Field(default=None, description="A short, human-readable summary of the error.") + __properties: ClassVar[List[str]] = ["code", "field", "message"] + + 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 ValidationErrorItem 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 ValidationErrorItem from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "field": obj.get("field"), + "message": obj.get("message") + }) + return _obj + + diff --git a/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/py.typed b/thousandeyes-sdk-cloud-insights-integrations/src/thousandeyes_sdk/cloud_insights_integrations/py.typed new file mode 100644 index 000000000..e69de29bb diff --git a/thousandeyes-sdk-cloud-insights-integrations/test/__init__.py b/thousandeyes-sdk-cloud-insights-integrations/test/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/thousandeyes-sdk-cloud-insights-integrations/test/conftest.py b/thousandeyes-sdk-cloud-insights-integrations/test/conftest.py new file mode 100644 index 000000000..2edba7b32 --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/test/conftest.py @@ -0,0 +1,7 @@ +import sys +from pathlib import Path + +_repo_root = Path(__file__).resolve().parents[2] +_core_test_support = _repo_root / "thousandeyes-sdk-core" / "test" +if str(_core_test_support) not in sys.path: + sys.path.insert(0, str(_core_test_support)) diff --git a/thousandeyes-sdk-cloud-insights-integrations/test/integration_test_utils.py b/thousandeyes-sdk-cloud-insights-integrations/test/integration_test_utils.py new file mode 100644 index 000000000..a04874675 --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/test/integration_test_utils.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + Cloud Insights Integrations API + + **Note:** All Cloud Insights APIs are not available for ThousandEyes for Government instance. The Cloud Insights Integrations API lets you programmatically manage **AWS** and **Azure** monitoring integrations in ThousandEyes. ### What You Can Do - **List** all integrations. - **Get** details for a specific integration. - **Delete** an existing integration. - **Create** integrations for: - **AWS**: inventory monitoring and flow logs monitoring. - **Azure**: inventory monitoring and flow logs monitoring. - **Update** integrations for: - **Azure**: inventory monitoring and flow logs monitoring. - **Fetch AWS IAM policy documents** required to configure AWS inventory and flow-logs integrations. - **Retrieve** the current AWS and Azure integration policy settings to understand which AWS and Azure resource groups, AWS regions, Azure subscription rules are enabled and whether CloudTrail is enabled for Cloud Insights for inventory monitoring. - **Update** policy settings to change the approved AWS resource groups, AWS regions, and Azure subscription rules that ThousandEyes should inventory. ### Scope and Tenancy All operations are scoped to the authenticated account group. Responses include only resources associated with that group. ### Payloads and formats - **Requests:** `application/json` - **Responses:** primarily `application/hal+json` for resource representations and `application/json` for policy documents. - HAL responses include `_links` with a `self` relation for direct navigation. ### Integration Types - **Inventory monitoring** - AWS: reads inventory and network topology via read-only IAM permissions. - Azure: authenticates with a Service Principal to read inventory and network topology. - **Flow logs monitoring** - AWS: reads flow logs from S3 buckets and uses SNS for notifications. - Azure: reads flow logs via **Service Bus Queue** (`serviceBusQueueUrl`). ### Policy Helpers (AWS) Dedicated endpoints return **Trusted Policy**, **Permissions Policy**, and **SNS Topic Access Policy** documents to simplify role setup for inventory and flow logs integrations. ### Notes - All example values in this specification are **fictitious**. For more information about Cloud Insights, see [Cloud Insights](https://docs.thousandeyes.com/product-documentation/cloud-insights). + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from thousandeyes_sdk.core.api_client import ApiClient +from thousandeyes_sdk.core.configuration import Configuration +from sdk_test_support.mock_server import ERROR_STATUS_HEADER, OPERATION_ID_HEADER, MockApiServer + +from .mock_manifest import OPERATION_MANIFEST + + +class IntegrationTestBase(unittest.TestCase): + def setUp(self) -> None: + self.server = MockApiServer(OPERATION_MANIFEST) + self.server.start() + configuration = Configuration(host=self.server.base_url, access_token="test-token") + self.api_client = ApiClient(configuration=configuration) + + def tearDown(self) -> None: + self.server.stop() + + def te_headers(self, operation_id: str, error_status=None): + headers = {OPERATION_ID_HEADER: operation_id} + if error_status is not None: + headers[ERROR_STATUS_HEADER] = error_status + return headers diff --git a/thousandeyes-sdk-cloud-insights-integrations/test/mock_manifest.py b/thousandeyes-sdk-cloud-insights-integrations/test/mock_manifest.py new file mode 100644 index 000000000..12f29268b --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/test/mock_manifest.py @@ -0,0 +1,2012 @@ +# coding: utf-8 + +""" + Cloud Insights Integrations API + + **Note:** All Cloud Insights APIs are not available for ThousandEyes for Government instance. The Cloud Insights Integrations API lets you programmatically manage **AWS** and **Azure** monitoring integrations in ThousandEyes. ### What You Can Do - **List** all integrations. - **Get** details for a specific integration. - **Delete** an existing integration. - **Create** integrations for: - **AWS**: inventory monitoring and flow logs monitoring. - **Azure**: inventory monitoring and flow logs monitoring. - **Update** integrations for: - **Azure**: inventory monitoring and flow logs monitoring. - **Fetch AWS IAM policy documents** required to configure AWS inventory and flow-logs integrations. - **Retrieve** the current AWS and Azure integration policy settings to understand which AWS and Azure resource groups, AWS regions, Azure subscription rules are enabled and whether CloudTrail is enabled for Cloud Insights for inventory monitoring. - **Update** policy settings to change the approved AWS resource groups, AWS regions, and Azure subscription rules that ThousandEyes should inventory. ### Scope and Tenancy All operations are scoped to the authenticated account group. Responses include only resources associated with that group. ### Payloads and formats - **Requests:** `application/json` - **Responses:** primarily `application/hal+json` for resource representations and `application/json` for policy documents. - HAL responses include `_links` with a `self` relation for direct navigation. ### Integration Types - **Inventory monitoring** - AWS: reads inventory and network topology via read-only IAM permissions. - Azure: authenticates with a Service Principal to read inventory and network topology. - **Flow logs monitoring** - AWS: reads flow logs from S3 buckets and uses SNS for notifications. - Azure: reads flow logs via **Service Bus Queue** (`serviceBusQueueUrl`). ### Policy Helpers (AWS) Dedicated endpoints return **Trusted Policy**, **Permissions Policy**, and **SNS Topic Access Policy** documents to simplify role setup for inventory and flow logs integrations. ### Notes - All example values in this specification are **fictitious**. For more information about Cloud Insights, see [Cloud Insights](https://docs.thousandeyes.com/product-documentation/cloud-insights). + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json + +from sdk_test_support.mock_server_types import ErrorResponseExpectation, OperationExpectation + +OPERATION_MANIFEST = { + + "get_aws_integration_policy_settings": OperationExpectation( + operation_id="get_aws_integration_policy_settings", + method="GET", + path="/cloud-insights/integration/aws/policy/settings", + path_param_examples={ + }, + success_status=200, + success_body=json.loads(""" + + { + "enabledRegions" : [ "us-east-1", "eu-west-1", "ap-southeast-2" ], + "enabledResourceGroupTypes" : [ "ec2", "s3-bucket", "global-network" ], + "_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" + } + }, + "enabledCloudtrail" : true + } + + """), + + success_content_type="application/json", + + request_body_example=None, + error_responses={ + + "401": ErrorResponseExpectation( + status=401, + body=json.loads(""" + { + "error_description" : "Invalid access token", + "error" : "invalid_token" + }"""), + content_type="application/json", + ), + + "403": ErrorResponseExpectation( + status=403, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + "404": ErrorResponseExpectation( + status=404, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + "429": ErrorResponseExpectation( + status=429, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + "500": ErrorResponseExpectation( + status=500, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + }, + ), + + "get_azure_integration_policy_settings": OperationExpectation( + operation_id="get_azure_integration_policy_settings", + method="GET", + path="/cloud-insights/integration/azure/policy/settings", + path_param_examples={ + }, + success_status=200, + success_body=json.loads(""" + + { + "enabledResourceGroupTypes" : [ "networking", "virtual-wan", "traffic-manager" ], + "_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" + } + }, + "subscriptionsPolicy" : { + "rules" : [ { + "field" : "subscription-name", + "pattern" : "^prod-.*$", + "action" : "include" + }, { + "field" : "subscription-id", + "pattern" : "3145d332-e1c9-4670-a672-12e17d4f627e", + "action" : "exclude" + } ], + "defaultAction" : "exclude" + } + } + + """), + + success_content_type="application/json", + + request_body_example=None, + error_responses={ + + "401": ErrorResponseExpectation( + status=401, + body=json.loads(""" + { + "error_description" : "Invalid access token", + "error" : "invalid_token" + }"""), + content_type="application/json", + ), + + "403": ErrorResponseExpectation( + status=403, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + "404": ErrorResponseExpectation( + status=404, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + "429": ErrorResponseExpectation( + status=429, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + "500": ErrorResponseExpectation( + status=500, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + }, + ), + + "update_aws_integration_policy_settings": OperationExpectation( + operation_id="update_aws_integration_policy_settings", + method="PUT", + path="/cloud-insights/integration/aws/policy/settings", + path_param_examples={ + }, + success_status=200, + success_body=json.loads(""" + + { + "enabledRegions" : [ "us-east-1", "eu-west-1", "ap-southeast-2" ], + "enabledResourceGroupTypes" : [ "ec2", "s3-bucket", "global-network" ], + "_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" + } + }, + "enabledCloudtrail" : true + } + + """), + + success_content_type="application/json", + + request_body_example=json.loads(""" + + { + "enabledRegions" : [ "us-east-1", "eu-west-1", "ap-southeast-2" ], + "enabledResourceGroupTypes" : [ "ec2", "s3-bucket", "global-network" ], + "_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" + } + }, + "enabledCloudtrail" : true + } + + """), + error_responses={ + + "400": ErrorResponseExpectation( + status=400, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "errors" : [ { + "code" : "code", + "field" : "field", + "message" : "message" + }, { + "code" : "code", + "field" : "field", + "message" : "message" + } ], + "status" : 0 + }"""), + content_type="application/json", + ), + + "401": ErrorResponseExpectation( + status=401, + body=json.loads(""" + { + "error_description" : "Invalid access token", + "error" : "invalid_token" + }"""), + content_type="application/json", + ), + + "403": ErrorResponseExpectation( + status=403, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + "404": ErrorResponseExpectation( + status=404, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + "429": ErrorResponseExpectation( + status=429, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + "500": ErrorResponseExpectation( + status=500, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + }, + ), + + "update_azure_integration_policy_settings": OperationExpectation( + operation_id="update_azure_integration_policy_settings", + method="PUT", + path="/cloud-insights/integration/azure/policy/settings", + path_param_examples={ + }, + success_status=200, + success_body=json.loads(""" + + { + "enabledResourceGroupTypes" : [ "networking", "virtual-wan", "traffic-manager" ], + "_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" + } + }, + "subscriptionsPolicy" : { + "rules" : [ { + "field" : "subscription-name", + "pattern" : "^prod-.*$", + "action" : "include" + }, { + "field" : "subscription-id", + "pattern" : "3145d332-e1c9-4670-a672-12e17d4f627e", + "action" : "exclude" + } ], + "defaultAction" : "exclude" + } + } + + """), + + success_content_type="application/json", + + request_body_example=json.loads(""" + + { + "enabledResourceGroupTypes" : [ "networking", "virtual-wan", "traffic-manager" ], + "_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" + } + }, + "subscriptionsPolicy" : { + "rules" : [ { + "field" : "subscription-name", + "pattern" : "^prod-.*$", + "action" : "include" + }, { + "field" : "subscription-id", + "pattern" : "3145d332-e1c9-4670-a672-12e17d4f627e", + "action" : "exclude" + } ], + "defaultAction" : "exclude" + } + } + + """), + error_responses={ + + "400": ErrorResponseExpectation( + status=400, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "errors" : [ { + "code" : "code", + "field" : "field", + "message" : "message" + }, { + "code" : "code", + "field" : "field", + "message" : "message" + } ], + "status" : 0 + }"""), + content_type="application/json", + ), + + "401": ErrorResponseExpectation( + status=401, + body=json.loads(""" + { + "error_description" : "Invalid access token", + "error" : "invalid_token" + }"""), + content_type="application/json", + ), + + "403": ErrorResponseExpectation( + status=403, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + "404": ErrorResponseExpectation( + status=404, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + "429": ErrorResponseExpectation( + status=429, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + "500": ErrorResponseExpectation( + status=500, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + }, + ), + + "create_aws_flow_logs_monitoring_integration": OperationExpectation( + operation_id="create_aws_flow_logs_monitoring_integration", + method="POST", + path="/cloud-insights/integration/aws/flow-logs", + path_param_examples={ + }, + success_status=201, + success_body=json.loads(""" + + { + "monitoringType" : "inventory-monitoring", + "_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" + } + }, + "roleArn" : "arn:aws:iam::01234567890:role/aws-monitoring-ro", + "name" : "integration name", + "externalId" : "37d8f861cffd34212b5a34466564da1f80b01a30", + "snsTopicsArns" : [ "arn:aws:sns:us-east-1:01234567890:SNS-Topic-US", "arn:aws:sns:eu-central-1:01234567890:SNS-Topic-EU" ], + "id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569" + } + + """), + + success_content_type="application/json", + + request_body_example=json.loads(""" + + { + "roleArn" : "arn:aws:iam::01234567890:role/aws-flow-logs-ro", + "name" : "integration name", + "snsTopicsArns" : [ "arn:aws:sns:us-east-1:01234567890:SNS-Topic-US", "arn:aws:sns:eu-central-1:01234567890:SNS-Topic-EU" ] + } + + """), + error_responses={ + + "400": ErrorResponseExpectation( + status=400, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "errors" : [ { + "code" : "code", + "field" : "field", + "message" : "message" + }, { + "code" : "code", + "field" : "field", + "message" : "message" + } ], + "status" : 0 + }"""), + content_type="application/json", + ), + + "401": ErrorResponseExpectation( + status=401, + body=json.loads(""" + { + "error_description" : "Invalid access token", + "error" : "invalid_token" + }"""), + content_type="application/json", + ), + + "403": ErrorResponseExpectation( + status=403, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + "404": ErrorResponseExpectation( + status=404, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + "429": ErrorResponseExpectation( + status=429, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + "500": ErrorResponseExpectation( + status=500, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + }, + ), + + "create_aws_inventory_monitoring_integration": OperationExpectation( + operation_id="create_aws_inventory_monitoring_integration", + method="POST", + path="/cloud-insights/integration/aws/inventory", + path_param_examples={ + }, + success_status=201, + success_body=json.loads(""" + + { + "monitoringType" : "inventory-monitoring", + "_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" + } + }, + "roleArn" : "arn:aws:iam::01234567890:role/aws-monitoring-ro", + "name" : "integration name", + "externalId" : "37d8f861cffd34212b5a34466564da1f80b01a30", + "snsTopicsArns" : [ "arn:aws:sns:us-east-1:01234567890:SNS-Topic-US", "arn:aws:sns:eu-central-1:01234567890:SNS-Topic-EU" ], + "id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569" + } + + """), + + success_content_type="application/json", + + request_body_example=json.loads(""" + + { + "roleArn" : "arn:aws:iam::01234567890:role/aws-inventory-ro", + "name" : "integration name" + } + + """), + error_responses={ + + "400": ErrorResponseExpectation( + status=400, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "errors" : [ { + "code" : "code", + "field" : "field", + "message" : "message" + }, { + "code" : "code", + "field" : "field", + "message" : "message" + } ], + "status" : 0 + }"""), + content_type="application/json", + ), + + "401": ErrorResponseExpectation( + status=401, + body=json.loads(""" + { + "error_description" : "Invalid access token", + "error" : "invalid_token" + }"""), + content_type="application/json", + ), + + "403": ErrorResponseExpectation( + status=403, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + "404": ErrorResponseExpectation( + status=404, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + "429": ErrorResponseExpectation( + status=429, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + "500": ErrorResponseExpectation( + status=500, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + }, + ), + + "create_azure_flow_logs_monitoring_integration": OperationExpectation( + operation_id="create_azure_flow_logs_monitoring_integration", + method="POST", + path="/cloud-insights/integration/azure/flow-logs", + path_param_examples={ + }, + success_status=201, + success_body=json.loads(""" + + { + "password" : "********", + "monitoringType" : "azure-inventory-monitoring", + "_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" + } + }, + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44", + "serviceBusQueueUrl" : "https://your-service-bus-namespace.servicebus.windows.net/your-queue-name" + } + + """), + + success_content_type="application/json", + + request_body_example=json.loads(""" + + { + "password" : "p9z4Q~U7LkdX1yZr3TcB6fJqG8aM0sDeT5R9hVnKw", + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44", + "serviceBusQueueUrl" : "https://your-service-bus-namespace.servicebus.windows.net/your-queue-name" + } + + """), + error_responses={ + + "400": ErrorResponseExpectation( + status=400, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "errors" : [ { + "code" : "code", + "field" : "field", + "message" : "message" + }, { + "code" : "code", + "field" : "field", + "message" : "message" + } ], + "status" : 0 + }"""), + content_type="application/json", + ), + + "401": ErrorResponseExpectation( + status=401, + body=json.loads(""" + { + "error_description" : "Invalid access token", + "error" : "invalid_token" + }"""), + content_type="application/json", + ), + + "403": ErrorResponseExpectation( + status=403, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + "404": ErrorResponseExpectation( + status=404, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + "429": ErrorResponseExpectation( + status=429, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + "500": ErrorResponseExpectation( + status=500, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + }, + ), + + "create_azure_inventory_monitoring_integration": OperationExpectation( + operation_id="create_azure_inventory_monitoring_integration", + method="POST", + path="/cloud-insights/integration/azure/inventory", + path_param_examples={ + }, + success_status=201, + success_body=json.loads(""" + + { + "password" : "********", + "monitoringType" : "azure-inventory-monitoring", + "_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" + } + }, + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44", + "serviceBusQueueUrl" : "https://your-service-bus-namespace.servicebus.windows.net/your-queue-name" + } + + """), + + success_content_type="application/json", + + request_body_example=json.loads(""" + + { + "password" : "p9z4Q~U7LkdX1yZr3TcB6fJqG8aM0sDeT5R9hVnKw", + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44" + } + + """), + error_responses={ + + "400": ErrorResponseExpectation( + status=400, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "errors" : [ { + "code" : "code", + "field" : "field", + "message" : "message" + }, { + "code" : "code", + "field" : "field", + "message" : "message" + } ], + "status" : 0 + }"""), + content_type="application/json", + ), + + "401": ErrorResponseExpectation( + status=401, + body=json.loads(""" + { + "error_description" : "Invalid access token", + "error" : "invalid_token" + }"""), + content_type="application/json", + ), + + "403": ErrorResponseExpectation( + status=403, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + "404": ErrorResponseExpectation( + status=404, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + "429": ErrorResponseExpectation( + status=429, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + "500": ErrorResponseExpectation( + status=500, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + }, + ), + + "delete_aws_monitoring_integration": OperationExpectation( + operation_id="delete_aws_monitoring_integration", + method="DELETE", + path="/cloud-insights/integration/aws/{integrationId}", + path_param_examples={ + "integrationId": 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569', + }, + success_status=204, + success_body=None, + success_content_type="application/json", + request_body_example=None, + error_responses={ + + "400": ErrorResponseExpectation( + status=400, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "errors" : [ { + "code" : "code", + "field" : "field", + "message" : "message" + }, { + "code" : "code", + "field" : "field", + "message" : "message" + } ], + "status" : 0 + }"""), + content_type="application/json", + ), + + "401": ErrorResponseExpectation( + status=401, + body=json.loads(""" + { + "error_description" : "Invalid access token", + "error" : "invalid_token" + }"""), + content_type="application/json", + ), + + "403": ErrorResponseExpectation( + status=403, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + "404": ErrorResponseExpectation( + status=404, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + "429": ErrorResponseExpectation( + status=429, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + "500": ErrorResponseExpectation( + status=500, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + }, + ), + + "delete_azure_monitoring_integration": OperationExpectation( + operation_id="delete_azure_monitoring_integration", + method="DELETE", + path="/cloud-insights/integration/azure/{integrationId}", + path_param_examples={ + "integrationId": 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569', + }, + success_status=204, + success_body=None, + success_content_type="application/json", + request_body_example=None, + error_responses={ + + "400": ErrorResponseExpectation( + status=400, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "errors" : [ { + "code" : "code", + "field" : "field", + "message" : "message" + }, { + "code" : "code", + "field" : "field", + "message" : "message" + } ], + "status" : 0 + }"""), + content_type="application/json", + ), + + "401": ErrorResponseExpectation( + status=401, + body=json.loads(""" + { + "error_description" : "Invalid access token", + "error" : "invalid_token" + }"""), + content_type="application/json", + ), + + "403": ErrorResponseExpectation( + status=403, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + "404": ErrorResponseExpectation( + status=404, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + "429": ErrorResponseExpectation( + status=429, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + "500": ErrorResponseExpectation( + status=500, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + }, + ), + + "get_all_aws_monitoring_integrations": OperationExpectation( + operation_id="get_all_aws_monitoring_integrations", + method="GET", + path="/cloud-insights/integration/aws", + path_param_examples={ + }, + success_status=200, + success_body=json.loads(""" + + { + "_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" + } + }, + "integrations" : [ { + "monitoringType" : "inventory-monitoring", + "_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" + } + }, + "roleArn" : "arn:aws:iam::01234567890:role/aws-monitoring-ro", + "name" : "integration name", + "externalId" : "37d8f861cffd34212b5a34466564da1f80b01a30", + "snsTopicsArns" : [ "arn:aws:sns:us-east-1:01234567890:SNS-Topic-US", "arn:aws:sns:eu-central-1:01234567890:SNS-Topic-EU" ], + "id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569" + }, { + "monitoringType" : "inventory-monitoring", + "_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" + } + }, + "roleArn" : "arn:aws:iam::01234567890:role/aws-monitoring-ro", + "name" : "integration name", + "externalId" : "37d8f861cffd34212b5a34466564da1f80b01a30", + "snsTopicsArns" : [ "arn:aws:sns:us-east-1:01234567890:SNS-Topic-US", "arn:aws:sns:eu-central-1:01234567890:SNS-Topic-EU" ], + "id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569" + } ] + } + + """), + + success_content_type="application/json", + + request_body_example=None, + error_responses={ + + "401": ErrorResponseExpectation( + status=401, + body=json.loads(""" + { + "error_description" : "Invalid access token", + "error" : "invalid_token" + }"""), + content_type="application/json", + ), + + "403": ErrorResponseExpectation( + status=403, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + "404": ErrorResponseExpectation( + status=404, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + "429": ErrorResponseExpectation( + status=429, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + "500": ErrorResponseExpectation( + status=500, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + }, + ), + + "get_all_azure_monitoring_integrations": OperationExpectation( + operation_id="get_all_azure_monitoring_integrations", + method="GET", + path="/cloud-insights/integration/azure", + path_param_examples={ + }, + success_status=200, + success_body=json.loads(""" + + { + "_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" + } + }, + "integrations" : [ { + "password" : "********", + "monitoringType" : "azure-inventory-monitoring", + "_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" + } + }, + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44", + "serviceBusQueueUrl" : "https://your-service-bus-namespace.servicebus.windows.net/your-queue-name" + }, { + "password" : "********", + "monitoringType" : "azure-inventory-monitoring", + "_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" + } + }, + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44", + "serviceBusQueueUrl" : "https://your-service-bus-namespace.servicebus.windows.net/your-queue-name" + } ] + } + + """), + + success_content_type="application/json", + + request_body_example=None, + error_responses={ + + "401": ErrorResponseExpectation( + status=401, + body=json.loads(""" + { + "error_description" : "Invalid access token", + "error" : "invalid_token" + }"""), + content_type="application/json", + ), + + "403": ErrorResponseExpectation( + status=403, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + "404": ErrorResponseExpectation( + status=404, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + "429": ErrorResponseExpectation( + status=429, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + "500": ErrorResponseExpectation( + status=500, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + }, + ), + + "get_aws_monitoring_integration": OperationExpectation( + operation_id="get_aws_monitoring_integration", + method="GET", + path="/cloud-insights/integration/aws/{integrationId}", + path_param_examples={ + "integrationId": 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569', + }, + success_status=200, + success_body=json.loads(""" + + { + "monitoringType" : "inventory-monitoring", + "_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" + } + }, + "roleArn" : "arn:aws:iam::01234567890:role/aws-monitoring-ro", + "name" : "integration name", + "externalId" : "37d8f861cffd34212b5a34466564da1f80b01a30", + "snsTopicsArns" : [ "arn:aws:sns:us-east-1:01234567890:SNS-Topic-US", "arn:aws:sns:eu-central-1:01234567890:SNS-Topic-EU" ], + "id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569" + } + + """), + + success_content_type="application/json", + + request_body_example=None, + error_responses={ + + "401": ErrorResponseExpectation( + status=401, + body=json.loads(""" + { + "error_description" : "Invalid access token", + "error" : "invalid_token" + }"""), + content_type="application/json", + ), + + "403": ErrorResponseExpectation( + status=403, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + "404": ErrorResponseExpectation( + status=404, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + "429": ErrorResponseExpectation( + status=429, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + "500": ErrorResponseExpectation( + status=500, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + }, + ), + + "get_azure_monitoring_integration": OperationExpectation( + operation_id="get_azure_monitoring_integration", + method="GET", + path="/cloud-insights/integration/azure/{integrationId}", + path_param_examples={ + "integrationId": 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569', + }, + success_status=200, + success_body=json.loads(""" + + { + "password" : "********", + "monitoringType" : "azure-inventory-monitoring", + "_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" + } + }, + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44", + "serviceBusQueueUrl" : "https://your-service-bus-namespace.servicebus.windows.net/your-queue-name" + } + + """), + + success_content_type="application/json", + + request_body_example=None, + error_responses={ + + "401": ErrorResponseExpectation( + status=401, + body=json.loads(""" + { + "error_description" : "Invalid access token", + "error" : "invalid_token" + }"""), + content_type="application/json", + ), + + "403": ErrorResponseExpectation( + status=403, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + "404": ErrorResponseExpectation( + status=404, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + "429": ErrorResponseExpectation( + status=429, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + "500": ErrorResponseExpectation( + status=500, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + }, + ), + + "update_azure_flow_logs_monitoring_integration": OperationExpectation( + operation_id="update_azure_flow_logs_monitoring_integration", + method="PUT", + path="/cloud-insights/integration/azure/flow-logs/{integrationId}", + path_param_examples={ + "integrationId": 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569', + }, + success_status=200, + success_body=json.loads(""" + + { + "password" : "********", + "monitoringType" : "azure-inventory-monitoring", + "_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" + } + }, + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44", + "serviceBusQueueUrl" : "https://your-service-bus-namespace.servicebus.windows.net/your-queue-name" + } + + """), + + success_content_type="application/json", + + request_body_example=json.loads(""" + + { + "password" : "p9z4Q~U7LkdX1yZr3TcB6fJqG8aM0sDeT5R9hVnKw", + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44", + "serviceBusQueueUrl" : "https://your-service-bus-namespace.servicebus.windows.net/your-queue-name" + } + + """), + error_responses={ + + "400": ErrorResponseExpectation( + status=400, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "errors" : [ { + "code" : "code", + "field" : "field", + "message" : "message" + }, { + "code" : "code", + "field" : "field", + "message" : "message" + } ], + "status" : 0 + }"""), + content_type="application/json", + ), + + "401": ErrorResponseExpectation( + status=401, + body=json.loads(""" + { + "error_description" : "Invalid access token", + "error" : "invalid_token" + }"""), + content_type="application/json", + ), + + "403": ErrorResponseExpectation( + status=403, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + "404": ErrorResponseExpectation( + status=404, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + "429": ErrorResponseExpectation( + status=429, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + "500": ErrorResponseExpectation( + status=500, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + }, + ), + + "update_azure_inventory_monitoring_integration": OperationExpectation( + operation_id="update_azure_inventory_monitoring_integration", + method="PUT", + path="/cloud-insights/integration/azure/inventory/{integrationId}", + path_param_examples={ + "integrationId": 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569', + }, + success_status=200, + success_body=json.loads(""" + + { + "password" : "********", + "monitoringType" : "azure-inventory-monitoring", + "_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" + } + }, + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44", + "serviceBusQueueUrl" : "https://your-service-bus-namespace.servicebus.windows.net/your-queue-name" + } + + """), + + success_content_type="application/json", + + request_body_example=json.loads(""" + + { + "password" : "p9z4Q~U7LkdX1yZr3TcB6fJqG8aM0sDeT5R9hVnKw", + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44" + } + + """), + error_responses={ + + "400": ErrorResponseExpectation( + status=400, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "errors" : [ { + "code" : "code", + "field" : "field", + "message" : "message" + }, { + "code" : "code", + "field" : "field", + "message" : "message" + } ], + "status" : 0 + }"""), + content_type="application/json", + ), + + "401": ErrorResponseExpectation( + status=401, + body=json.loads(""" + { + "error_description" : "Invalid access token", + "error" : "invalid_token" + }"""), + content_type="application/json", + ), + + "403": ErrorResponseExpectation( + status=403, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + "404": ErrorResponseExpectation( + status=404, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + "429": ErrorResponseExpectation( + status=429, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + "500": ErrorResponseExpectation( + status=500, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + }"""), + content_type="application/json", + ), + + }, + ), + +} diff --git a/thousandeyes-sdk-cloud-insights-integrations/test/test_cloud_insights_integration_policy_settings_api.py b/thousandeyes-sdk-cloud-insights-integrations/test/test_cloud_insights_integration_policy_settings_api.py new file mode 100644 index 000000000..8f43bea0e --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/test/test_cloud_insights_integration_policy_settings_api.py @@ -0,0 +1,221 @@ +# coding: utf-8 + +""" + Cloud Insights Integrations API + + **Note:** All Cloud Insights APIs are not available for ThousandEyes for Government instance. The Cloud Insights Integrations API lets you programmatically manage **AWS** and **Azure** monitoring integrations in ThousandEyes. ### What You Can Do - **List** all integrations. - **Get** details for a specific integration. - **Delete** an existing integration. - **Create** integrations for: - **AWS**: inventory monitoring and flow logs monitoring. - **Azure**: inventory monitoring and flow logs monitoring. - **Update** integrations for: - **Azure**: inventory monitoring and flow logs monitoring. - **Fetch AWS IAM policy documents** required to configure AWS inventory and flow-logs integrations. - **Retrieve** the current AWS and Azure integration policy settings to understand which AWS and Azure resource groups, AWS regions, Azure subscription rules are enabled and whether CloudTrail is enabled for Cloud Insights for inventory monitoring. - **Update** policy settings to change the approved AWS resource groups, AWS regions, and Azure subscription rules that ThousandEyes should inventory. ### Scope and Tenancy All operations are scoped to the authenticated account group. Responses include only resources associated with that group. ### Payloads and formats - **Requests:** `application/json` - **Responses:** primarily `application/hal+json` for resource representations and `application/json` for policy documents. - HAL responses include `_links` with a `self` relation for direct navigation. ### Integration Types - **Inventory monitoring** - AWS: reads inventory and network topology via read-only IAM permissions. - Azure: authenticates with a Service Principal to read inventory and network topology. - **Flow logs monitoring** - AWS: reads flow logs from S3 buckets and uses SNS for notifications. - Azure: reads flow logs via **Service Bus Queue** (`serviceBusQueueUrl`). ### Policy Helpers (AWS) Dedicated endpoints return **Trusted Policy**, **Permissions Policy**, and **SNS Topic Access Policy** documents to simplify role setup for inventory and flow logs integrations. ### Notes - All example values in this specification are **fictitious**. For more information about Cloud Insights, see [Cloud Insights](https://docs.thousandeyes.com/product-documentation/cloud-insights). + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.cloud_insights_integrations.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.cloud_insights_integrations.api.cloud_insights_integration_policy_settings_api import CloudInsightsIntegrationPolicySettingsApi + + +class TestCloudInsightsIntegrationPolicySettingsApi(unittest.TestCase): + """CloudInsightsIntegrationPolicySettingsApi unit test stubs""" + + def setUp(self) -> None: + self.api = CloudInsightsIntegrationPolicySettingsApi() + + def tearDown(self) -> None: + pass + + def test_get_aws_integration_policy_settings_models_validation(self) -> None: + """Test case for get_aws_integration_policy_settings request and response models""" + + + response_body_json = """ + { + "enabledRegions" : [ "us-east-1", "eu-west-1", "ap-southeast-2" ], + "enabledResourceGroupTypes" : [ "ec2", "s3-bucket", "global-network" ], + "_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" + } + }, + "enabledCloudtrail" : true + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.cloud_insights_integrations.models.AwsIntegrationPolicySetting.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + + def test_get_azure_integration_policy_settings_models_validation(self) -> None: + """Test case for get_azure_integration_policy_settings request and response models""" + + + response_body_json = """ + { + "enabledResourceGroupTypes" : [ "networking", "virtual-wan", "traffic-manager" ], + "_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" + } + }, + "subscriptionsPolicy" : { + "rules" : [ { + "field" : "subscription-name", + "pattern" : "^prod-.*$", + "action" : "include" + }, { + "field" : "subscription-id", + "pattern" : "3145d332-e1c9-4670-a672-12e17d4f627e", + "action" : "exclude" + } ], + "defaultAction" : "exclude" + } + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.cloud_insights_integrations.models.AzureIntegrationPolicySetting.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + + def test_update_aws_integration_policy_settings_models_validation(self) -> None: + """Test case for update_aws_integration_policy_settings request and response models""" + request_body_json = """ + { + "enabledRegions" : [ "us-east-1", "eu-west-1", "ap-southeast-2" ], + "enabledResourceGroupTypes" : [ "ec2", "s3-bucket", "global-network" ], + "_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" + } + }, + "enabledCloudtrail" : true + } + """ + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.cloud_insights_integrations.models.AwsIntegrationPolicySetting.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + + response_body_json = """ + { + "enabledRegions" : [ "us-east-1", "eu-west-1", "ap-southeast-2" ], + "enabledResourceGroupTypes" : [ "ec2", "s3-bucket", "global-network" ], + "_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" + } + }, + "enabledCloudtrail" : true + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.cloud_insights_integrations.models.AwsIntegrationPolicySetting.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + + def test_update_azure_integration_policy_settings_models_validation(self) -> None: + """Test case for update_azure_integration_policy_settings request and response models""" + request_body_json = """ + { + "enabledResourceGroupTypes" : [ "networking", "virtual-wan", "traffic-manager" ], + "_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" + } + }, + "subscriptionsPolicy" : { + "rules" : [ { + "field" : "subscription-name", + "pattern" : "^prod-.*$", + "action" : "include" + }, { + "field" : "subscription-id", + "pattern" : "3145d332-e1c9-4670-a672-12e17d4f627e", + "action" : "exclude" + } ], + "defaultAction" : "exclude" + } + } + """ + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.cloud_insights_integrations.models.AzureIntegrationPolicySetting.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + + response_body_json = """ + { + "enabledResourceGroupTypes" : [ "networking", "virtual-wan", "traffic-manager" ], + "_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" + } + }, + "subscriptionsPolicy" : { + "rules" : [ { + "field" : "subscription-name", + "pattern" : "^prod-.*$", + "action" : "include" + }, { + "field" : "subscription-id", + "pattern" : "3145d332-e1c9-4670-a672-12e17d4f627e", + "action" : "exclude" + } ], + "defaultAction" : "exclude" + } + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.cloud_insights_integrations.models.AzureIntegrationPolicySetting.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + + +if __name__ == '__main__': + unittest.main() diff --git a/thousandeyes-sdk-cloud-insights-integrations/test/test_cloud_insights_integration_policy_settings_api_integration.py b/thousandeyes-sdk-cloud-insights-integrations/test/test_cloud_insights_integration_policy_settings_api_integration.py new file mode 100644 index 000000000..cc4bff95a --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/test/test_cloud_insights_integration_policy_settings_api_integration.py @@ -0,0 +1,1153 @@ +# coding: utf-8 + +""" + Cloud Insights Integrations API + + **Note:** All Cloud Insights APIs are not available for ThousandEyes for Government instance. The Cloud Insights Integrations API lets you programmatically manage **AWS** and **Azure** monitoring integrations in ThousandEyes. ### What You Can Do - **List** all integrations. - **Get** details for a specific integration. - **Delete** an existing integration. - **Create** integrations for: - **AWS**: inventory monitoring and flow logs monitoring. - **Azure**: inventory monitoring and flow logs monitoring. - **Update** integrations for: - **Azure**: inventory monitoring and flow logs monitoring. - **Fetch AWS IAM policy documents** required to configure AWS inventory and flow-logs integrations. - **Retrieve** the current AWS and Azure integration policy settings to understand which AWS and Azure resource groups, AWS regions, Azure subscription rules are enabled and whether CloudTrail is enabled for Cloud Insights for inventory monitoring. - **Update** policy settings to change the approved AWS resource groups, AWS regions, and Azure subscription rules that ThousandEyes should inventory. ### Scope and Tenancy All operations are scoped to the authenticated account group. Responses include only resources associated with that group. ### Payloads and formats - **Requests:** `application/json` - **Responses:** primarily `application/hal+json` for resource representations and `application/json` for policy documents. - HAL responses include `_links` with a `self` relation for direct navigation. ### Integration Types - **Inventory monitoring** - AWS: reads inventory and network topology via read-only IAM permissions. - Azure: authenticates with a Service Principal to read inventory and network topology. - **Flow logs monitoring** - AWS: reads flow logs from S3 buckets and uses SNS for notifications. - Azure: reads flow logs via **Service Bus Queue** (`serviceBusQueueUrl`). ### Policy Helpers (AWS) Dedicated endpoints return **Trusted Policy**, **Permissions Policy**, and **SNS Topic Access Policy** documents to simplify role setup for inventory and flow logs integrations. ### Notes - All example values in this specification are **fictitious**. For more information about Cloud Insights, see [Cloud Insights](https://docs.thousandeyes.com/product-documentation/cloud-insights). + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.cloud_insights_integrations.models + +from thousandeyes_sdk.core.exceptions import ApiException +from thousandeyes_sdk.cloud_insights_integrations.api.cloud_insights_integration_policy_settings_api import CloudInsightsIntegrationPolicySettingsApi +from .integration_test_utils import IntegrationTestBase +from .test_utils import assert_constructed_model_matches_example_json + + +class TestCloudInsightsIntegrationPolicySettingsApiIntegration(IntegrationTestBase): + """CloudInsightsIntegrationPolicySettingsApi integration test stubs""" + + def setUp(self) -> None: + super().setUp() + self.api = CloudInsightsIntegrationPolicySettingsApi(self.api_client) + + + def test_get_aws_integration_policy_settings_happy_path(self) -> None: + """Integration test for get_aws_integration_policy_settings success path""" + aid = '1234' + response_body_json = """ + { + "enabledRegions" : [ "us-east-1", "eu-west-1", "ap-southeast-2" ], + "enabledResourceGroupTypes" : [ "ec2", "s3-bucket", "global-network" ], + "_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" + } + }, + "enabledCloudtrail" : true + } + """ + expected_response = json.loads(response_body_json) + response = self.api.get_aws_integration_policy_settings( + + aid=aid, + + _headers=self.te_headers("get_aws_integration_policy_settings"), + ) + assert_constructed_model_matches_example_json(response, expected_response) + + + def test_get_aws_integration_policy_settings_error_401(self) -> None: + """Integration test for get_aws_integration_policy_settings error path (HTTP 401)""" + aid = '1234' + error_body_json = """ + { + "error_description" : "Invalid access token", + "error" : "invalid_token" + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(401) + ) as context: + self.api.get_aws_integration_policy_settings( + + aid=aid, + + _headers=self.te_headers("get_aws_integration_policy_settings", error_status="401"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_get_aws_integration_policy_settings_error_403(self) -> None: + """Integration test for get_aws_integration_policy_settings error path (HTTP 403)""" + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(403) + ) as context: + self.api.get_aws_integration_policy_settings( + + aid=aid, + + _headers=self.te_headers("get_aws_integration_policy_settings", error_status="403"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_get_aws_integration_policy_settings_error_404(self) -> None: + """Integration test for get_aws_integration_policy_settings error path (HTTP 404)""" + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(404) + ) as context: + self.api.get_aws_integration_policy_settings( + + aid=aid, + + _headers=self.te_headers("get_aws_integration_policy_settings", error_status="404"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_get_aws_integration_policy_settings_error_429(self) -> None: + """Integration test for get_aws_integration_policy_settings error path (HTTP 429)""" + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(429) + ) as context: + self.api.get_aws_integration_policy_settings( + + aid=aid, + + _headers=self.te_headers("get_aws_integration_policy_settings", error_status="429"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_get_aws_integration_policy_settings_error_500(self) -> None: + """Integration test for get_aws_integration_policy_settings error path (HTTP 500)""" + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(500) + ) as context: + self.api.get_aws_integration_policy_settings( + + aid=aid, + + _headers=self.te_headers("get_aws_integration_policy_settings", error_status="500"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + + + def test_get_azure_integration_policy_settings_happy_path(self) -> None: + """Integration test for get_azure_integration_policy_settings success path""" + aid = '1234' + response_body_json = """ + { + "enabledResourceGroupTypes" : [ "networking", "virtual-wan", "traffic-manager" ], + "_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" + } + }, + "subscriptionsPolicy" : { + "rules" : [ { + "field" : "subscription-name", + "pattern" : "^prod-.*$", + "action" : "include" + }, { + "field" : "subscription-id", + "pattern" : "3145d332-e1c9-4670-a672-12e17d4f627e", + "action" : "exclude" + } ], + "defaultAction" : "exclude" + } + } + """ + expected_response = json.loads(response_body_json) + response = self.api.get_azure_integration_policy_settings( + + aid=aid, + + _headers=self.te_headers("get_azure_integration_policy_settings"), + ) + assert_constructed_model_matches_example_json(response, expected_response) + + + def test_get_azure_integration_policy_settings_error_401(self) -> None: + """Integration test for get_azure_integration_policy_settings error path (HTTP 401)""" + aid = '1234' + error_body_json = """ + { + "error_description" : "Invalid access token", + "error" : "invalid_token" + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(401) + ) as context: + self.api.get_azure_integration_policy_settings( + + aid=aid, + + _headers=self.te_headers("get_azure_integration_policy_settings", error_status="401"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_get_azure_integration_policy_settings_error_403(self) -> None: + """Integration test for get_azure_integration_policy_settings error path (HTTP 403)""" + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(403) + ) as context: + self.api.get_azure_integration_policy_settings( + + aid=aid, + + _headers=self.te_headers("get_azure_integration_policy_settings", error_status="403"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_get_azure_integration_policy_settings_error_404(self) -> None: + """Integration test for get_azure_integration_policy_settings error path (HTTP 404)""" + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(404) + ) as context: + self.api.get_azure_integration_policy_settings( + + aid=aid, + + _headers=self.te_headers("get_azure_integration_policy_settings", error_status="404"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_get_azure_integration_policy_settings_error_429(self) -> None: + """Integration test for get_azure_integration_policy_settings error path (HTTP 429)""" + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(429) + ) as context: + self.api.get_azure_integration_policy_settings( + + aid=aid, + + _headers=self.te_headers("get_azure_integration_policy_settings", error_status="429"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_get_azure_integration_policy_settings_error_500(self) -> None: + """Integration test for get_azure_integration_policy_settings error path (HTTP 500)""" + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(500) + ) as context: + self.api.get_azure_integration_policy_settings( + + aid=aid, + + _headers=self.te_headers("get_azure_integration_policy_settings", error_status="500"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + + + def test_update_aws_integration_policy_settings_happy_path(self) -> None: + """Integration test for update_aws_integration_policy_settings success path""" + request_body_json = """ + + { + "enabledRegions" : [ "us-east-1", "eu-west-1", "ap-southeast-2" ], + "enabledResourceGroupTypes" : [ "ec2", "s3-bucket", "global-network" ], + "_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" + } + }, + "enabledCloudtrail" : true + } + + """ + aws_integration_policy_setting = thousandeyes_sdk.cloud_insights_integrations.models.AwsIntegrationPolicySetting.from_json(request_body_json) + aid = '1234' + response_body_json = """ + { + "enabledRegions" : [ "us-east-1", "eu-west-1", "ap-southeast-2" ], + "enabledResourceGroupTypes" : [ "ec2", "s3-bucket", "global-network" ], + "_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" + } + }, + "enabledCloudtrail" : true + } + """ + expected_response = json.loads(response_body_json) + response = self.api.update_aws_integration_policy_settings( + + aws_integration_policy_setting=aws_integration_policy_setting, + + aid=aid, + + _headers=self.te_headers("update_aws_integration_policy_settings"), + ) + assert_constructed_model_matches_example_json(response, expected_response) + + + def test_update_aws_integration_policy_settings_error_400(self) -> None: + """Integration test for update_aws_integration_policy_settings error path (HTTP 400)""" + request_body_json = """ + + { + "enabledRegions" : [ "us-east-1", "eu-west-1", "ap-southeast-2" ], + "enabledResourceGroupTypes" : [ "ec2", "s3-bucket", "global-network" ], + "_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" + } + }, + "enabledCloudtrail" : true + } + + """ + aws_integration_policy_setting = thousandeyes_sdk.cloud_insights_integrations.models.AwsIntegrationPolicySetting.from_json(request_body_json) + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "errors" : [ { + "code" : "code", + "field" : "field", + "message" : "message" + }, { + "code" : "code", + "field" : "field", + "message" : "message" + } ], + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(400) + ) as context: + self.api.update_aws_integration_policy_settings( + + aws_integration_policy_setting=aws_integration_policy_setting, + + aid=aid, + + _headers=self.te_headers("update_aws_integration_policy_settings", error_status="400"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_update_aws_integration_policy_settings_error_401(self) -> None: + """Integration test for update_aws_integration_policy_settings error path (HTTP 401)""" + request_body_json = """ + + { + "enabledRegions" : [ "us-east-1", "eu-west-1", "ap-southeast-2" ], + "enabledResourceGroupTypes" : [ "ec2", "s3-bucket", "global-network" ], + "_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" + } + }, + "enabledCloudtrail" : true + } + + """ + aws_integration_policy_setting = thousandeyes_sdk.cloud_insights_integrations.models.AwsIntegrationPolicySetting.from_json(request_body_json) + aid = '1234' + error_body_json = """ + { + "error_description" : "Invalid access token", + "error" : "invalid_token" + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(401) + ) as context: + self.api.update_aws_integration_policy_settings( + + aws_integration_policy_setting=aws_integration_policy_setting, + + aid=aid, + + _headers=self.te_headers("update_aws_integration_policy_settings", error_status="401"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_update_aws_integration_policy_settings_error_403(self) -> None: + """Integration test for update_aws_integration_policy_settings error path (HTTP 403)""" + request_body_json = """ + + { + "enabledRegions" : [ "us-east-1", "eu-west-1", "ap-southeast-2" ], + "enabledResourceGroupTypes" : [ "ec2", "s3-bucket", "global-network" ], + "_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" + } + }, + "enabledCloudtrail" : true + } + + """ + aws_integration_policy_setting = thousandeyes_sdk.cloud_insights_integrations.models.AwsIntegrationPolicySetting.from_json(request_body_json) + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(403) + ) as context: + self.api.update_aws_integration_policy_settings( + + aws_integration_policy_setting=aws_integration_policy_setting, + + aid=aid, + + _headers=self.te_headers("update_aws_integration_policy_settings", error_status="403"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_update_aws_integration_policy_settings_error_404(self) -> None: + """Integration test for update_aws_integration_policy_settings error path (HTTP 404)""" + request_body_json = """ + + { + "enabledRegions" : [ "us-east-1", "eu-west-1", "ap-southeast-2" ], + "enabledResourceGroupTypes" : [ "ec2", "s3-bucket", "global-network" ], + "_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" + } + }, + "enabledCloudtrail" : true + } + + """ + aws_integration_policy_setting = thousandeyes_sdk.cloud_insights_integrations.models.AwsIntegrationPolicySetting.from_json(request_body_json) + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(404) + ) as context: + self.api.update_aws_integration_policy_settings( + + aws_integration_policy_setting=aws_integration_policy_setting, + + aid=aid, + + _headers=self.te_headers("update_aws_integration_policy_settings", error_status="404"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_update_aws_integration_policy_settings_error_429(self) -> None: + """Integration test for update_aws_integration_policy_settings error path (HTTP 429)""" + request_body_json = """ + + { + "enabledRegions" : [ "us-east-1", "eu-west-1", "ap-southeast-2" ], + "enabledResourceGroupTypes" : [ "ec2", "s3-bucket", "global-network" ], + "_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" + } + }, + "enabledCloudtrail" : true + } + + """ + aws_integration_policy_setting = thousandeyes_sdk.cloud_insights_integrations.models.AwsIntegrationPolicySetting.from_json(request_body_json) + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(429) + ) as context: + self.api.update_aws_integration_policy_settings( + + aws_integration_policy_setting=aws_integration_policy_setting, + + aid=aid, + + _headers=self.te_headers("update_aws_integration_policy_settings", error_status="429"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_update_aws_integration_policy_settings_error_500(self) -> None: + """Integration test for update_aws_integration_policy_settings error path (HTTP 500)""" + request_body_json = """ + + { + "enabledRegions" : [ "us-east-1", "eu-west-1", "ap-southeast-2" ], + "enabledResourceGroupTypes" : [ "ec2", "s3-bucket", "global-network" ], + "_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" + } + }, + "enabledCloudtrail" : true + } + + """ + aws_integration_policy_setting = thousandeyes_sdk.cloud_insights_integrations.models.AwsIntegrationPolicySetting.from_json(request_body_json) + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(500) + ) as context: + self.api.update_aws_integration_policy_settings( + + aws_integration_policy_setting=aws_integration_policy_setting, + + aid=aid, + + _headers=self.te_headers("update_aws_integration_policy_settings", error_status="500"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + + + def test_update_azure_integration_policy_settings_happy_path(self) -> None: + """Integration test for update_azure_integration_policy_settings success path""" + request_body_json = """ + + { + "enabledResourceGroupTypes" : [ "networking", "virtual-wan", "traffic-manager" ], + "_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" + } + }, + "subscriptionsPolicy" : { + "rules" : [ { + "field" : "subscription-name", + "pattern" : "^prod-.*$", + "action" : "include" + }, { + "field" : "subscription-id", + "pattern" : "3145d332-e1c9-4670-a672-12e17d4f627e", + "action" : "exclude" + } ], + "defaultAction" : "exclude" + } + } + + """ + azure_integration_policy_setting = thousandeyes_sdk.cloud_insights_integrations.models.AzureIntegrationPolicySetting.from_json(request_body_json) + aid = '1234' + response_body_json = """ + { + "enabledResourceGroupTypes" : [ "networking", "virtual-wan", "traffic-manager" ], + "_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" + } + }, + "subscriptionsPolicy" : { + "rules" : [ { + "field" : "subscription-name", + "pattern" : "^prod-.*$", + "action" : "include" + }, { + "field" : "subscription-id", + "pattern" : "3145d332-e1c9-4670-a672-12e17d4f627e", + "action" : "exclude" + } ], + "defaultAction" : "exclude" + } + } + """ + expected_response = json.loads(response_body_json) + response = self.api.update_azure_integration_policy_settings( + + azure_integration_policy_setting=azure_integration_policy_setting, + + aid=aid, + + _headers=self.te_headers("update_azure_integration_policy_settings"), + ) + assert_constructed_model_matches_example_json(response, expected_response) + + + def test_update_azure_integration_policy_settings_error_400(self) -> None: + """Integration test for update_azure_integration_policy_settings error path (HTTP 400)""" + request_body_json = """ + + { + "enabledResourceGroupTypes" : [ "networking", "virtual-wan", "traffic-manager" ], + "_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" + } + }, + "subscriptionsPolicy" : { + "rules" : [ { + "field" : "subscription-name", + "pattern" : "^prod-.*$", + "action" : "include" + }, { + "field" : "subscription-id", + "pattern" : "3145d332-e1c9-4670-a672-12e17d4f627e", + "action" : "exclude" + } ], + "defaultAction" : "exclude" + } + } + + """ + azure_integration_policy_setting = thousandeyes_sdk.cloud_insights_integrations.models.AzureIntegrationPolicySetting.from_json(request_body_json) + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "errors" : [ { + "code" : "code", + "field" : "field", + "message" : "message" + }, { + "code" : "code", + "field" : "field", + "message" : "message" + } ], + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(400) + ) as context: + self.api.update_azure_integration_policy_settings( + + azure_integration_policy_setting=azure_integration_policy_setting, + + aid=aid, + + _headers=self.te_headers("update_azure_integration_policy_settings", error_status="400"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_update_azure_integration_policy_settings_error_401(self) -> None: + """Integration test for update_azure_integration_policy_settings error path (HTTP 401)""" + request_body_json = """ + + { + "enabledResourceGroupTypes" : [ "networking", "virtual-wan", "traffic-manager" ], + "_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" + } + }, + "subscriptionsPolicy" : { + "rules" : [ { + "field" : "subscription-name", + "pattern" : "^prod-.*$", + "action" : "include" + }, { + "field" : "subscription-id", + "pattern" : "3145d332-e1c9-4670-a672-12e17d4f627e", + "action" : "exclude" + } ], + "defaultAction" : "exclude" + } + } + + """ + azure_integration_policy_setting = thousandeyes_sdk.cloud_insights_integrations.models.AzureIntegrationPolicySetting.from_json(request_body_json) + aid = '1234' + error_body_json = """ + { + "error_description" : "Invalid access token", + "error" : "invalid_token" + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(401) + ) as context: + self.api.update_azure_integration_policy_settings( + + azure_integration_policy_setting=azure_integration_policy_setting, + + aid=aid, + + _headers=self.te_headers("update_azure_integration_policy_settings", error_status="401"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_update_azure_integration_policy_settings_error_403(self) -> None: + """Integration test for update_azure_integration_policy_settings error path (HTTP 403)""" + request_body_json = """ + + { + "enabledResourceGroupTypes" : [ "networking", "virtual-wan", "traffic-manager" ], + "_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" + } + }, + "subscriptionsPolicy" : { + "rules" : [ { + "field" : "subscription-name", + "pattern" : "^prod-.*$", + "action" : "include" + }, { + "field" : "subscription-id", + "pattern" : "3145d332-e1c9-4670-a672-12e17d4f627e", + "action" : "exclude" + } ], + "defaultAction" : "exclude" + } + } + + """ + azure_integration_policy_setting = thousandeyes_sdk.cloud_insights_integrations.models.AzureIntegrationPolicySetting.from_json(request_body_json) + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(403) + ) as context: + self.api.update_azure_integration_policy_settings( + + azure_integration_policy_setting=azure_integration_policy_setting, + + aid=aid, + + _headers=self.te_headers("update_azure_integration_policy_settings", error_status="403"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_update_azure_integration_policy_settings_error_404(self) -> None: + """Integration test for update_azure_integration_policy_settings error path (HTTP 404)""" + request_body_json = """ + + { + "enabledResourceGroupTypes" : [ "networking", "virtual-wan", "traffic-manager" ], + "_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" + } + }, + "subscriptionsPolicy" : { + "rules" : [ { + "field" : "subscription-name", + "pattern" : "^prod-.*$", + "action" : "include" + }, { + "field" : "subscription-id", + "pattern" : "3145d332-e1c9-4670-a672-12e17d4f627e", + "action" : "exclude" + } ], + "defaultAction" : "exclude" + } + } + + """ + azure_integration_policy_setting = thousandeyes_sdk.cloud_insights_integrations.models.AzureIntegrationPolicySetting.from_json(request_body_json) + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(404) + ) as context: + self.api.update_azure_integration_policy_settings( + + azure_integration_policy_setting=azure_integration_policy_setting, + + aid=aid, + + _headers=self.te_headers("update_azure_integration_policy_settings", error_status="404"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_update_azure_integration_policy_settings_error_429(self) -> None: + """Integration test for update_azure_integration_policy_settings error path (HTTP 429)""" + request_body_json = """ + + { + "enabledResourceGroupTypes" : [ "networking", "virtual-wan", "traffic-manager" ], + "_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" + } + }, + "subscriptionsPolicy" : { + "rules" : [ { + "field" : "subscription-name", + "pattern" : "^prod-.*$", + "action" : "include" + }, { + "field" : "subscription-id", + "pattern" : "3145d332-e1c9-4670-a672-12e17d4f627e", + "action" : "exclude" + } ], + "defaultAction" : "exclude" + } + } + + """ + azure_integration_policy_setting = thousandeyes_sdk.cloud_insights_integrations.models.AzureIntegrationPolicySetting.from_json(request_body_json) + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(429) + ) as context: + self.api.update_azure_integration_policy_settings( + + azure_integration_policy_setting=azure_integration_policy_setting, + + aid=aid, + + _headers=self.te_headers("update_azure_integration_policy_settings", error_status="429"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_update_azure_integration_policy_settings_error_500(self) -> None: + """Integration test for update_azure_integration_policy_settings error path (HTTP 500)""" + request_body_json = """ + + { + "enabledResourceGroupTypes" : [ "networking", "virtual-wan", "traffic-manager" ], + "_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" + } + }, + "subscriptionsPolicy" : { + "rules" : [ { + "field" : "subscription-name", + "pattern" : "^prod-.*$", + "action" : "include" + }, { + "field" : "subscription-id", + "pattern" : "3145d332-e1c9-4670-a672-12e17d4f627e", + "action" : "exclude" + } ], + "defaultAction" : "exclude" + } + } + + """ + azure_integration_policy_setting = thousandeyes_sdk.cloud_insights_integrations.models.AzureIntegrationPolicySetting.from_json(request_body_json) + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(500) + ) as context: + self.api.update_azure_integration_policy_settings( + + azure_integration_policy_setting=azure_integration_policy_setting, + + aid=aid, + + _headers=self.te_headers("update_azure_integration_policy_settings", error_status="500"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + + + + +if __name__ == '__main__': + unittest.main() diff --git a/thousandeyes-sdk-cloud-insights-integrations/test/test_cloud_insights_integrations_api.py b/thousandeyes-sdk-cloud-insights-integrations/test/test_cloud_insights_integrations_api.py new file mode 100644 index 000000000..83dd90f8a --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/test/test_cloud_insights_integrations_api.py @@ -0,0 +1,507 @@ +# coding: utf-8 + +""" + Cloud Insights Integrations API + + **Note:** All Cloud Insights APIs are not available for ThousandEyes for Government instance. The Cloud Insights Integrations API lets you programmatically manage **AWS** and **Azure** monitoring integrations in ThousandEyes. ### What You Can Do - **List** all integrations. - **Get** details for a specific integration. - **Delete** an existing integration. - **Create** integrations for: - **AWS**: inventory monitoring and flow logs monitoring. - **Azure**: inventory monitoring and flow logs monitoring. - **Update** integrations for: - **Azure**: inventory monitoring and flow logs monitoring. - **Fetch AWS IAM policy documents** required to configure AWS inventory and flow-logs integrations. - **Retrieve** the current AWS and Azure integration policy settings to understand which AWS and Azure resource groups, AWS regions, Azure subscription rules are enabled and whether CloudTrail is enabled for Cloud Insights for inventory monitoring. - **Update** policy settings to change the approved AWS resource groups, AWS regions, and Azure subscription rules that ThousandEyes should inventory. ### Scope and Tenancy All operations are scoped to the authenticated account group. Responses include only resources associated with that group. ### Payloads and formats - **Requests:** `application/json` - **Responses:** primarily `application/hal+json` for resource representations and `application/json` for policy documents. - HAL responses include `_links` with a `self` relation for direct navigation. ### Integration Types - **Inventory monitoring** - AWS: reads inventory and network topology via read-only IAM permissions. - Azure: authenticates with a Service Principal to read inventory and network topology. - **Flow logs monitoring** - AWS: reads flow logs from S3 buckets and uses SNS for notifications. - Azure: reads flow logs via **Service Bus Queue** (`serviceBusQueueUrl`). ### Policy Helpers (AWS) Dedicated endpoints return **Trusted Policy**, **Permissions Policy**, and **SNS Topic Access Policy** documents to simplify role setup for inventory and flow logs integrations. ### Notes - All example values in this specification are **fictitious**. For more information about Cloud Insights, see [Cloud Insights](https://docs.thousandeyes.com/product-documentation/cloud-insights). + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.cloud_insights_integrations.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.cloud_insights_integrations.api.cloud_insights_integrations_api import CloudInsightsIntegrationsApi + + +class TestCloudInsightsIntegrationsApi(unittest.TestCase): + """CloudInsightsIntegrationsApi unit test stubs""" + + def setUp(self) -> None: + self.api = CloudInsightsIntegrationsApi() + + def tearDown(self) -> None: + pass + + def test_create_aws_flow_logs_monitoring_integration_models_validation(self) -> None: + """Test case for create_aws_flow_logs_monitoring_integration request and response models""" + request_body_json = """ + { + "roleArn" : "arn:aws:iam::01234567890:role/aws-flow-logs-ro", + "name" : "integration name", + "snsTopicsArns" : [ "arn:aws:sns:us-east-1:01234567890:SNS-Topic-US", "arn:aws:sns:eu-central-1:01234567890:SNS-Topic-EU" ] + } + """ + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.cloud_insights_integrations.models.AwsFlowLogsIntegrationRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + + response_body_json = """ + { + "monitoringType" : "inventory-monitoring", + "_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" + } + }, + "roleArn" : "arn:aws:iam::01234567890:role/aws-monitoring-ro", + "name" : "integration name", + "externalId" : "37d8f861cffd34212b5a34466564da1f80b01a30", + "snsTopicsArns" : [ "arn:aws:sns:us-east-1:01234567890:SNS-Topic-US", "arn:aws:sns:eu-central-1:01234567890:SNS-Topic-EU" ], + "id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.cloud_insights_integrations.models.AwsMonitoringIntegration.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + + def test_create_aws_inventory_monitoring_integration_models_validation(self) -> None: + """Test case for create_aws_inventory_monitoring_integration request and response models""" + request_body_json = """ + { + "roleArn" : "arn:aws:iam::01234567890:role/aws-inventory-ro", + "name" : "integration name" + } + """ + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.cloud_insights_integrations.models.AwsInventoryIntegrationRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + + response_body_json = """ + { + "monitoringType" : "inventory-monitoring", + "_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" + } + }, + "roleArn" : "arn:aws:iam::01234567890:role/aws-monitoring-ro", + "name" : "integration name", + "externalId" : "37d8f861cffd34212b5a34466564da1f80b01a30", + "snsTopicsArns" : [ "arn:aws:sns:us-east-1:01234567890:SNS-Topic-US", "arn:aws:sns:eu-central-1:01234567890:SNS-Topic-EU" ], + "id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.cloud_insights_integrations.models.AwsMonitoringIntegration.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + + def test_create_azure_flow_logs_monitoring_integration_models_validation(self) -> None: + """Test case for create_azure_flow_logs_monitoring_integration request and response models""" + request_body_json = """ + { + "password" : "p9z4Q~U7LkdX1yZr3TcB6fJqG8aM0sDeT5R9hVnKw", + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44", + "serviceBusQueueUrl" : "https://your-service-bus-namespace.servicebus.windows.net/your-queue-name" + } + """ + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.cloud_insights_integrations.models.AzureFlowLogsIntegrationRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + + response_body_json = """ + { + "password" : "********", + "monitoringType" : "azure-inventory-monitoring", + "_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" + } + }, + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44", + "serviceBusQueueUrl" : "https://your-service-bus-namespace.servicebus.windows.net/your-queue-name" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.cloud_insights_integrations.models.AzureMonitoringIntegration.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + + def test_create_azure_inventory_monitoring_integration_models_validation(self) -> None: + """Test case for create_azure_inventory_monitoring_integration request and response models""" + request_body_json = """ + { + "password" : "p9z4Q~U7LkdX1yZr3TcB6fJqG8aM0sDeT5R9hVnKw", + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44" + } + """ + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.cloud_insights_integrations.models.AzureInventoryIntegrationRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + + response_body_json = """ + { + "password" : "********", + "monitoringType" : "azure-inventory-monitoring", + "_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" + } + }, + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44", + "serviceBusQueueUrl" : "https://your-service-bus-namespace.servicebus.windows.net/your-queue-name" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.cloud_insights_integrations.models.AzureMonitoringIntegration.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + + def test_delete_aws_monitoring_integration_models_validation(self) -> None: + """Test case for delete_aws_monitoring_integration request and response models""" + + + + def test_delete_azure_monitoring_integration_models_validation(self) -> None: + """Test case for delete_azure_monitoring_integration request and response models""" + + + + def test_get_all_aws_monitoring_integrations_models_validation(self) -> None: + """Test case for get_all_aws_monitoring_integrations request and response models""" + + + response_body_json = """ + { + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "integrations" : [ { + "monitoringType" : "inventory-monitoring", + "_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" + } + }, + "roleArn" : "arn:aws:iam::01234567890:role/aws-monitoring-ro", + "name" : "integration name", + "externalId" : "37d8f861cffd34212b5a34466564da1f80b01a30", + "snsTopicsArns" : [ "arn:aws:sns:us-east-1:01234567890:SNS-Topic-US", "arn:aws:sns:eu-central-1:01234567890:SNS-Topic-EU" ], + "id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569" + }, { + "monitoringType" : "inventory-monitoring", + "_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" + } + }, + "roleArn" : "arn:aws:iam::01234567890:role/aws-monitoring-ro", + "name" : "integration name", + "externalId" : "37d8f861cffd34212b5a34466564da1f80b01a30", + "snsTopicsArns" : [ "arn:aws:sns:us-east-1:01234567890:SNS-Topic-US", "arn:aws:sns:eu-central-1:01234567890:SNS-Topic-EU" ], + "id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.cloud_insights_integrations.models.AwsMonitoringIntegrations.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + + def test_get_all_azure_monitoring_integrations_models_validation(self) -> None: + """Test case for get_all_azure_monitoring_integrations request and response models""" + + + response_body_json = """ + { + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "integrations" : [ { + "password" : "********", + "monitoringType" : "azure-inventory-monitoring", + "_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" + } + }, + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44", + "serviceBusQueueUrl" : "https://your-service-bus-namespace.servicebus.windows.net/your-queue-name" + }, { + "password" : "********", + "monitoringType" : "azure-inventory-monitoring", + "_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" + } + }, + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44", + "serviceBusQueueUrl" : "https://your-service-bus-namespace.servicebus.windows.net/your-queue-name" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.cloud_insights_integrations.models.AzureMonitoringIntegrations.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + + def test_get_aws_flowlogs_monitoring_integration_policies_models_validation(self) -> None: + """Test case for get_aws_flowlogs_monitoring_integration_policies request and response models""" + + + + def test_get_aws_inventory_monitoring_integration_policies_models_validation(self) -> None: + """Test case for get_aws_inventory_monitoring_integration_policies request and response models""" + + + + def test_get_aws_monitoring_integration_models_validation(self) -> None: + """Test case for get_aws_monitoring_integration request and response models""" + + + response_body_json = """ + { + "monitoringType" : "inventory-monitoring", + "_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" + } + }, + "roleArn" : "arn:aws:iam::01234567890:role/aws-monitoring-ro", + "name" : "integration name", + "externalId" : "37d8f861cffd34212b5a34466564da1f80b01a30", + "snsTopicsArns" : [ "arn:aws:sns:us-east-1:01234567890:SNS-Topic-US", "arn:aws:sns:eu-central-1:01234567890:SNS-Topic-EU" ], + "id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.cloud_insights_integrations.models.AwsMonitoringIntegration.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + + def test_get_azure_monitoring_integration_models_validation(self) -> None: + """Test case for get_azure_monitoring_integration request and response models""" + + + response_body_json = """ + { + "password" : "********", + "monitoringType" : "azure-inventory-monitoring", + "_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" + } + }, + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44", + "serviceBusQueueUrl" : "https://your-service-bus-namespace.servicebus.windows.net/your-queue-name" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.cloud_insights_integrations.models.AzureMonitoringIntegration.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + + def test_update_azure_flow_logs_monitoring_integration_models_validation(self) -> None: + """Test case for update_azure_flow_logs_monitoring_integration request and response models""" + request_body_json = """ + { + "password" : "p9z4Q~U7LkdX1yZr3TcB6fJqG8aM0sDeT5R9hVnKw", + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44", + "serviceBusQueueUrl" : "https://your-service-bus-namespace.servicebus.windows.net/your-queue-name" + } + """ + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.cloud_insights_integrations.models.AzureFlowLogsIntegrationRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + + response_body_json = """ + { + "password" : "********", + "monitoringType" : "azure-inventory-monitoring", + "_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" + } + }, + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44", + "serviceBusQueueUrl" : "https://your-service-bus-namespace.servicebus.windows.net/your-queue-name" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.cloud_insights_integrations.models.AzureMonitoringIntegration.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + + def test_update_azure_inventory_monitoring_integration_models_validation(self) -> None: + """Test case for update_azure_inventory_monitoring_integration request and response models""" + request_body_json = """ + { + "password" : "p9z4Q~U7LkdX1yZr3TcB6fJqG8aM0sDeT5R9hVnKw", + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44" + } + """ + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.cloud_insights_integrations.models.AzureInventoryIntegrationRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + + response_body_json = """ + { + "password" : "********", + "monitoringType" : "azure-inventory-monitoring", + "_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" + } + }, + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44", + "serviceBusQueueUrl" : "https://your-service-bus-namespace.servicebus.windows.net/your-queue-name" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.cloud_insights_integrations.models.AzureMonitoringIntegration.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + + +if __name__ == '__main__': + unittest.main() diff --git a/thousandeyes-sdk-cloud-insights-integrations/test/test_cloud_insights_integrations_api_integration.py b/thousandeyes-sdk-cloud-insights-integrations/test/test_cloud_insights_integrations_api_integration.py new file mode 100644 index 000000000..4caf6065f --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/test/test_cloud_insights_integrations_api_integration.py @@ -0,0 +1,2903 @@ +# coding: utf-8 + +""" + Cloud Insights Integrations API + + **Note:** All Cloud Insights APIs are not available for ThousandEyes for Government instance. The Cloud Insights Integrations API lets you programmatically manage **AWS** and **Azure** monitoring integrations in ThousandEyes. ### What You Can Do - **List** all integrations. - **Get** details for a specific integration. - **Delete** an existing integration. - **Create** integrations for: - **AWS**: inventory monitoring and flow logs monitoring. - **Azure**: inventory monitoring and flow logs monitoring. - **Update** integrations for: - **Azure**: inventory monitoring and flow logs monitoring. - **Fetch AWS IAM policy documents** required to configure AWS inventory and flow-logs integrations. - **Retrieve** the current AWS and Azure integration policy settings to understand which AWS and Azure resource groups, AWS regions, Azure subscription rules are enabled and whether CloudTrail is enabled for Cloud Insights for inventory monitoring. - **Update** policy settings to change the approved AWS resource groups, AWS regions, and Azure subscription rules that ThousandEyes should inventory. ### Scope and Tenancy All operations are scoped to the authenticated account group. Responses include only resources associated with that group. ### Payloads and formats - **Requests:** `application/json` - **Responses:** primarily `application/hal+json` for resource representations and `application/json` for policy documents. - HAL responses include `_links` with a `self` relation for direct navigation. ### Integration Types - **Inventory monitoring** - AWS: reads inventory and network topology via read-only IAM permissions. - Azure: authenticates with a Service Principal to read inventory and network topology. - **Flow logs monitoring** - AWS: reads flow logs from S3 buckets and uses SNS for notifications. - Azure: reads flow logs via **Service Bus Queue** (`serviceBusQueueUrl`). ### Policy Helpers (AWS) Dedicated endpoints return **Trusted Policy**, **Permissions Policy**, and **SNS Topic Access Policy** documents to simplify role setup for inventory and flow logs integrations. ### Notes - All example values in this specification are **fictitious**. For more information about Cloud Insights, see [Cloud Insights](https://docs.thousandeyes.com/product-documentation/cloud-insights). + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.cloud_insights_integrations.models + +from thousandeyes_sdk.core.exceptions import ApiException +from thousandeyes_sdk.cloud_insights_integrations.api.cloud_insights_integrations_api import CloudInsightsIntegrationsApi +from .integration_test_utils import IntegrationTestBase +from .test_utils import assert_constructed_model_matches_example_json + + +class TestCloudInsightsIntegrationsApiIntegration(IntegrationTestBase): + """CloudInsightsIntegrationsApi integration test stubs""" + + def setUp(self) -> None: + super().setUp() + self.api = CloudInsightsIntegrationsApi(self.api_client) + + + def test_create_aws_flow_logs_monitoring_integration_happy_path(self) -> None: + """Integration test for create_aws_flow_logs_monitoring_integration success path""" + request_body_json = """ + + { + "roleArn" : "arn:aws:iam::01234567890:role/aws-flow-logs-ro", + "name" : "integration name", + "snsTopicsArns" : [ "arn:aws:sns:us-east-1:01234567890:SNS-Topic-US", "arn:aws:sns:eu-central-1:01234567890:SNS-Topic-EU" ] + } + + """ + aws_flow_logs_integration_request = thousandeyes_sdk.cloud_insights_integrations.models.AwsFlowLogsIntegrationRequest.from_json(request_body_json) + aid = '1234' + response_body_json = """ + { + "monitoringType" : "inventory-monitoring", + "_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" + } + }, + "roleArn" : "arn:aws:iam::01234567890:role/aws-monitoring-ro", + "name" : "integration name", + "externalId" : "37d8f861cffd34212b5a34466564da1f80b01a30", + "snsTopicsArns" : [ "arn:aws:sns:us-east-1:01234567890:SNS-Topic-US", "arn:aws:sns:eu-central-1:01234567890:SNS-Topic-EU" ], + "id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569" + } + """ + expected_response = json.loads(response_body_json) + response = self.api.create_aws_flow_logs_monitoring_integration( + + aws_flow_logs_integration_request=aws_flow_logs_integration_request, + + aid=aid, + + _headers=self.te_headers("create_aws_flow_logs_monitoring_integration"), + ) + assert_constructed_model_matches_example_json(response, expected_response) + + + def test_create_aws_flow_logs_monitoring_integration_error_400(self) -> None: + """Integration test for create_aws_flow_logs_monitoring_integration error path (HTTP 400)""" + request_body_json = """ + + { + "roleArn" : "arn:aws:iam::01234567890:role/aws-flow-logs-ro", + "name" : "integration name", + "snsTopicsArns" : [ "arn:aws:sns:us-east-1:01234567890:SNS-Topic-US", "arn:aws:sns:eu-central-1:01234567890:SNS-Topic-EU" ] + } + + """ + aws_flow_logs_integration_request = thousandeyes_sdk.cloud_insights_integrations.models.AwsFlowLogsIntegrationRequest.from_json(request_body_json) + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "errors" : [ { + "code" : "code", + "field" : "field", + "message" : "message" + }, { + "code" : "code", + "field" : "field", + "message" : "message" + } ], + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(400) + ) as context: + self.api.create_aws_flow_logs_monitoring_integration( + + aws_flow_logs_integration_request=aws_flow_logs_integration_request, + + aid=aid, + + _headers=self.te_headers("create_aws_flow_logs_monitoring_integration", error_status="400"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_create_aws_flow_logs_monitoring_integration_error_401(self) -> None: + """Integration test for create_aws_flow_logs_monitoring_integration error path (HTTP 401)""" + request_body_json = """ + + { + "roleArn" : "arn:aws:iam::01234567890:role/aws-flow-logs-ro", + "name" : "integration name", + "snsTopicsArns" : [ "arn:aws:sns:us-east-1:01234567890:SNS-Topic-US", "arn:aws:sns:eu-central-1:01234567890:SNS-Topic-EU" ] + } + + """ + aws_flow_logs_integration_request = thousandeyes_sdk.cloud_insights_integrations.models.AwsFlowLogsIntegrationRequest.from_json(request_body_json) + aid = '1234' + error_body_json = """ + { + "error_description" : "Invalid access token", + "error" : "invalid_token" + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(401) + ) as context: + self.api.create_aws_flow_logs_monitoring_integration( + + aws_flow_logs_integration_request=aws_flow_logs_integration_request, + + aid=aid, + + _headers=self.te_headers("create_aws_flow_logs_monitoring_integration", error_status="401"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_create_aws_flow_logs_monitoring_integration_error_403(self) -> None: + """Integration test for create_aws_flow_logs_monitoring_integration error path (HTTP 403)""" + request_body_json = """ + + { + "roleArn" : "arn:aws:iam::01234567890:role/aws-flow-logs-ro", + "name" : "integration name", + "snsTopicsArns" : [ "arn:aws:sns:us-east-1:01234567890:SNS-Topic-US", "arn:aws:sns:eu-central-1:01234567890:SNS-Topic-EU" ] + } + + """ + aws_flow_logs_integration_request = thousandeyes_sdk.cloud_insights_integrations.models.AwsFlowLogsIntegrationRequest.from_json(request_body_json) + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(403) + ) as context: + self.api.create_aws_flow_logs_monitoring_integration( + + aws_flow_logs_integration_request=aws_flow_logs_integration_request, + + aid=aid, + + _headers=self.te_headers("create_aws_flow_logs_monitoring_integration", error_status="403"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_create_aws_flow_logs_monitoring_integration_error_404(self) -> None: + """Integration test for create_aws_flow_logs_monitoring_integration error path (HTTP 404)""" + request_body_json = """ + + { + "roleArn" : "arn:aws:iam::01234567890:role/aws-flow-logs-ro", + "name" : "integration name", + "snsTopicsArns" : [ "arn:aws:sns:us-east-1:01234567890:SNS-Topic-US", "arn:aws:sns:eu-central-1:01234567890:SNS-Topic-EU" ] + } + + """ + aws_flow_logs_integration_request = thousandeyes_sdk.cloud_insights_integrations.models.AwsFlowLogsIntegrationRequest.from_json(request_body_json) + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(404) + ) as context: + self.api.create_aws_flow_logs_monitoring_integration( + + aws_flow_logs_integration_request=aws_flow_logs_integration_request, + + aid=aid, + + _headers=self.te_headers("create_aws_flow_logs_monitoring_integration", error_status="404"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_create_aws_flow_logs_monitoring_integration_error_429(self) -> None: + """Integration test for create_aws_flow_logs_monitoring_integration error path (HTTP 429)""" + request_body_json = """ + + { + "roleArn" : "arn:aws:iam::01234567890:role/aws-flow-logs-ro", + "name" : "integration name", + "snsTopicsArns" : [ "arn:aws:sns:us-east-1:01234567890:SNS-Topic-US", "arn:aws:sns:eu-central-1:01234567890:SNS-Topic-EU" ] + } + + """ + aws_flow_logs_integration_request = thousandeyes_sdk.cloud_insights_integrations.models.AwsFlowLogsIntegrationRequest.from_json(request_body_json) + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(429) + ) as context: + self.api.create_aws_flow_logs_monitoring_integration( + + aws_flow_logs_integration_request=aws_flow_logs_integration_request, + + aid=aid, + + _headers=self.te_headers("create_aws_flow_logs_monitoring_integration", error_status="429"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_create_aws_flow_logs_monitoring_integration_error_500(self) -> None: + """Integration test for create_aws_flow_logs_monitoring_integration error path (HTTP 500)""" + request_body_json = """ + + { + "roleArn" : "arn:aws:iam::01234567890:role/aws-flow-logs-ro", + "name" : "integration name", + "snsTopicsArns" : [ "arn:aws:sns:us-east-1:01234567890:SNS-Topic-US", "arn:aws:sns:eu-central-1:01234567890:SNS-Topic-EU" ] + } + + """ + aws_flow_logs_integration_request = thousandeyes_sdk.cloud_insights_integrations.models.AwsFlowLogsIntegrationRequest.from_json(request_body_json) + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(500) + ) as context: + self.api.create_aws_flow_logs_monitoring_integration( + + aws_flow_logs_integration_request=aws_flow_logs_integration_request, + + aid=aid, + + _headers=self.te_headers("create_aws_flow_logs_monitoring_integration", error_status="500"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + + + def test_create_aws_inventory_monitoring_integration_happy_path(self) -> None: + """Integration test for create_aws_inventory_monitoring_integration success path""" + request_body_json = """ + + { + "roleArn" : "arn:aws:iam::01234567890:role/aws-inventory-ro", + "name" : "integration name" + } + + """ + aws_inventory_integration_request = thousandeyes_sdk.cloud_insights_integrations.models.AwsInventoryIntegrationRequest.from_json(request_body_json) + aid = '1234' + response_body_json = """ + { + "monitoringType" : "inventory-monitoring", + "_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" + } + }, + "roleArn" : "arn:aws:iam::01234567890:role/aws-monitoring-ro", + "name" : "integration name", + "externalId" : "37d8f861cffd34212b5a34466564da1f80b01a30", + "snsTopicsArns" : [ "arn:aws:sns:us-east-1:01234567890:SNS-Topic-US", "arn:aws:sns:eu-central-1:01234567890:SNS-Topic-EU" ], + "id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569" + } + """ + expected_response = json.loads(response_body_json) + response = self.api.create_aws_inventory_monitoring_integration( + + aws_inventory_integration_request=aws_inventory_integration_request, + + aid=aid, + + _headers=self.te_headers("create_aws_inventory_monitoring_integration"), + ) + assert_constructed_model_matches_example_json(response, expected_response) + + + def test_create_aws_inventory_monitoring_integration_error_400(self) -> None: + """Integration test for create_aws_inventory_monitoring_integration error path (HTTP 400)""" + request_body_json = """ + + { + "roleArn" : "arn:aws:iam::01234567890:role/aws-inventory-ro", + "name" : "integration name" + } + + """ + aws_inventory_integration_request = thousandeyes_sdk.cloud_insights_integrations.models.AwsInventoryIntegrationRequest.from_json(request_body_json) + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "errors" : [ { + "code" : "code", + "field" : "field", + "message" : "message" + }, { + "code" : "code", + "field" : "field", + "message" : "message" + } ], + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(400) + ) as context: + self.api.create_aws_inventory_monitoring_integration( + + aws_inventory_integration_request=aws_inventory_integration_request, + + aid=aid, + + _headers=self.te_headers("create_aws_inventory_monitoring_integration", error_status="400"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_create_aws_inventory_monitoring_integration_error_401(self) -> None: + """Integration test for create_aws_inventory_monitoring_integration error path (HTTP 401)""" + request_body_json = """ + + { + "roleArn" : "arn:aws:iam::01234567890:role/aws-inventory-ro", + "name" : "integration name" + } + + """ + aws_inventory_integration_request = thousandeyes_sdk.cloud_insights_integrations.models.AwsInventoryIntegrationRequest.from_json(request_body_json) + aid = '1234' + error_body_json = """ + { + "error_description" : "Invalid access token", + "error" : "invalid_token" + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(401) + ) as context: + self.api.create_aws_inventory_monitoring_integration( + + aws_inventory_integration_request=aws_inventory_integration_request, + + aid=aid, + + _headers=self.te_headers("create_aws_inventory_monitoring_integration", error_status="401"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_create_aws_inventory_monitoring_integration_error_403(self) -> None: + """Integration test for create_aws_inventory_monitoring_integration error path (HTTP 403)""" + request_body_json = """ + + { + "roleArn" : "arn:aws:iam::01234567890:role/aws-inventory-ro", + "name" : "integration name" + } + + """ + aws_inventory_integration_request = thousandeyes_sdk.cloud_insights_integrations.models.AwsInventoryIntegrationRequest.from_json(request_body_json) + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(403) + ) as context: + self.api.create_aws_inventory_monitoring_integration( + + aws_inventory_integration_request=aws_inventory_integration_request, + + aid=aid, + + _headers=self.te_headers("create_aws_inventory_monitoring_integration", error_status="403"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_create_aws_inventory_monitoring_integration_error_404(self) -> None: + """Integration test for create_aws_inventory_monitoring_integration error path (HTTP 404)""" + request_body_json = """ + + { + "roleArn" : "arn:aws:iam::01234567890:role/aws-inventory-ro", + "name" : "integration name" + } + + """ + aws_inventory_integration_request = thousandeyes_sdk.cloud_insights_integrations.models.AwsInventoryIntegrationRequest.from_json(request_body_json) + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(404) + ) as context: + self.api.create_aws_inventory_monitoring_integration( + + aws_inventory_integration_request=aws_inventory_integration_request, + + aid=aid, + + _headers=self.te_headers("create_aws_inventory_monitoring_integration", error_status="404"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_create_aws_inventory_monitoring_integration_error_429(self) -> None: + """Integration test for create_aws_inventory_monitoring_integration error path (HTTP 429)""" + request_body_json = """ + + { + "roleArn" : "arn:aws:iam::01234567890:role/aws-inventory-ro", + "name" : "integration name" + } + + """ + aws_inventory_integration_request = thousandeyes_sdk.cloud_insights_integrations.models.AwsInventoryIntegrationRequest.from_json(request_body_json) + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(429) + ) as context: + self.api.create_aws_inventory_monitoring_integration( + + aws_inventory_integration_request=aws_inventory_integration_request, + + aid=aid, + + _headers=self.te_headers("create_aws_inventory_monitoring_integration", error_status="429"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_create_aws_inventory_monitoring_integration_error_500(self) -> None: + """Integration test for create_aws_inventory_monitoring_integration error path (HTTP 500)""" + request_body_json = """ + + { + "roleArn" : "arn:aws:iam::01234567890:role/aws-inventory-ro", + "name" : "integration name" + } + + """ + aws_inventory_integration_request = thousandeyes_sdk.cloud_insights_integrations.models.AwsInventoryIntegrationRequest.from_json(request_body_json) + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(500) + ) as context: + self.api.create_aws_inventory_monitoring_integration( + + aws_inventory_integration_request=aws_inventory_integration_request, + + aid=aid, + + _headers=self.te_headers("create_aws_inventory_monitoring_integration", error_status="500"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + + + def test_create_azure_flow_logs_monitoring_integration_happy_path(self) -> None: + """Integration test for create_azure_flow_logs_monitoring_integration success path""" + request_body_json = """ + + { + "password" : "p9z4Q~U7LkdX1yZr3TcB6fJqG8aM0sDeT5R9hVnKw", + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44", + "serviceBusQueueUrl" : "https://your-service-bus-namespace.servicebus.windows.net/your-queue-name" + } + + """ + azure_flow_logs_integration_request = thousandeyes_sdk.cloud_insights_integrations.models.AzureFlowLogsIntegrationRequest.from_json(request_body_json) + aid = '1234' + response_body_json = """ + { + "password" : "********", + "monitoringType" : "azure-inventory-monitoring", + "_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" + } + }, + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44", + "serviceBusQueueUrl" : "https://your-service-bus-namespace.servicebus.windows.net/your-queue-name" + } + """ + expected_response = json.loads(response_body_json) + response = self.api.create_azure_flow_logs_monitoring_integration( + + azure_flow_logs_integration_request=azure_flow_logs_integration_request, + + aid=aid, + + _headers=self.te_headers("create_azure_flow_logs_monitoring_integration"), + ) + assert_constructed_model_matches_example_json(response, expected_response) + + + def test_create_azure_flow_logs_monitoring_integration_error_400(self) -> None: + """Integration test for create_azure_flow_logs_monitoring_integration error path (HTTP 400)""" + request_body_json = """ + + { + "password" : "p9z4Q~U7LkdX1yZr3TcB6fJqG8aM0sDeT5R9hVnKw", + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44", + "serviceBusQueueUrl" : "https://your-service-bus-namespace.servicebus.windows.net/your-queue-name" + } + + """ + azure_flow_logs_integration_request = thousandeyes_sdk.cloud_insights_integrations.models.AzureFlowLogsIntegrationRequest.from_json(request_body_json) + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "errors" : [ { + "code" : "code", + "field" : "field", + "message" : "message" + }, { + "code" : "code", + "field" : "field", + "message" : "message" + } ], + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(400) + ) as context: + self.api.create_azure_flow_logs_monitoring_integration( + + azure_flow_logs_integration_request=azure_flow_logs_integration_request, + + aid=aid, + + _headers=self.te_headers("create_azure_flow_logs_monitoring_integration", error_status="400"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_create_azure_flow_logs_monitoring_integration_error_401(self) -> None: + """Integration test for create_azure_flow_logs_monitoring_integration error path (HTTP 401)""" + request_body_json = """ + + { + "password" : "p9z4Q~U7LkdX1yZr3TcB6fJqG8aM0sDeT5R9hVnKw", + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44", + "serviceBusQueueUrl" : "https://your-service-bus-namespace.servicebus.windows.net/your-queue-name" + } + + """ + azure_flow_logs_integration_request = thousandeyes_sdk.cloud_insights_integrations.models.AzureFlowLogsIntegrationRequest.from_json(request_body_json) + aid = '1234' + error_body_json = """ + { + "error_description" : "Invalid access token", + "error" : "invalid_token" + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(401) + ) as context: + self.api.create_azure_flow_logs_monitoring_integration( + + azure_flow_logs_integration_request=azure_flow_logs_integration_request, + + aid=aid, + + _headers=self.te_headers("create_azure_flow_logs_monitoring_integration", error_status="401"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_create_azure_flow_logs_monitoring_integration_error_403(self) -> None: + """Integration test for create_azure_flow_logs_monitoring_integration error path (HTTP 403)""" + request_body_json = """ + + { + "password" : "p9z4Q~U7LkdX1yZr3TcB6fJqG8aM0sDeT5R9hVnKw", + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44", + "serviceBusQueueUrl" : "https://your-service-bus-namespace.servicebus.windows.net/your-queue-name" + } + + """ + azure_flow_logs_integration_request = thousandeyes_sdk.cloud_insights_integrations.models.AzureFlowLogsIntegrationRequest.from_json(request_body_json) + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(403) + ) as context: + self.api.create_azure_flow_logs_monitoring_integration( + + azure_flow_logs_integration_request=azure_flow_logs_integration_request, + + aid=aid, + + _headers=self.te_headers("create_azure_flow_logs_monitoring_integration", error_status="403"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_create_azure_flow_logs_monitoring_integration_error_404(self) -> None: + """Integration test for create_azure_flow_logs_monitoring_integration error path (HTTP 404)""" + request_body_json = """ + + { + "password" : "p9z4Q~U7LkdX1yZr3TcB6fJqG8aM0sDeT5R9hVnKw", + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44", + "serviceBusQueueUrl" : "https://your-service-bus-namespace.servicebus.windows.net/your-queue-name" + } + + """ + azure_flow_logs_integration_request = thousandeyes_sdk.cloud_insights_integrations.models.AzureFlowLogsIntegrationRequest.from_json(request_body_json) + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(404) + ) as context: + self.api.create_azure_flow_logs_monitoring_integration( + + azure_flow_logs_integration_request=azure_flow_logs_integration_request, + + aid=aid, + + _headers=self.te_headers("create_azure_flow_logs_monitoring_integration", error_status="404"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_create_azure_flow_logs_monitoring_integration_error_429(self) -> None: + """Integration test for create_azure_flow_logs_monitoring_integration error path (HTTP 429)""" + request_body_json = """ + + { + "password" : "p9z4Q~U7LkdX1yZr3TcB6fJqG8aM0sDeT5R9hVnKw", + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44", + "serviceBusQueueUrl" : "https://your-service-bus-namespace.servicebus.windows.net/your-queue-name" + } + + """ + azure_flow_logs_integration_request = thousandeyes_sdk.cloud_insights_integrations.models.AzureFlowLogsIntegrationRequest.from_json(request_body_json) + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(429) + ) as context: + self.api.create_azure_flow_logs_monitoring_integration( + + azure_flow_logs_integration_request=azure_flow_logs_integration_request, + + aid=aid, + + _headers=self.te_headers("create_azure_flow_logs_monitoring_integration", error_status="429"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_create_azure_flow_logs_monitoring_integration_error_500(self) -> None: + """Integration test for create_azure_flow_logs_monitoring_integration error path (HTTP 500)""" + request_body_json = """ + + { + "password" : "p9z4Q~U7LkdX1yZr3TcB6fJqG8aM0sDeT5R9hVnKw", + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44", + "serviceBusQueueUrl" : "https://your-service-bus-namespace.servicebus.windows.net/your-queue-name" + } + + """ + azure_flow_logs_integration_request = thousandeyes_sdk.cloud_insights_integrations.models.AzureFlowLogsIntegrationRequest.from_json(request_body_json) + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(500) + ) as context: + self.api.create_azure_flow_logs_monitoring_integration( + + azure_flow_logs_integration_request=azure_flow_logs_integration_request, + + aid=aid, + + _headers=self.te_headers("create_azure_flow_logs_monitoring_integration", error_status="500"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + + + def test_create_azure_inventory_monitoring_integration_happy_path(self) -> None: + """Integration test for create_azure_inventory_monitoring_integration success path""" + request_body_json = """ + + { + "password" : "p9z4Q~U7LkdX1yZr3TcB6fJqG8aM0sDeT5R9hVnKw", + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44" + } + + """ + azure_inventory_integration_request = thousandeyes_sdk.cloud_insights_integrations.models.AzureInventoryIntegrationRequest.from_json(request_body_json) + aid = '1234' + response_body_json = """ + { + "password" : "********", + "monitoringType" : "azure-inventory-monitoring", + "_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" + } + }, + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44", + "serviceBusQueueUrl" : "https://your-service-bus-namespace.servicebus.windows.net/your-queue-name" + } + """ + expected_response = json.loads(response_body_json) + response = self.api.create_azure_inventory_monitoring_integration( + + azure_inventory_integration_request=azure_inventory_integration_request, + + aid=aid, + + _headers=self.te_headers("create_azure_inventory_monitoring_integration"), + ) + assert_constructed_model_matches_example_json(response, expected_response) + + + def test_create_azure_inventory_monitoring_integration_error_400(self) -> None: + """Integration test for create_azure_inventory_monitoring_integration error path (HTTP 400)""" + request_body_json = """ + + { + "password" : "p9z4Q~U7LkdX1yZr3TcB6fJqG8aM0sDeT5R9hVnKw", + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44" + } + + """ + azure_inventory_integration_request = thousandeyes_sdk.cloud_insights_integrations.models.AzureInventoryIntegrationRequest.from_json(request_body_json) + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "errors" : [ { + "code" : "code", + "field" : "field", + "message" : "message" + }, { + "code" : "code", + "field" : "field", + "message" : "message" + } ], + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(400) + ) as context: + self.api.create_azure_inventory_monitoring_integration( + + azure_inventory_integration_request=azure_inventory_integration_request, + + aid=aid, + + _headers=self.te_headers("create_azure_inventory_monitoring_integration", error_status="400"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_create_azure_inventory_monitoring_integration_error_401(self) -> None: + """Integration test for create_azure_inventory_monitoring_integration error path (HTTP 401)""" + request_body_json = """ + + { + "password" : "p9z4Q~U7LkdX1yZr3TcB6fJqG8aM0sDeT5R9hVnKw", + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44" + } + + """ + azure_inventory_integration_request = thousandeyes_sdk.cloud_insights_integrations.models.AzureInventoryIntegrationRequest.from_json(request_body_json) + aid = '1234' + error_body_json = """ + { + "error_description" : "Invalid access token", + "error" : "invalid_token" + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(401) + ) as context: + self.api.create_azure_inventory_monitoring_integration( + + azure_inventory_integration_request=azure_inventory_integration_request, + + aid=aid, + + _headers=self.te_headers("create_azure_inventory_monitoring_integration", error_status="401"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_create_azure_inventory_monitoring_integration_error_403(self) -> None: + """Integration test for create_azure_inventory_monitoring_integration error path (HTTP 403)""" + request_body_json = """ + + { + "password" : "p9z4Q~U7LkdX1yZr3TcB6fJqG8aM0sDeT5R9hVnKw", + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44" + } + + """ + azure_inventory_integration_request = thousandeyes_sdk.cloud_insights_integrations.models.AzureInventoryIntegrationRequest.from_json(request_body_json) + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(403) + ) as context: + self.api.create_azure_inventory_monitoring_integration( + + azure_inventory_integration_request=azure_inventory_integration_request, + + aid=aid, + + _headers=self.te_headers("create_azure_inventory_monitoring_integration", error_status="403"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_create_azure_inventory_monitoring_integration_error_404(self) -> None: + """Integration test for create_azure_inventory_monitoring_integration error path (HTTP 404)""" + request_body_json = """ + + { + "password" : "p9z4Q~U7LkdX1yZr3TcB6fJqG8aM0sDeT5R9hVnKw", + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44" + } + + """ + azure_inventory_integration_request = thousandeyes_sdk.cloud_insights_integrations.models.AzureInventoryIntegrationRequest.from_json(request_body_json) + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(404) + ) as context: + self.api.create_azure_inventory_monitoring_integration( + + azure_inventory_integration_request=azure_inventory_integration_request, + + aid=aid, + + _headers=self.te_headers("create_azure_inventory_monitoring_integration", error_status="404"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_create_azure_inventory_monitoring_integration_error_429(self) -> None: + """Integration test for create_azure_inventory_monitoring_integration error path (HTTP 429)""" + request_body_json = """ + + { + "password" : "p9z4Q~U7LkdX1yZr3TcB6fJqG8aM0sDeT5R9hVnKw", + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44" + } + + """ + azure_inventory_integration_request = thousandeyes_sdk.cloud_insights_integrations.models.AzureInventoryIntegrationRequest.from_json(request_body_json) + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(429) + ) as context: + self.api.create_azure_inventory_monitoring_integration( + + azure_inventory_integration_request=azure_inventory_integration_request, + + aid=aid, + + _headers=self.te_headers("create_azure_inventory_monitoring_integration", error_status="429"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_create_azure_inventory_monitoring_integration_error_500(self) -> None: + """Integration test for create_azure_inventory_monitoring_integration error path (HTTP 500)""" + request_body_json = """ + + { + "password" : "p9z4Q~U7LkdX1yZr3TcB6fJqG8aM0sDeT5R9hVnKw", + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44" + } + + """ + azure_inventory_integration_request = thousandeyes_sdk.cloud_insights_integrations.models.AzureInventoryIntegrationRequest.from_json(request_body_json) + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(500) + ) as context: + self.api.create_azure_inventory_monitoring_integration( + + azure_inventory_integration_request=azure_inventory_integration_request, + + aid=aid, + + _headers=self.te_headers("create_azure_inventory_monitoring_integration", error_status="500"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + + + def test_delete_aws_monitoring_integration_happy_path(self) -> None: + """Integration test for delete_aws_monitoring_integration success path""" + integration_id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569' + aid = '1234' + response = self.api.delete_aws_monitoring_integration_with_http_info( + + integration_id=integration_id, + + aid=aid, + + _headers=self.te_headers("delete_aws_monitoring_integration"), + ) + self.assertEqual(204, response.status_code) + self.assertIsNone(response.data) + + + def test_delete_aws_monitoring_integration_error_400(self) -> None: + """Integration test for delete_aws_monitoring_integration error path (HTTP 400)""" + integration_id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569' + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "errors" : [ { + "code" : "code", + "field" : "field", + "message" : "message" + }, { + "code" : "code", + "field" : "field", + "message" : "message" + } ], + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(400) + ) as context: + self.api.delete_aws_monitoring_integration( + + integration_id=integration_id, + + aid=aid, + + _headers=self.te_headers("delete_aws_monitoring_integration", error_status="400"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_delete_aws_monitoring_integration_error_401(self) -> None: + """Integration test for delete_aws_monitoring_integration error path (HTTP 401)""" + integration_id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569' + aid = '1234' + error_body_json = """ + { + "error_description" : "Invalid access token", + "error" : "invalid_token" + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(401) + ) as context: + self.api.delete_aws_monitoring_integration( + + integration_id=integration_id, + + aid=aid, + + _headers=self.te_headers("delete_aws_monitoring_integration", error_status="401"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_delete_aws_monitoring_integration_error_403(self) -> None: + """Integration test for delete_aws_monitoring_integration error path (HTTP 403)""" + integration_id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569' + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(403) + ) as context: + self.api.delete_aws_monitoring_integration( + + integration_id=integration_id, + + aid=aid, + + _headers=self.te_headers("delete_aws_monitoring_integration", error_status="403"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_delete_aws_monitoring_integration_error_404(self) -> None: + """Integration test for delete_aws_monitoring_integration error path (HTTP 404)""" + integration_id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569' + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(404) + ) as context: + self.api.delete_aws_monitoring_integration( + + integration_id=integration_id, + + aid=aid, + + _headers=self.te_headers("delete_aws_monitoring_integration", error_status="404"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_delete_aws_monitoring_integration_error_429(self) -> None: + """Integration test for delete_aws_monitoring_integration error path (HTTP 429)""" + integration_id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569' + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(429) + ) as context: + self.api.delete_aws_monitoring_integration( + + integration_id=integration_id, + + aid=aid, + + _headers=self.te_headers("delete_aws_monitoring_integration", error_status="429"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_delete_aws_monitoring_integration_error_500(self) -> None: + """Integration test for delete_aws_monitoring_integration error path (HTTP 500)""" + integration_id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569' + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(500) + ) as context: + self.api.delete_aws_monitoring_integration( + + integration_id=integration_id, + + aid=aid, + + _headers=self.te_headers("delete_aws_monitoring_integration", error_status="500"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + + + def test_delete_azure_monitoring_integration_happy_path(self) -> None: + """Integration test for delete_azure_monitoring_integration success path""" + integration_id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569' + aid = '1234' + response = self.api.delete_azure_monitoring_integration_with_http_info( + + integration_id=integration_id, + + aid=aid, + + _headers=self.te_headers("delete_azure_monitoring_integration"), + ) + self.assertEqual(204, response.status_code) + self.assertIsNone(response.data) + + + def test_delete_azure_monitoring_integration_error_400(self) -> None: + """Integration test for delete_azure_monitoring_integration error path (HTTP 400)""" + integration_id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569' + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "errors" : [ { + "code" : "code", + "field" : "field", + "message" : "message" + }, { + "code" : "code", + "field" : "field", + "message" : "message" + } ], + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(400) + ) as context: + self.api.delete_azure_monitoring_integration( + + integration_id=integration_id, + + aid=aid, + + _headers=self.te_headers("delete_azure_monitoring_integration", error_status="400"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_delete_azure_monitoring_integration_error_401(self) -> None: + """Integration test for delete_azure_monitoring_integration error path (HTTP 401)""" + integration_id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569' + aid = '1234' + error_body_json = """ + { + "error_description" : "Invalid access token", + "error" : "invalid_token" + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(401) + ) as context: + self.api.delete_azure_monitoring_integration( + + integration_id=integration_id, + + aid=aid, + + _headers=self.te_headers("delete_azure_monitoring_integration", error_status="401"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_delete_azure_monitoring_integration_error_403(self) -> None: + """Integration test for delete_azure_monitoring_integration error path (HTTP 403)""" + integration_id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569' + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(403) + ) as context: + self.api.delete_azure_monitoring_integration( + + integration_id=integration_id, + + aid=aid, + + _headers=self.te_headers("delete_azure_monitoring_integration", error_status="403"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_delete_azure_monitoring_integration_error_404(self) -> None: + """Integration test for delete_azure_monitoring_integration error path (HTTP 404)""" + integration_id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569' + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(404) + ) as context: + self.api.delete_azure_monitoring_integration( + + integration_id=integration_id, + + aid=aid, + + _headers=self.te_headers("delete_azure_monitoring_integration", error_status="404"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_delete_azure_monitoring_integration_error_429(self) -> None: + """Integration test for delete_azure_monitoring_integration error path (HTTP 429)""" + integration_id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569' + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(429) + ) as context: + self.api.delete_azure_monitoring_integration( + + integration_id=integration_id, + + aid=aid, + + _headers=self.te_headers("delete_azure_monitoring_integration", error_status="429"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_delete_azure_monitoring_integration_error_500(self) -> None: + """Integration test for delete_azure_monitoring_integration error path (HTTP 500)""" + integration_id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569' + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(500) + ) as context: + self.api.delete_azure_monitoring_integration( + + integration_id=integration_id, + + aid=aid, + + _headers=self.te_headers("delete_azure_monitoring_integration", error_status="500"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + + + def test_get_all_aws_monitoring_integrations_happy_path(self) -> None: + """Integration test for get_all_aws_monitoring_integrations success path""" + aid = '1234' + response_body_json = """ + { + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "integrations" : [ { + "monitoringType" : "inventory-monitoring", + "_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" + } + }, + "roleArn" : "arn:aws:iam::01234567890:role/aws-monitoring-ro", + "name" : "integration name", + "externalId" : "37d8f861cffd34212b5a34466564da1f80b01a30", + "snsTopicsArns" : [ "arn:aws:sns:us-east-1:01234567890:SNS-Topic-US", "arn:aws:sns:eu-central-1:01234567890:SNS-Topic-EU" ], + "id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569" + }, { + "monitoringType" : "inventory-monitoring", + "_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" + } + }, + "roleArn" : "arn:aws:iam::01234567890:role/aws-monitoring-ro", + "name" : "integration name", + "externalId" : "37d8f861cffd34212b5a34466564da1f80b01a30", + "snsTopicsArns" : [ "arn:aws:sns:us-east-1:01234567890:SNS-Topic-US", "arn:aws:sns:eu-central-1:01234567890:SNS-Topic-EU" ], + "id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569" + } ] + } + """ + expected_response = json.loads(response_body_json) + response = self.api.get_all_aws_monitoring_integrations( + + aid=aid, + + _headers=self.te_headers("get_all_aws_monitoring_integrations"), + ) + assert_constructed_model_matches_example_json(response, expected_response) + + + def test_get_all_aws_monitoring_integrations_error_401(self) -> None: + """Integration test for get_all_aws_monitoring_integrations error path (HTTP 401)""" + aid = '1234' + error_body_json = """ + { + "error_description" : "Invalid access token", + "error" : "invalid_token" + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(401) + ) as context: + self.api.get_all_aws_monitoring_integrations( + + aid=aid, + + _headers=self.te_headers("get_all_aws_monitoring_integrations", error_status="401"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_get_all_aws_monitoring_integrations_error_403(self) -> None: + """Integration test for get_all_aws_monitoring_integrations error path (HTTP 403)""" + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(403) + ) as context: + self.api.get_all_aws_monitoring_integrations( + + aid=aid, + + _headers=self.te_headers("get_all_aws_monitoring_integrations", error_status="403"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_get_all_aws_monitoring_integrations_error_404(self) -> None: + """Integration test for get_all_aws_monitoring_integrations error path (HTTP 404)""" + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(404) + ) as context: + self.api.get_all_aws_monitoring_integrations( + + aid=aid, + + _headers=self.te_headers("get_all_aws_monitoring_integrations", error_status="404"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_get_all_aws_monitoring_integrations_error_429(self) -> None: + """Integration test for get_all_aws_monitoring_integrations error path (HTTP 429)""" + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(429) + ) as context: + self.api.get_all_aws_monitoring_integrations( + + aid=aid, + + _headers=self.te_headers("get_all_aws_monitoring_integrations", error_status="429"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_get_all_aws_monitoring_integrations_error_500(self) -> None: + """Integration test for get_all_aws_monitoring_integrations error path (HTTP 500)""" + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(500) + ) as context: + self.api.get_all_aws_monitoring_integrations( + + aid=aid, + + _headers=self.te_headers("get_all_aws_monitoring_integrations", error_status="500"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + + + def test_get_all_azure_monitoring_integrations_happy_path(self) -> None: + """Integration test for get_all_azure_monitoring_integrations success path""" + aid = '1234' + response_body_json = """ + { + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "integrations" : [ { + "password" : "********", + "monitoringType" : "azure-inventory-monitoring", + "_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" + } + }, + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44", + "serviceBusQueueUrl" : "https://your-service-bus-namespace.servicebus.windows.net/your-queue-name" + }, { + "password" : "********", + "monitoringType" : "azure-inventory-monitoring", + "_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" + } + }, + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44", + "serviceBusQueueUrl" : "https://your-service-bus-namespace.servicebus.windows.net/your-queue-name" + } ] + } + """ + expected_response = json.loads(response_body_json) + response = self.api.get_all_azure_monitoring_integrations( + + aid=aid, + + _headers=self.te_headers("get_all_azure_monitoring_integrations"), + ) + assert_constructed_model_matches_example_json(response, expected_response) + + + def test_get_all_azure_monitoring_integrations_error_401(self) -> None: + """Integration test for get_all_azure_monitoring_integrations error path (HTTP 401)""" + aid = '1234' + error_body_json = """ + { + "error_description" : "Invalid access token", + "error" : "invalid_token" + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(401) + ) as context: + self.api.get_all_azure_monitoring_integrations( + + aid=aid, + + _headers=self.te_headers("get_all_azure_monitoring_integrations", error_status="401"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_get_all_azure_monitoring_integrations_error_403(self) -> None: + """Integration test for get_all_azure_monitoring_integrations error path (HTTP 403)""" + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(403) + ) as context: + self.api.get_all_azure_monitoring_integrations( + + aid=aid, + + _headers=self.te_headers("get_all_azure_monitoring_integrations", error_status="403"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_get_all_azure_monitoring_integrations_error_404(self) -> None: + """Integration test for get_all_azure_monitoring_integrations error path (HTTP 404)""" + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(404) + ) as context: + self.api.get_all_azure_monitoring_integrations( + + aid=aid, + + _headers=self.te_headers("get_all_azure_monitoring_integrations", error_status="404"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_get_all_azure_monitoring_integrations_error_429(self) -> None: + """Integration test for get_all_azure_monitoring_integrations error path (HTTP 429)""" + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(429) + ) as context: + self.api.get_all_azure_monitoring_integrations( + + aid=aid, + + _headers=self.te_headers("get_all_azure_monitoring_integrations", error_status="429"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_get_all_azure_monitoring_integrations_error_500(self) -> None: + """Integration test for get_all_azure_monitoring_integrations error path (HTTP 500)""" + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(500) + ) as context: + self.api.get_all_azure_monitoring_integrations( + + aid=aid, + + _headers=self.te_headers("get_all_azure_monitoring_integrations", error_status="500"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + + + def test_get_aws_monitoring_integration_happy_path(self) -> None: + """Integration test for get_aws_monitoring_integration success path""" + integration_id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569' + aid = '1234' + response_body_json = """ + { + "monitoringType" : "inventory-monitoring", + "_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" + } + }, + "roleArn" : "arn:aws:iam::01234567890:role/aws-monitoring-ro", + "name" : "integration name", + "externalId" : "37d8f861cffd34212b5a34466564da1f80b01a30", + "snsTopicsArns" : [ "arn:aws:sns:us-east-1:01234567890:SNS-Topic-US", "arn:aws:sns:eu-central-1:01234567890:SNS-Topic-EU" ], + "id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569" + } + """ + expected_response = json.loads(response_body_json) + response = self.api.get_aws_monitoring_integration( + + integration_id=integration_id, + + aid=aid, + + _headers=self.te_headers("get_aws_monitoring_integration"), + ) + assert_constructed_model_matches_example_json(response, expected_response) + + + def test_get_aws_monitoring_integration_error_401(self) -> None: + """Integration test for get_aws_monitoring_integration error path (HTTP 401)""" + integration_id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569' + aid = '1234' + error_body_json = """ + { + "error_description" : "Invalid access token", + "error" : "invalid_token" + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(401) + ) as context: + self.api.get_aws_monitoring_integration( + + integration_id=integration_id, + + aid=aid, + + _headers=self.te_headers("get_aws_monitoring_integration", error_status="401"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_get_aws_monitoring_integration_error_403(self) -> None: + """Integration test for get_aws_monitoring_integration error path (HTTP 403)""" + integration_id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569' + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(403) + ) as context: + self.api.get_aws_monitoring_integration( + + integration_id=integration_id, + + aid=aid, + + _headers=self.te_headers("get_aws_monitoring_integration", error_status="403"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_get_aws_monitoring_integration_error_404(self) -> None: + """Integration test for get_aws_monitoring_integration error path (HTTP 404)""" + integration_id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569' + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(404) + ) as context: + self.api.get_aws_monitoring_integration( + + integration_id=integration_id, + + aid=aid, + + _headers=self.te_headers("get_aws_monitoring_integration", error_status="404"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_get_aws_monitoring_integration_error_429(self) -> None: + """Integration test for get_aws_monitoring_integration error path (HTTP 429)""" + integration_id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569' + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(429) + ) as context: + self.api.get_aws_monitoring_integration( + + integration_id=integration_id, + + aid=aid, + + _headers=self.te_headers("get_aws_monitoring_integration", error_status="429"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_get_aws_monitoring_integration_error_500(self) -> None: + """Integration test for get_aws_monitoring_integration error path (HTTP 500)""" + integration_id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569' + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(500) + ) as context: + self.api.get_aws_monitoring_integration( + + integration_id=integration_id, + + aid=aid, + + _headers=self.te_headers("get_aws_monitoring_integration", error_status="500"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + + + def test_get_azure_monitoring_integration_happy_path(self) -> None: + """Integration test for get_azure_monitoring_integration success path""" + integration_id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569' + aid = '1234' + response_body_json = """ + { + "password" : "********", + "monitoringType" : "azure-inventory-monitoring", + "_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" + } + }, + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44", + "serviceBusQueueUrl" : "https://your-service-bus-namespace.servicebus.windows.net/your-queue-name" + } + """ + expected_response = json.loads(response_body_json) + response = self.api.get_azure_monitoring_integration( + + integration_id=integration_id, + + aid=aid, + + _headers=self.te_headers("get_azure_monitoring_integration"), + ) + assert_constructed_model_matches_example_json(response, expected_response) + + + def test_get_azure_monitoring_integration_error_401(self) -> None: + """Integration test for get_azure_monitoring_integration error path (HTTP 401)""" + integration_id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569' + aid = '1234' + error_body_json = """ + { + "error_description" : "Invalid access token", + "error" : "invalid_token" + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(401) + ) as context: + self.api.get_azure_monitoring_integration( + + integration_id=integration_id, + + aid=aid, + + _headers=self.te_headers("get_azure_monitoring_integration", error_status="401"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_get_azure_monitoring_integration_error_403(self) -> None: + """Integration test for get_azure_monitoring_integration error path (HTTP 403)""" + integration_id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569' + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(403) + ) as context: + self.api.get_azure_monitoring_integration( + + integration_id=integration_id, + + aid=aid, + + _headers=self.te_headers("get_azure_monitoring_integration", error_status="403"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_get_azure_monitoring_integration_error_404(self) -> None: + """Integration test for get_azure_monitoring_integration error path (HTTP 404)""" + integration_id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569' + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(404) + ) as context: + self.api.get_azure_monitoring_integration( + + integration_id=integration_id, + + aid=aid, + + _headers=self.te_headers("get_azure_monitoring_integration", error_status="404"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_get_azure_monitoring_integration_error_429(self) -> None: + """Integration test for get_azure_monitoring_integration error path (HTTP 429)""" + integration_id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569' + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(429) + ) as context: + self.api.get_azure_monitoring_integration( + + integration_id=integration_id, + + aid=aid, + + _headers=self.te_headers("get_azure_monitoring_integration", error_status="429"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_get_azure_monitoring_integration_error_500(self) -> None: + """Integration test for get_azure_monitoring_integration error path (HTTP 500)""" + integration_id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569' + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(500) + ) as context: + self.api.get_azure_monitoring_integration( + + integration_id=integration_id, + + aid=aid, + + _headers=self.te_headers("get_azure_monitoring_integration", error_status="500"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + + + def test_update_azure_flow_logs_monitoring_integration_happy_path(self) -> None: + """Integration test for update_azure_flow_logs_monitoring_integration success path""" + request_body_json = """ + + { + "password" : "p9z4Q~U7LkdX1yZr3TcB6fJqG8aM0sDeT5R9hVnKw", + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44", + "serviceBusQueueUrl" : "https://your-service-bus-namespace.servicebus.windows.net/your-queue-name" + } + + """ + azure_flow_logs_integration_request = thousandeyes_sdk.cloud_insights_integrations.models.AzureFlowLogsIntegrationRequest.from_json(request_body_json) + integration_id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569' + aid = '1234' + response_body_json = """ + { + "password" : "********", + "monitoringType" : "azure-inventory-monitoring", + "_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" + } + }, + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44", + "serviceBusQueueUrl" : "https://your-service-bus-namespace.servicebus.windows.net/your-queue-name" + } + """ + expected_response = json.loads(response_body_json) + response = self.api.update_azure_flow_logs_monitoring_integration( + + integration_id=integration_id, + + azure_flow_logs_integration_request=azure_flow_logs_integration_request, + + aid=aid, + + _headers=self.te_headers("update_azure_flow_logs_monitoring_integration"), + ) + assert_constructed_model_matches_example_json(response, expected_response) + + + def test_update_azure_flow_logs_monitoring_integration_error_400(self) -> None: + """Integration test for update_azure_flow_logs_monitoring_integration error path (HTTP 400)""" + request_body_json = """ + + { + "password" : "p9z4Q~U7LkdX1yZr3TcB6fJqG8aM0sDeT5R9hVnKw", + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44", + "serviceBusQueueUrl" : "https://your-service-bus-namespace.servicebus.windows.net/your-queue-name" + } + + """ + azure_flow_logs_integration_request = thousandeyes_sdk.cloud_insights_integrations.models.AzureFlowLogsIntegrationRequest.from_json(request_body_json) + integration_id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569' + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "errors" : [ { + "code" : "code", + "field" : "field", + "message" : "message" + }, { + "code" : "code", + "field" : "field", + "message" : "message" + } ], + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(400) + ) as context: + self.api.update_azure_flow_logs_monitoring_integration( + + integration_id=integration_id, + + azure_flow_logs_integration_request=azure_flow_logs_integration_request, + + aid=aid, + + _headers=self.te_headers("update_azure_flow_logs_monitoring_integration", error_status="400"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_update_azure_flow_logs_monitoring_integration_error_401(self) -> None: + """Integration test for update_azure_flow_logs_monitoring_integration error path (HTTP 401)""" + request_body_json = """ + + { + "password" : "p9z4Q~U7LkdX1yZr3TcB6fJqG8aM0sDeT5R9hVnKw", + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44", + "serviceBusQueueUrl" : "https://your-service-bus-namespace.servicebus.windows.net/your-queue-name" + } + + """ + azure_flow_logs_integration_request = thousandeyes_sdk.cloud_insights_integrations.models.AzureFlowLogsIntegrationRequest.from_json(request_body_json) + integration_id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569' + aid = '1234' + error_body_json = """ + { + "error_description" : "Invalid access token", + "error" : "invalid_token" + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(401) + ) as context: + self.api.update_azure_flow_logs_monitoring_integration( + + integration_id=integration_id, + + azure_flow_logs_integration_request=azure_flow_logs_integration_request, + + aid=aid, + + _headers=self.te_headers("update_azure_flow_logs_monitoring_integration", error_status="401"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_update_azure_flow_logs_monitoring_integration_error_403(self) -> None: + """Integration test for update_azure_flow_logs_monitoring_integration error path (HTTP 403)""" + request_body_json = """ + + { + "password" : "p9z4Q~U7LkdX1yZr3TcB6fJqG8aM0sDeT5R9hVnKw", + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44", + "serviceBusQueueUrl" : "https://your-service-bus-namespace.servicebus.windows.net/your-queue-name" + } + + """ + azure_flow_logs_integration_request = thousandeyes_sdk.cloud_insights_integrations.models.AzureFlowLogsIntegrationRequest.from_json(request_body_json) + integration_id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569' + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(403) + ) as context: + self.api.update_azure_flow_logs_monitoring_integration( + + integration_id=integration_id, + + azure_flow_logs_integration_request=azure_flow_logs_integration_request, + + aid=aid, + + _headers=self.te_headers("update_azure_flow_logs_monitoring_integration", error_status="403"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_update_azure_flow_logs_monitoring_integration_error_404(self) -> None: + """Integration test for update_azure_flow_logs_monitoring_integration error path (HTTP 404)""" + request_body_json = """ + + { + "password" : "p9z4Q~U7LkdX1yZr3TcB6fJqG8aM0sDeT5R9hVnKw", + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44", + "serviceBusQueueUrl" : "https://your-service-bus-namespace.servicebus.windows.net/your-queue-name" + } + + """ + azure_flow_logs_integration_request = thousandeyes_sdk.cloud_insights_integrations.models.AzureFlowLogsIntegrationRequest.from_json(request_body_json) + integration_id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569' + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(404) + ) as context: + self.api.update_azure_flow_logs_monitoring_integration( + + integration_id=integration_id, + + azure_flow_logs_integration_request=azure_flow_logs_integration_request, + + aid=aid, + + _headers=self.te_headers("update_azure_flow_logs_monitoring_integration", error_status="404"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_update_azure_flow_logs_monitoring_integration_error_429(self) -> None: + """Integration test for update_azure_flow_logs_monitoring_integration error path (HTTP 429)""" + request_body_json = """ + + { + "password" : "p9z4Q~U7LkdX1yZr3TcB6fJqG8aM0sDeT5R9hVnKw", + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44", + "serviceBusQueueUrl" : "https://your-service-bus-namespace.servicebus.windows.net/your-queue-name" + } + + """ + azure_flow_logs_integration_request = thousandeyes_sdk.cloud_insights_integrations.models.AzureFlowLogsIntegrationRequest.from_json(request_body_json) + integration_id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569' + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(429) + ) as context: + self.api.update_azure_flow_logs_monitoring_integration( + + integration_id=integration_id, + + azure_flow_logs_integration_request=azure_flow_logs_integration_request, + + aid=aid, + + _headers=self.te_headers("update_azure_flow_logs_monitoring_integration", error_status="429"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_update_azure_flow_logs_monitoring_integration_error_500(self) -> None: + """Integration test for update_azure_flow_logs_monitoring_integration error path (HTTP 500)""" + request_body_json = """ + + { + "password" : "p9z4Q~U7LkdX1yZr3TcB6fJqG8aM0sDeT5R9hVnKw", + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44", + "serviceBusQueueUrl" : "https://your-service-bus-namespace.servicebus.windows.net/your-queue-name" + } + + """ + azure_flow_logs_integration_request = thousandeyes_sdk.cloud_insights_integrations.models.AzureFlowLogsIntegrationRequest.from_json(request_body_json) + integration_id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569' + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(500) + ) as context: + self.api.update_azure_flow_logs_monitoring_integration( + + integration_id=integration_id, + + azure_flow_logs_integration_request=azure_flow_logs_integration_request, + + aid=aid, + + _headers=self.te_headers("update_azure_flow_logs_monitoring_integration", error_status="500"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + + + def test_update_azure_inventory_monitoring_integration_happy_path(self) -> None: + """Integration test for update_azure_inventory_monitoring_integration success path""" + request_body_json = """ + + { + "password" : "p9z4Q~U7LkdX1yZr3TcB6fJqG8aM0sDeT5R9hVnKw", + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44" + } + + """ + azure_inventory_integration_request = thousandeyes_sdk.cloud_insights_integrations.models.AzureInventoryIntegrationRequest.from_json(request_body_json) + integration_id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569' + aid = '1234' + response_body_json = """ + { + "password" : "********", + "monitoringType" : "azure-inventory-monitoring", + "_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" + } + }, + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44", + "serviceBusQueueUrl" : "https://your-service-bus-namespace.servicebus.windows.net/your-queue-name" + } + """ + expected_response = json.loads(response_body_json) + response = self.api.update_azure_inventory_monitoring_integration( + + integration_id=integration_id, + + azure_inventory_integration_request=azure_inventory_integration_request, + + aid=aid, + + _headers=self.te_headers("update_azure_inventory_monitoring_integration"), + ) + assert_constructed_model_matches_example_json(response, expected_response) + + + def test_update_azure_inventory_monitoring_integration_error_400(self) -> None: + """Integration test for update_azure_inventory_monitoring_integration error path (HTTP 400)""" + request_body_json = """ + + { + "password" : "p9z4Q~U7LkdX1yZr3TcB6fJqG8aM0sDeT5R9hVnKw", + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44" + } + + """ + azure_inventory_integration_request = thousandeyes_sdk.cloud_insights_integrations.models.AzureInventoryIntegrationRequest.from_json(request_body_json) + integration_id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569' + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "errors" : [ { + "code" : "code", + "field" : "field", + "message" : "message" + }, { + "code" : "code", + "field" : "field", + "message" : "message" + } ], + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(400) + ) as context: + self.api.update_azure_inventory_monitoring_integration( + + integration_id=integration_id, + + azure_inventory_integration_request=azure_inventory_integration_request, + + aid=aid, + + _headers=self.te_headers("update_azure_inventory_monitoring_integration", error_status="400"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_update_azure_inventory_monitoring_integration_error_401(self) -> None: + """Integration test for update_azure_inventory_monitoring_integration error path (HTTP 401)""" + request_body_json = """ + + { + "password" : "p9z4Q~U7LkdX1yZr3TcB6fJqG8aM0sDeT5R9hVnKw", + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44" + } + + """ + azure_inventory_integration_request = thousandeyes_sdk.cloud_insights_integrations.models.AzureInventoryIntegrationRequest.from_json(request_body_json) + integration_id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569' + aid = '1234' + error_body_json = """ + { + "error_description" : "Invalid access token", + "error" : "invalid_token" + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(401) + ) as context: + self.api.update_azure_inventory_monitoring_integration( + + integration_id=integration_id, + + azure_inventory_integration_request=azure_inventory_integration_request, + + aid=aid, + + _headers=self.te_headers("update_azure_inventory_monitoring_integration", error_status="401"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_update_azure_inventory_monitoring_integration_error_403(self) -> None: + """Integration test for update_azure_inventory_monitoring_integration error path (HTTP 403)""" + request_body_json = """ + + { + "password" : "p9z4Q~U7LkdX1yZr3TcB6fJqG8aM0sDeT5R9hVnKw", + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44" + } + + """ + azure_inventory_integration_request = thousandeyes_sdk.cloud_insights_integrations.models.AzureInventoryIntegrationRequest.from_json(request_body_json) + integration_id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569' + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(403) + ) as context: + self.api.update_azure_inventory_monitoring_integration( + + integration_id=integration_id, + + azure_inventory_integration_request=azure_inventory_integration_request, + + aid=aid, + + _headers=self.te_headers("update_azure_inventory_monitoring_integration", error_status="403"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_update_azure_inventory_monitoring_integration_error_404(self) -> None: + """Integration test for update_azure_inventory_monitoring_integration error path (HTTP 404)""" + request_body_json = """ + + { + "password" : "p9z4Q~U7LkdX1yZr3TcB6fJqG8aM0sDeT5R9hVnKw", + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44" + } + + """ + azure_inventory_integration_request = thousandeyes_sdk.cloud_insights_integrations.models.AzureInventoryIntegrationRequest.from_json(request_body_json) + integration_id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569' + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(404) + ) as context: + self.api.update_azure_inventory_monitoring_integration( + + integration_id=integration_id, + + azure_inventory_integration_request=azure_inventory_integration_request, + + aid=aid, + + _headers=self.te_headers("update_azure_inventory_monitoring_integration", error_status="404"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_update_azure_inventory_monitoring_integration_error_429(self) -> None: + """Integration test for update_azure_inventory_monitoring_integration error path (HTTP 429)""" + request_body_json = """ + + { + "password" : "p9z4Q~U7LkdX1yZr3TcB6fJqG8aM0sDeT5R9hVnKw", + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44" + } + + """ + azure_inventory_integration_request = thousandeyes_sdk.cloud_insights_integrations.models.AzureInventoryIntegrationRequest.from_json(request_body_json) + integration_id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569' + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(429) + ) as context: + self.api.update_azure_inventory_monitoring_integration( + + integration_id=integration_id, + + azure_inventory_integration_request=azure_inventory_integration_request, + + aid=aid, + + _headers=self.te_headers("update_azure_inventory_monitoring_integration", error_status="429"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_update_azure_inventory_monitoring_integration_error_500(self) -> None: + """Integration test for update_azure_inventory_monitoring_integration error path (HTTP 500)""" + request_body_json = """ + + { + "password" : "p9z4Q~U7LkdX1yZr3TcB6fJqG8aM0sDeT5R9hVnKw", + "appId" : "2f9b2a1c-6d87-4c92-9d51-37efc93c0a4f", + "name" : "integration name", + "azureTenantId" : "e3a72c9b-42b1-4e0b-9b9f-7f6a3b2a1c44" + } + + """ + azure_inventory_integration_request = thousandeyes_sdk.cloud_insights_integrations.models.AzureInventoryIntegrationRequest.from_json(request_body_json) + integration_id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569' + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(500) + ) as context: + self.api.update_azure_inventory_monitoring_integration( + + integration_id=integration_id, + + azure_inventory_integration_request=azure_inventory_integration_request, + + aid=aid, + + _headers=self.te_headers("update_azure_inventory_monitoring_integration", error_status="500"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + + + + +if __name__ == '__main__': + unittest.main() diff --git a/thousandeyes-sdk-cloud-insights-integrations/test/test_utils.py b/thousandeyes-sdk-cloud-insights-integrations/test/test_utils.py new file mode 100644 index 000000000..37913f626 --- /dev/null +++ b/thousandeyes-sdk-cloud-insights-integrations/test/test_utils.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +import json +import unittest +from typing import Any + +from pydantic import BaseModel + + +def _project_onto_constructed(expected: Any, constructed: Any) -> Any: + """Keep only example fields that appear in the constructed model output.""" + if isinstance(constructed, dict): + if not isinstance(expected, dict): + return expected + return { + key: _project_onto_constructed(expected.get(key), value) + for key, value in constructed.items() + } + if isinstance(constructed, list): + if not isinstance(expected, list): + return expected + return [ + _project_onto_constructed(expected[index], value) + for index, value in enumerate(constructed) + ] + return expected + + +def assert_constructed_model_matches_example_json(model: BaseModel, loaded_json: dict): + test_case = unittest.TestCase() + test_case.maxDiff = None + test_case.assertIsNotNone(model) + constructed_json = json.loads(model.to_json()) + projected_loaded_json = _project_onto_constructed(loaded_json, constructed_json) + sorted_loaded_json = json.dumps(projected_loaded_json, sort_keys=True) + sorted_constructed_json = json.dumps(constructed_json, sort_keys=True) + test_case.assertEqual(sorted_loaded_json, sorted_constructed_json) diff --git a/thousandeyes-sdk-connectors/README.md b/thousandeyes-sdk-connectors/README.md index bfc7ad614..286968415 100644 --- a/thousandeyes-sdk-connectors/README.md +++ b/thousandeyes-sdk-connectors/README.md @@ -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.103 +- API version: 7.0.104 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-connectors/test/test_credential_vault_operations_api.py b/thousandeyes-sdk-connectors/test/test_credential_vault_operations_api.py index 98599fb79..96cf184fb 100644 --- a/thousandeyes-sdk-connectors/test/test_credential_vault_operations_api.py +++ b/thousandeyes-sdk-connectors/test/test_credential_vault_operations_api.py @@ -64,6 +64,7 @@ def test_create_credential_vault_operation_models_validation(self) -> None: request_from_json = thousandeyes_sdk.connectors.models.CredentialVaultOperation.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "_links" : { @@ -96,14 +97,17 @@ def test_create_credential_vault_operation_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.connectors.models.CredentialVaultOperation.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_delete_credential_vault_operation_models_validation(self) -> None: """Test case for delete_credential_vault_operation request and response models""" + def test_get_credential_vault_operation_models_validation(self) -> None: """Test case for get_credential_vault_operation request and response models""" + response_body_json = """ { "_links" : { @@ -136,10 +140,12 @@ def test_get_credential_vault_operation_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.connectors.models.CredentialVaultOperation.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_credential_vault_operations_models_validation(self) -> None: """Test case for get_credential_vault_operations request and response models""" + response_body_json = """ { "_links" : { @@ -212,6 +218,7 @@ def test_get_credential_vault_operations_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.connectors.models.CredentialVaultOperations.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_update_credential_vault_operation_models_validation(self) -> None: """Test case for update_credential_vault_operation request and response models""" @@ -249,6 +256,7 @@ def test_update_credential_vault_operation_models_validation(self) -> None: request_from_json = thousandeyes_sdk.connectors.models.CredentialVaultOperation.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "_links" : { @@ -281,6 +289,7 @@ def test_update_credential_vault_operation_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.connectors.models.CredentialVaultOperation.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-connectors/test/test_cyber_ark_conjur_connectors_api.py b/thousandeyes-sdk-connectors/test/test_cyber_ark_conjur_connectors_api.py index 2692aca89..ca7c66163 100644 --- a/thousandeyes-sdk-connectors/test/test_cyber_ark_conjur_connectors_api.py +++ b/thousandeyes-sdk-connectors/test/test_cyber_ark_conjur_connectors_api.py @@ -62,6 +62,7 @@ def test_create_conjur_connector_models_validation(self) -> None: request_from_json = thousandeyes_sdk.connectors.models.ConjurConnector.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "lastModifiedDate" : 1770293655756, @@ -92,14 +93,17 @@ def test_create_conjur_connector_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.connectors.models.ConjurConnector.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_delete_conjur_connector_models_validation(self) -> None: """Test case for delete_conjur_connector request and response models""" + def test_get_conjur_connector_models_validation(self) -> None: """Test case for get_conjur_connector request and response models""" + response_body_json = """ { "lastModifiedDate" : 1770293655756, @@ -130,10 +134,12 @@ def test_get_conjur_connector_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.connectors.models.ConjurConnector.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_conjur_connector_operations_models_validation(self) -> None: """Test case for get_conjur_connector_operations request and response models""" + response_body_json = """ { "_links" : { @@ -154,10 +160,12 @@ def test_get_conjur_connector_operations_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.connectors.models.Assignments.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_conjur_connectors_models_validation(self) -> None: """Test case for get_conjur_connectors request and response models""" + response_body_json = """ { "_links" : { @@ -226,6 +234,7 @@ def test_get_conjur_connectors_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.connectors.models.ConjurConnectors.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_set_conjur_connector_operations_models_validation(self) -> None: """Test case for set_conjur_connector_operations request and response models""" @@ -237,6 +246,7 @@ def test_set_conjur_connector_operations_models_validation(self) -> None: request_from_json = json.loads(request_body_json) self.assertEqual(request_from_json, request_loaded_json) + response_body_json = """ { "_links" : { @@ -257,6 +267,7 @@ def test_set_conjur_connector_operations_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.connectors.models.Assignments.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_update_conjur_connector_models_validation(self) -> None: """Test case for update_conjur_connector request and response models""" @@ -292,6 +303,7 @@ def test_update_conjur_connector_models_validation(self) -> None: request_from_json = thousandeyes_sdk.connectors.models.ConjurConnector.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "lastModifiedDate" : 1770293655756, @@ -322,6 +334,7 @@ def test_update_conjur_connector_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.connectors.models.ConjurConnector.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-connectors/test/test_generic_connectors_api.py b/thousandeyes-sdk-connectors/test/test_generic_connectors_api.py index 3f46e0cce..5f4bf1205 100644 --- a/thousandeyes-sdk-connectors/test/test_generic_connectors_api.py +++ b/thousandeyes-sdk-connectors/test/test_generic_connectors_api.py @@ -68,6 +68,7 @@ def test_create_generic_connector_models_validation(self) -> None: request_from_json = thousandeyes_sdk.connectors.models.GenericConnector.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "headers" : [ { @@ -104,14 +105,17 @@ def test_create_generic_connector_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.connectors.models.GenericConnector.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_delete_generic_connector_models_validation(self) -> None: """Test case for delete_generic_connector request and response models""" + def test_get_generic_connector_models_validation(self) -> None: """Test case for get_generic_connector request and response models""" + response_body_json = """ { "headers" : [ { @@ -148,10 +152,12 @@ def test_get_generic_connector_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.connectors.models.GenericConnector.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_generic_connectors_models_validation(self) -> None: """Test case for get_generic_connectors request and response models""" + response_body_json = """ { "_links" : { @@ -232,10 +238,12 @@ def test_get_generic_connectors_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.connectors.models.GenericConnectors.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_list_generic_connector_operations_models_validation(self) -> None: """Test case for list_generic_connector_operations request and response models""" + response_body_json = """ { "_links" : { @@ -256,6 +264,7 @@ def test_list_generic_connector_operations_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.connectors.models.Assignments.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_set_generic_connector_operations_models_validation(self) -> None: """Test case for set_generic_connector_operations request and response models""" @@ -267,6 +276,7 @@ def test_set_generic_connector_operations_models_validation(self) -> None: request_from_json = json.loads(request_body_json) self.assertEqual(request_from_json, request_loaded_json) + response_body_json = """ { "_links" : { @@ -287,6 +297,7 @@ def test_set_generic_connector_operations_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.connectors.models.Assignments.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_update_generic_connector_models_validation(self) -> None: """Test case for update_generic_connector request and response models""" @@ -328,6 +339,7 @@ def test_update_generic_connector_models_validation(self) -> None: request_from_json = thousandeyes_sdk.connectors.models.GenericConnector.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "headers" : [ { @@ -364,6 +376,7 @@ def test_update_generic_connector_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.connectors.models.GenericConnector.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-connectors/test/test_operation_connectors_api.py b/thousandeyes-sdk-connectors/test/test_operation_connectors_api.py index 77395a5f6..b15ce803d 100644 --- a/thousandeyes-sdk-connectors/test/test_operation_connectors_api.py +++ b/thousandeyes-sdk-connectors/test/test_operation_connectors_api.py @@ -31,6 +31,7 @@ def tearDown(self) -> None: def test_get_operation_connectors_models_validation(self) -> None: """Test case for get_operation_connectors request and response models""" + response_body_json = """ { "_links" : { @@ -51,6 +52,7 @@ def test_get_operation_connectors_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.connectors.models.Assignments.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_set_operation_connectors_models_validation(self) -> None: """Test case for set_operation_connectors request and response models""" @@ -62,6 +64,7 @@ def test_set_operation_connectors_models_validation(self) -> None: request_from_json = json.loads(request_body_json) self.assertEqual(request_from_json, request_loaded_json) + response_body_json = """ { "_links" : { @@ -82,6 +85,7 @@ def test_set_operation_connectors_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.connectors.models.Assignments.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-connectors/test/test_panorama_connectors_api.py b/thousandeyes-sdk-connectors/test/test_panorama_connectors_api.py index 7eeb02a99..aaf499614 100644 --- a/thousandeyes-sdk-connectors/test/test_panorama_connectors_api.py +++ b/thousandeyes-sdk-connectors/test/test_panorama_connectors_api.py @@ -60,6 +60,7 @@ def test_create_panorama_connector_models_validation(self) -> None: request_from_json = thousandeyes_sdk.connectors.models.PanoramaConnector.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "lastModifiedDate" : 1770293655756, @@ -88,14 +89,17 @@ def test_create_panorama_connector_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.connectors.models.PanoramaConnector.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_delete_panorama_connector_models_validation(self) -> None: """Test case for delete_panorama_connector request and response models""" + def test_get_panorama_connector_models_validation(self) -> None: """Test case for get_panorama_connector request and response models""" + response_body_json = """ { "lastModifiedDate" : 1770293655756, @@ -124,10 +128,12 @@ def test_get_panorama_connector_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.connectors.models.PanoramaConnector.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_panorama_connector_operations_models_validation(self) -> None: """Test case for get_panorama_connector_operations request and response models""" + response_body_json = """ { "_links" : { @@ -148,10 +154,12 @@ def test_get_panorama_connector_operations_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.connectors.models.Assignments.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_panorama_connectors_models_validation(self) -> None: """Test case for get_panorama_connectors request and response models""" + response_body_json = """ { "_links" : { @@ -216,6 +224,7 @@ def test_get_panorama_connectors_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.connectors.models.PanoramaConnectors.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_set_panorama_connector_operations_models_validation(self) -> None: """Test case for set_panorama_connector_operations request and response models""" @@ -227,6 +236,7 @@ def test_set_panorama_connector_operations_models_validation(self) -> None: request_from_json = json.loads(request_body_json) self.assertEqual(request_from_json, request_loaded_json) + response_body_json = """ { "_links" : { @@ -247,6 +257,7 @@ def test_set_panorama_connector_operations_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.connectors.models.Assignments.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_update_panorama_connector_models_validation(self) -> None: """Test case for update_panorama_connector request and response models""" @@ -280,6 +291,7 @@ def test_update_panorama_connector_models_validation(self) -> None: request_from_json = thousandeyes_sdk.connectors.models.PanoramaConnector.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "lastModifiedDate" : 1770293655756, @@ -308,6 +320,7 @@ def test_update_panorama_connector_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.connectors.models.PanoramaConnector.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-connectors/test/test_webhook_operations_api.py b/thousandeyes-sdk-connectors/test/test_webhook_operations_api.py index 3cdc7e1a5..78406d1a3 100644 --- a/thousandeyes-sdk-connectors/test/test_webhook_operations_api.py +++ b/thousandeyes-sdk-connectors/test/test_webhook_operations_api.py @@ -67,6 +67,7 @@ def test_create_webhook_operation_models_validation(self) -> None: request_from_json = thousandeyes_sdk.connectors.models.WebhookOperation.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "path" : "/custom/path", @@ -102,14 +103,17 @@ def test_create_webhook_operation_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.connectors.models.WebhookOperation.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_delete_webhook_operation_models_validation(self) -> None: """Test case for delete_webhook_operation request and response models""" + def test_get_webhook_operation_models_validation(self) -> None: """Test case for get_webhook_operation request and response models""" + response_body_json = """ { "path" : "/custom/path", @@ -145,10 +149,12 @@ def test_get_webhook_operation_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.connectors.models.WebhookOperation.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_webhook_operations_models_validation(self) -> None: """Test case for get_webhook_operations request and response models""" + response_body_json = """ { "_links" : { @@ -227,6 +233,7 @@ def test_get_webhook_operations_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.connectors.models.WebhookOperations.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_update_webhook_operation_models_validation(self) -> None: """Test case for update_webhook_operation request and response models""" @@ -267,6 +274,7 @@ def test_update_webhook_operation_models_validation(self) -> None: request_from_json = thousandeyes_sdk.connectors.models.WebhookOperation.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "path" : "/custom/path", @@ -302,6 +310,7 @@ def test_update_webhook_operation_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.connectors.models.WebhookOperation.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-credentials/README.md b/thousandeyes-sdk-credentials/README.md index e958785f2..b9847e162 100644 --- a/thousandeyes-sdk-credentials/README.md +++ b/thousandeyes-sdk-credentials/README.md @@ -13,7 +13,7 @@ For more information about credentials, see [Working With Secure Credentials](ht This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.103 +- API version: 7.0.104 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-credentials/test/test_credentials_api.py b/thousandeyes-sdk-credentials/test/test_credentials_api.py index 409cd1a3c..a1cc369cd 100644 --- a/thousandeyes-sdk-credentials/test/test_credentials_api.py +++ b/thousandeyes-sdk-credentials/test/test_credentials_api.py @@ -41,6 +41,7 @@ def test_create_credential_models_validation(self) -> None: request_from_json = thousandeyes_sdk.credentials.models.CredentialRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "_links" : { @@ -62,14 +63,17 @@ def test_create_credential_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.credentials.models.CredentialWithoutValue.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_delete_credential_models_validation(self) -> None: """Test case for delete_credential request and response models""" + def test_get_credential_models_validation(self) -> None: """Test case for get_credential request and response models""" + response_body_json = """ { "_links" : { @@ -92,10 +96,12 @@ def test_get_credential_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.credentials.models.Credential.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_credentials_models_validation(self) -> None: """Test case for get_credentials request and response models""" + response_body_json = """ { "credentials" : [ { @@ -148,6 +154,7 @@ def test_get_credentials_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.credentials.models.Credentials.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_update_credential_models_validation(self) -> None: """Test case for update_credential request and response models""" @@ -162,6 +169,7 @@ def test_update_credential_models_validation(self) -> None: request_from_json = thousandeyes_sdk.credentials.models.CredentialRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "_links" : { @@ -183,6 +191,7 @@ def test_update_credential_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.credentials.models.CredentialWithoutValue.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-dashboards/README.md b/thousandeyes-sdk-dashboards/README.md index 1407e9b13..e97fbf7ed 100644 --- a/thousandeyes-sdk-dashboards/README.md +++ b/thousandeyes-sdk-dashboards/README.md @@ -3,7 +3,7 @@ Manage ThousandEyes Dashboards. This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.103 +- API version: 7.0.104 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-dashboards/test/test_dashboard_snapshots_api.py b/thousandeyes-sdk-dashboards/test/test_dashboard_snapshots_api.py index 8115e8d6c..f44e7029d 100644 --- a/thousandeyes-sdk-dashboards/test/test_dashboard_snapshots_api.py +++ b/thousandeyes-sdk-dashboards/test/test_dashboard_snapshots_api.py @@ -46,6 +46,7 @@ def test_create_dashboard_snapshot_models_validation(self) -> None: request_from_json = thousandeyes_sdk.dashboards.models.GenerateDashboardSnapshotRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "snapshotId" : "d28bb71f-5a47-4783-8f12-d4b115e61b0c", @@ -66,14 +67,17 @@ def test_create_dashboard_snapshot_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.dashboards.models.DashboardSnapshotResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_delete_dashboard_snapshot_models_validation(self) -> None: """Test case for delete_dashboard_snapshot request and response models""" + def test_get_dashboard_snapshot_models_validation(self) -> None: """Test case for get_dashboard_snapshot request and response models""" + response_body_json = """ { "snapshotId" : "d28bb71f-5a47-4783-8f12-d4b115e61b0c", @@ -370,10 +374,12 @@ def test_get_dashboard_snapshot_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.dashboards.models.ApiDashboardSnapshot.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_dashboard_snapshot_widget_data_models_validation(self) -> None: """Test case for get_dashboard_snapshot_widget_data request and response models""" + response_body_json = """ { "groupLabels" : [ { @@ -810,10 +816,12 @@ def test_get_dashboard_snapshot_widget_data_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.dashboards.models.ApiWidgetDataSnapshotResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_dashboard_snapshots_models_validation(self) -> None: """Test case for get_dashboard_snapshots request and response models""" + response_body_json = """ { "pages" : { @@ -1437,6 +1445,7 @@ def test_get_dashboard_snapshots_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.dashboards.models.DashboardSnapshotsPage.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_update_dashboard_snapshot_expiration_date_models_validation(self) -> None: """Test case for update_dashboard_snapshot_expiration_date request and response models""" @@ -1451,6 +1460,7 @@ def test_update_dashboard_snapshot_expiration_date_models_validation(self) -> No request_from_json = thousandeyes_sdk.dashboards.models.UpdateSnapshotExpirationDateApiRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-dashboards/test/test_dashboards_api.py b/thousandeyes-sdk-dashboards/test/test_dashboards_api.py index 6bd881a1c..cde73d0c5 100644 --- a/thousandeyes-sdk-dashboards/test/test_dashboards_api.py +++ b/thousandeyes-sdk-dashboards/test/test_dashboards_api.py @@ -71,6 +71,7 @@ def test_clone_dashboard_models_validation(self) -> None: request_from_json = thousandeyes_sdk.dashboards.models.CloneDashboardRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "isMigratedReport" : false, @@ -236,6 +237,7 @@ def test_clone_dashboard_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.dashboards.models.Dashboard.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_create_dashboard_models_validation(self) -> None: """Test case for create_dashboard request and response models""" @@ -406,6 +408,7 @@ def test_create_dashboard_models_validation(self) -> None: request_from_json = thousandeyes_sdk.dashboards.models.Dashboard.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "isMigratedReport" : false, @@ -571,18 +574,22 @@ def test_create_dashboard_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.dashboards.models.Dashboard.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_delete_dashboard_models_validation(self) -> None: """Test case for delete_dashboard request and response models""" + def test_delete_dashboard_schedule_models_validation(self) -> None: """Test case for delete_dashboard_schedule request and response models""" + def test_get_dashboard_models_validation(self) -> None: """Test case for get_dashboard request and response models""" + response_body_json = """ { "isMigratedReport" : false, @@ -759,10 +766,12 @@ def test_get_dashboard_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.dashboards.models.ApiDashboard.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_dashboard_widget_data_models_validation(self) -> None: """Test case for get_dashboard_widget_data request and response models""" + response_body_json = """ { "groupLabels" : [ { @@ -1219,10 +1228,12 @@ def test_get_dashboard_widget_data_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.dashboards.models.ApiWidgetDataResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_dashboards_models_validation(self) -> None: """Test case for get_dashboards request and response models""" + response_body_json = """ [ { "isMigratedReport" : false, @@ -1572,10 +1583,12 @@ def test_get_dashboards_models_validation(self) -> None: for index, element in enumerate(response_from_dict): self.assertIsNotNone(element) assert_constructed_model_matches_example_json(element, response_loaded_json[index]) + def test_get_individual_card_data_models_validation(self) -> None: """Test case for get_individual_card_data request and response models""" + response_body_json = """ { "numberOfDataPoints" : 24192, @@ -1624,10 +1637,12 @@ def test_get_individual_card_data_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.dashboards.models.ApiNumbersCardData.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_individual_column_data_models_validation(self) -> None: """Test case for get_individual_column_data request and response models""" + response_body_json = """ { "_links" : { @@ -1692,6 +1707,7 @@ def test_get_individual_column_data_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.dashboards.models.ApiMultiMetricColumnData.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_update_dashboard_models_validation(self) -> None: """Test case for update_dashboard request and response models""" @@ -1862,6 +1878,7 @@ def test_update_dashboard_models_validation(self) -> None: request_from_json = thousandeyes_sdk.dashboards.models.Dashboard.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "isMigratedReport" : false, @@ -2027,6 +2044,7 @@ def test_update_dashboard_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.dashboards.models.Dashboard.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_update_dashboard_schedule_models_validation(self) -> None: """Test case for update_dashboard_schedule request and response models""" @@ -2061,6 +2079,7 @@ def test_update_dashboard_schedule_models_validation(self) -> None: request_from_json = thousandeyes_sdk.dashboards.models.DashboardScheduleRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "isMigratedReport" : false, @@ -2237,6 +2256,7 @@ def test_update_dashboard_schedule_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.dashboards.models.ApiDashboard.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-dashboards/test/test_dashboards_filters_api.py b/thousandeyes-sdk-dashboards/test/test_dashboards_filters_api.py index 90bf02ae1..ae709a39c 100644 --- a/thousandeyes-sdk-dashboards/test/test_dashboards_filters_api.py +++ b/thousandeyes-sdk-dashboards/test/test_dashboards_filters_api.py @@ -64,6 +64,7 @@ def test_create_dashboard_filter_models_validation(self) -> None: request_from_json = thousandeyes_sdk.dashboards.models.ApiContextFilterRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "createdDate" : "2024-02-01T22:19:19Z", @@ -120,14 +121,17 @@ def test_create_dashboard_filter_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.dashboards.models.ApiContextFilterResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_delete_dashboard_filter_models_validation(self) -> None: """Test case for delete_dashboard_filter request and response models""" + def test_get_dashboard_filter_models_validation(self) -> None: """Test case for get_dashboard_filter request and response models""" + response_body_json = """ { "createdDate" : "2024-02-01T22:19:19Z", @@ -184,10 +188,12 @@ def test_get_dashboard_filter_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.dashboards.models.ApiContextFilterResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_dashboards_filters_models_validation(self) -> None: """Test case for get_dashboards_filters request and response models""" + response_body_json = """ { "dashboardFilters" : [ { @@ -296,6 +302,7 @@ def test_get_dashboards_filters_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.dashboards.models.ApiContextFiltersResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_update_dashboard_filter_models_validation(self) -> None: """Test case for update_dashboard_filter request and response models""" @@ -333,6 +340,7 @@ def test_update_dashboard_filter_models_validation(self) -> None: request_from_json = thousandeyes_sdk.dashboards.models.ApiContextFilterRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "createdDate" : "2024-02-01T22:19:19Z", @@ -389,6 +397,7 @@ def test_update_dashboard_filter_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.dashboards.models.ApiContextFilterResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-emulation/README.md b/thousandeyes-sdk-emulation/README.md index 5b8f2c305..28e82685b 100644 --- a/thousandeyes-sdk-emulation/README.md +++ b/thousandeyes-sdk-emulation/README.md @@ -11,7 +11,7 @@ To access Emulation API operations, the following permissions are required: This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.103 +- API version: 7.0.104 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-emulation/test/test_emulation_api.py b/thousandeyes-sdk-emulation/test/test_emulation_api.py index 3d999da66..cc27d8d2a 100644 --- a/thousandeyes-sdk-emulation/test/test_emulation_api.py +++ b/thousandeyes-sdk-emulation/test/test_emulation_api.py @@ -42,6 +42,7 @@ def test_create_emulated_device_models_validation(self) -> None: request_from_json = thousandeyes_sdk.emulation.models.EmulatedDevice.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "availableUserAgents" : [ "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.5993.70 Mobile Safari/537.36", "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.5993.70 Safari/537.36" ], @@ -57,10 +58,12 @@ def test_create_emulated_device_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.emulation.models.EmulatedDeviceResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_emulated_devices_models_validation(self) -> None: """Test case for get_emulated_devices request and response models""" + response_body_json = """ { "emulatedDevices" : [ { @@ -99,10 +102,12 @@ def test_get_emulated_devices_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.emulation.models.EmulatedDeviceResponses.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_user_agents_models_validation(self) -> None: """Test case for get_user_agents request and response models""" + response_body_json = """ { "_links" : { @@ -131,6 +136,7 @@ def test_get_user_agents_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.emulation.models.UserAgents.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-endpoint-agents/README.md b/thousandeyes-sdk-endpoint-agents/README.md index 76f01c36f..813e42e7c 100644 --- a/thousandeyes-sdk-endpoint-agents/README.md +++ b/thousandeyes-sdk-endpoint-agents/README.md @@ -7,7 +7,7 @@ For more information about Endpoint Agents, see [Endpoint Agents](https://docs.t This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.103 +- API version: 7.0.104 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-endpoint-agents/test/test_endpoint_agent_log_items_api.py b/thousandeyes-sdk-endpoint-agents/test/test_endpoint_agent_log_items_api.py index df81a558d..223265a7f 100644 --- a/thousandeyes-sdk-endpoint-agents/test/test_endpoint_agent_log_items_api.py +++ b/thousandeyes-sdk-endpoint-agents/test/test_endpoint_agent_log_items_api.py @@ -31,6 +31,7 @@ def tearDown(self) -> None: def test_get_endpoint_agent_log_items_models_validation(self) -> None: """Test case for get_endpoint_agent_log_items request and response models""" + response_body_json = """ { "_links" : { @@ -123,6 +124,7 @@ def test_get_endpoint_agent_log_items_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.endpoint_agents.models.EndpointAgentLogItemsResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-endpoint-agents/test/test_endpoint_agents_api.py b/thousandeyes-sdk-endpoint-agents/test/test_endpoint_agents_api.py index c910421a2..2cbdefac6 100644 --- a/thousandeyes-sdk-endpoint-agents/test/test_endpoint_agents_api.py +++ b/thousandeyes-sdk-endpoint-agents/test/test_endpoint_agents_api.py @@ -31,10 +31,12 @@ def tearDown(self) -> None: def test_delete_endpoint_agent_models_validation(self) -> None: """Test case for delete_endpoint_agent request and response models""" + def test_disable_endpoint_agent_models_validation(self) -> None: """Test case for disable_endpoint_agent request and response models""" + response_body_json = """ { "npcapVersion" : "npcapVersion", @@ -220,10 +222,12 @@ def test_disable_endpoint_agent_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.endpoint_agents.models.EndpointAgent.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_enable_endpoint_agent_models_validation(self) -> None: """Test case for enable_endpoint_agent request and response models""" + response_body_json = """ { "npcapVersion" : "npcapVersion", @@ -409,6 +413,7 @@ def test_enable_endpoint_agent_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.endpoint_agents.models.EndpointAgent.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_filter_endpoint_agents_models_validation(self) -> None: """Test case for filter_endpoint_agents request and response models""" @@ -457,6 +462,7 @@ def test_filter_endpoint_agents_models_validation(self) -> None: request_from_json = thousandeyes_sdk.endpoint_agents.models.AgentSearchRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "_links" : { @@ -836,10 +842,12 @@ def test_filter_endpoint_agents_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.endpoint_agents.models.FilterEndpointAgentsResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_endpoint_agent_models_validation(self) -> None: """Test case for get_endpoint_agent request and response models""" + response_body_json = """ { "npcapVersion" : "npcapVersion", @@ -1025,10 +1033,12 @@ def test_get_endpoint_agent_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.endpoint_agents.models.EndpointAgent.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_endpoint_agents_models_validation(self) -> None: """Test case for get_endpoint_agents request and response models""" + response_body_json = """ { "_links" : { @@ -1418,10 +1428,12 @@ def test_get_endpoint_agents_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.endpoint_agents.models.ListEndpointAgentsResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_endpoint_agents_connection_string_models_validation(self) -> None: """Test case for get_endpoint_agents_connection_string request and response models""" + response_body_json = """ { "connectionString" : "D2xZSLlqo64Xe2EnYisklA==", @@ -1442,6 +1454,7 @@ def test_get_endpoint_agents_connection_string_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.endpoint_agents.models.ConnectionString.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_update_endpoint_agent_models_validation(self) -> None: """Test case for update_endpoint_agent request and response models""" @@ -1456,6 +1469,7 @@ def test_update_endpoint_agent_models_validation(self) -> None: request_from_json = thousandeyes_sdk.endpoint_agents.models.EndpointAgentUpdate.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "npcapVersion" : "npcapVersion", @@ -1641,6 +1655,7 @@ def test_update_endpoint_agent_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.endpoint_agents.models.EndpointAgent.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-endpoint-agents/test/test_endpoint_agents_transfer_api.py b/thousandeyes-sdk-endpoint-agents/test/test_endpoint_agents_transfer_api.py index 79d073ec0..0066010f3 100644 --- a/thousandeyes-sdk-endpoint-agents/test/test_endpoint_agents_transfer_api.py +++ b/thousandeyes-sdk-endpoint-agents/test/test_endpoint_agents_transfer_api.py @@ -40,6 +40,7 @@ def test_transfer_endpoint_agent_models_validation(self) -> None: request_from_json = thousandeyes_sdk.endpoint_agents.models.AgentTransferRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + def test_transfer_endpoint_agents_models_validation(self) -> None: """Test case for transfer_endpoint_agents request and response models""" @@ -61,6 +62,7 @@ def test_transfer_endpoint_agents_models_validation(self) -> None: request_from_json = thousandeyes_sdk.endpoint_agents.models.BulkAgentTransferRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "items" : [ { @@ -93,6 +95,7 @@ def test_transfer_endpoint_agents_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.endpoint_agents.models.BulkAgentTransferResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-endpoint-agents/test/test_endpoint_proxies_api.py b/thousandeyes-sdk-endpoint-agents/test/test_endpoint_proxies_api.py index 7b0714da3..64c6d55af 100644 --- a/thousandeyes-sdk-endpoint-agents/test/test_endpoint_proxies_api.py +++ b/thousandeyes-sdk-endpoint-agents/test/test_endpoint_proxies_api.py @@ -31,6 +31,7 @@ def tearDown(self) -> None: def test_get_endpoint_proxies_models_validation(self) -> None: """Test case for get_endpoint_proxies request and response models""" + response_body_json = """ { "proxies" : [ { @@ -63,6 +64,7 @@ def test_get_endpoint_proxies_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.endpoint_agents.models.EndpointProxiesResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-endpoint-instant-tests/README.md b/thousandeyes-sdk-endpoint-instant-tests/README.md index bd6d7ad69..53b9449e4 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/README.md +++ b/thousandeyes-sdk-endpoint-instant-tests/README.md @@ -12,7 +12,7 @@ The URLs for these API test data endpoints are provided within the test definiti This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.103 +- API version: 7.0.104 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-endpoint-instant-tests/test/test_agent_to_server_endpoint_instant_scheduled_tests_api.py b/thousandeyes-sdk-endpoint-instant-tests/test/test_agent_to_server_endpoint_instant_scheduled_tests_api.py index 670840ff4..744e12b39 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/test/test_agent_to_server_endpoint_instant_scheduled_tests_api.py +++ b/thousandeyes-sdk-endpoint-instant-tests/test/test_agent_to_server_endpoint_instant_scheduled_tests_api.py @@ -49,6 +49,7 @@ def test_create_agent_to_server_scheduled_instant_test_models_validation(self) - request_from_json = thousandeyes_sdk.endpoint_instant_tests.models.EndpointAgentToServerInstantTest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "server" : "www.example.com", @@ -103,6 +104,7 @@ def test_create_agent_to_server_scheduled_instant_test_models_validation(self) - response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.endpoint_instant_tests.models.EndpointAgentToServerTest.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-endpoint-instant-tests/test/test_http_server_endpoint_instant_scheduled_tests_api.py b/thousandeyes-sdk-endpoint-instant-tests/test/test_http_server_endpoint_instant_scheduled_tests_api.py index b322d96d2..366ab6650 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/test/test_http_server_endpoint_instant_scheduled_tests_api.py +++ b/thousandeyes-sdk-endpoint-instant-tests/test/test_http_server_endpoint_instant_scheduled_tests_api.py @@ -60,6 +60,7 @@ def test_create_http_server_scheduled_instant_test_models_validation(self) -> No request_from_json = thousandeyes_sdk.endpoint_instant_tests.models.EndpointHttpServerInstantTest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "server" : "www.example.com", @@ -125,6 +126,7 @@ def test_create_http_server_scheduled_instant_test_models_validation(self) -> No response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.endpoint_instant_tests.models.EndpointHttpServerTest.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-endpoint-instant-tests/test/test_run_endpoint_instant_scheduled_tests_api.py b/thousandeyes-sdk-endpoint-instant-tests/test/test_run_endpoint_instant_scheduled_tests_api.py index 1b191f4b4..588a03bf5 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/test/test_run_endpoint_instant_scheduled_tests_api.py +++ b/thousandeyes-sdk-endpoint-instant-tests/test/test_run_endpoint_instant_scheduled_tests_api.py @@ -31,6 +31,7 @@ def tearDown(self) -> None: def test_run_endpoint_scheduled_instant_test_models_validation(self) -> None: """Test case for run_endpoint_scheduled_instant_test request and response models""" + response_body_json = """ { "message" : "Successfully reran the instant scheduled test with testId=765231567" @@ -39,6 +40,7 @@ def test_run_endpoint_scheduled_instant_test_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.endpoint_instant_tests.models.EndpointRunScheduledInstantTestResult.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-endpoint-labels/README.md b/thousandeyes-sdk-endpoint-labels/README.md index 488d3d09d..84b41d8ea 100644 --- a/thousandeyes-sdk-endpoint-labels/README.md +++ b/thousandeyes-sdk-endpoint-labels/README.md @@ -4,7 +4,7 @@ Manage labels applied to endpoint agents using this API. This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.103 +- API version: 7.0.104 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-endpoint-labels/test/test_endpoint_agent_labels_api.py b/thousandeyes-sdk-endpoint-labels/test/test_endpoint_agent_labels_api.py index 72b8cba8e..866a407bf 100644 --- a/thousandeyes-sdk-endpoint-labels/test/test_endpoint_agent_labels_api.py +++ b/thousandeyes-sdk-endpoint-labels/test/test_endpoint_agent_labels_api.py @@ -52,6 +52,7 @@ def test_create_endpoint_label_models_validation(self) -> None: request_from_json = thousandeyes_sdk.endpoint_labels.models.LabelRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "color" : "#ff3333", @@ -84,14 +85,17 @@ def test_create_endpoint_label_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.endpoint_labels.models.LabelResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_delete_endpoint_label_models_validation(self) -> None: """Test case for delete_endpoint_label request and response models""" + def test_get_endpoint_label_models_validation(self) -> None: """Test case for get_endpoint_label request and response models""" + response_body_json = """ { "color" : "#ff3333", @@ -124,10 +128,12 @@ def test_get_endpoint_label_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.endpoint_labels.models.LabelResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_endpoint_labels_models_validation(self) -> None: """Test case for get_endpoint_labels request and response models""" + response_body_json = """ { "_links" : { @@ -210,6 +216,7 @@ def test_get_endpoint_labels_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.endpoint_labels.models.Labels.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_update_endpoint_label_models_validation(self) -> None: """Test case for update_endpoint_label request and response models""" @@ -235,6 +242,7 @@ def test_update_endpoint_label_models_validation(self) -> None: request_from_json = thousandeyes_sdk.endpoint_labels.models.Label.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "color" : "#ff3333", @@ -267,6 +275,7 @@ def test_update_endpoint_label_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.endpoint_labels.models.LabelResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-endpoint-test-results/README.md b/thousandeyes-sdk-endpoint-test-results/README.md index d2a9ead5d..b95ef6db8 100644 --- a/thousandeyes-sdk-endpoint-test-results/README.md +++ b/thousandeyes-sdk-endpoint-test-results/README.md @@ -3,7 +3,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.103 +- API version: 7.0.104 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-endpoint-test-results/test/test_http_server_endpoint_scheduled_test_results_api.py b/thousandeyes-sdk-endpoint-test-results/test/test_http_server_endpoint_scheduled_test_results_api.py index 516684ba3..71e6c63e5 100644 --- a/thousandeyes-sdk-endpoint-test-results/test/test_http_server_endpoint_scheduled_test_results_api.py +++ b/thousandeyes-sdk-endpoint-test-results/test/test_http_server_endpoint_scheduled_test_results_api.py @@ -31,6 +31,7 @@ def tearDown(self) -> None: def test_get_http_server_scheduled_test_results_models_validation(self) -> None: """Test case for get_http_server_scheduled_test_results request and response models""" + response_body_json = """ { "test" : { @@ -382,6 +383,7 @@ def test_get_http_server_scheduled_test_results_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.endpoint_test_results.models.HttpEndpointTestResults.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_multi_test_filtered_http_server_scheduled_test_results_models_validation(self) -> None: """Test case for get_multi_test_filtered_http_server_scheduled_test_results request and response models""" @@ -420,6 +422,7 @@ def test_get_multi_test_filtered_http_server_scheduled_test_results_models_valid request_from_json = thousandeyes_sdk.endpoint_test_results.models.HttpEndpointTestsDataRoundsSearch.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "totalHits" : 12, @@ -711,6 +714,7 @@ def test_get_multi_test_filtered_http_server_scheduled_test_results_models_valid response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.endpoint_test_results.models.HttpMultiEndpointTestResults.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_single_test_filtered_http_server_scheduled_test_results_models_validation(self) -> None: """Test case for get_single_test_filtered_http_server_scheduled_test_results request and response models""" @@ -749,6 +753,7 @@ def test_get_single_test_filtered_http_server_scheduled_test_results_models_vali request_from_json = thousandeyes_sdk.endpoint_test_results.models.HttpEndpointTestsDataRoundsSearch.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "totalHits" : 12, @@ -1040,6 +1045,7 @@ def test_get_single_test_filtered_http_server_scheduled_test_results_models_vali response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.endpoint_test_results.models.HttpMultiEndpointTestResults.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-endpoint-test-results/test/test_local_network_endpoint_test_results_api.py b/thousandeyes-sdk-endpoint-test-results/test/test_local_network_endpoint_test_results_api.py index 8a3ab684e..131986a7e 100644 --- a/thousandeyes-sdk-endpoint-test-results/test/test_local_network_endpoint_test_results_api.py +++ b/thousandeyes-sdk-endpoint-test-results/test/test_local_network_endpoint_test_results_api.py @@ -66,6 +66,7 @@ def test_filter_local_networks_test_results_topologies_models_validation(self) - request_from_json = thousandeyes_sdk.endpoint_test_results.models.EndpointNetworkTopologyResultRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "endDate" : "2022-07-18T22:00:54Z", @@ -428,10 +429,12 @@ def test_filter_local_networks_test_results_topologies_models_validation(self) - response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.endpoint_test_results.models.LocalNetworkTopologyResults.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_local_networks_test_results_models_validation(self) -> None: """Test case for get_local_networks_test_results request and response models""" + response_body_json = """ { "localNetworks" : [ { @@ -462,10 +465,12 @@ def test_get_local_networks_test_results_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.endpoint_test_results.models.LocalNetworkResults.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_local_networks_test_results_topology_models_validation(self) -> None: """Test case for get_local_networks_test_results_topology request and response models""" + response_body_json = """ { "_links" : { @@ -1066,6 +1071,7 @@ def test_get_local_networks_test_results_topology_models_validation(self) -> Non response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.endpoint_test_results.models.LocalNetworkTopologyDetailResults.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-endpoint-test-results/test/test_network_dynamic_endpoint_test_results_api.py b/thousandeyes-sdk-endpoint-test-results/test/test_network_dynamic_endpoint_test_results_api.py index 0a516c72f..70d895de1 100644 --- a/thousandeyes-sdk-endpoint-test-results/test/test_network_dynamic_endpoint_test_results_api.py +++ b/thousandeyes-sdk-endpoint-test-results/test/test_network_dynamic_endpoint_test_results_api.py @@ -67,6 +67,7 @@ def test_filter_dynamic_test_network_results_models_validation(self) -> None: request_from_json = thousandeyes_sdk.endpoint_test_results.models.DynamicEndpointTestsDataRoundSearch.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "test" : { @@ -422,10 +423,12 @@ def test_filter_dynamic_test_network_results_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.endpoint_test_results.models.NetworkDynamicEndpointTestResults.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_dynamic_test_path_vis_agent_round_results_models_validation(self) -> None: """Test case for get_dynamic_test_path_vis_agent_round_results request and response models""" + response_body_json = """ { "test" : { @@ -924,10 +927,12 @@ def test_get_dynamic_test_path_vis_agent_round_results_models_validation(self) - response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.endpoint_test_results.models.PathVisDetailDynamicEndpointTestResults.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_dynamic_test_path_vis_results_models_validation(self) -> None: """Test case for get_dynamic_test_path_vis_results request and response models""" + response_body_json = """ { "test" : { @@ -1295,6 +1300,7 @@ def test_get_dynamic_test_path_vis_results_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.endpoint_test_results.models.PathVisDynamicEndpointTestResults.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-endpoint-test-results/test/test_network_endpoint_scheduled_test_results_api.py b/thousandeyes-sdk-endpoint-test-results/test/test_network_endpoint_scheduled_test_results_api.py index bee8aaff0..9b0e8b987 100644 --- a/thousandeyes-sdk-endpoint-test-results/test/test_network_endpoint_scheduled_test_results_api.py +++ b/thousandeyes-sdk-endpoint-test-results/test/test_network_endpoint_scheduled_test_results_api.py @@ -64,6 +64,7 @@ def test_filter_scheduled_test_network_results_models_validation(self) -> None: request_from_json = thousandeyes_sdk.endpoint_test_results.models.EndpointTestsDataRoundsSearch.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "test" : { @@ -398,6 +399,7 @@ def test_filter_scheduled_test_network_results_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.endpoint_test_results.models.NetworkEndpointTestResults.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_filter_scheduled_tests_network_results_models_validation(self) -> None: """Test case for filter_scheduled_tests_network_results request and response models""" @@ -435,6 +437,7 @@ def test_filter_scheduled_tests_network_results_models_validation(self) -> None: request_from_json = thousandeyes_sdk.endpoint_test_results.models.MultiTestIdEndpointTestsDataRoundsSearch.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "totalHits" : 12, @@ -720,10 +723,12 @@ def test_filter_scheduled_tests_network_results_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.endpoint_test_results.models.MultiTestIdNetworkEndpointTestResults.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_scheduled_test_path_vis_agent_round_results_models_validation(self) -> None: """Test case for get_scheduled_test_path_vis_agent_round_results request and response models""" + response_body_json = """ { "test" : { @@ -1201,10 +1206,12 @@ def test_get_scheduled_test_path_vis_agent_round_results_models_validation(self) response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.endpoint_test_results.models.PathVisDetailEndpointTestResults.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_scheduled_test_path_vis_results_models_validation(self) -> None: """Test case for get_scheduled_test_path_vis_results request and response models""" + response_body_json = """ { "test" : { @@ -1550,6 +1557,7 @@ def test_get_scheduled_test_path_vis_results_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.endpoint_test_results.models.PathVisEndpointTestResults.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-endpoint-test-results/test/test_real_user_endpoint_test_results_api.py b/thousandeyes-sdk-endpoint-test-results/test/test_real_user_endpoint_test_results_api.py index 86e042120..67ec2bcac 100644 --- a/thousandeyes-sdk-endpoint-test-results/test/test_real_user_endpoint_test_results_api.py +++ b/thousandeyes-sdk-endpoint-test-results/test/test_real_user_endpoint_test_results_api.py @@ -57,6 +57,7 @@ def test_filter_real_user_tests_network_results_models_validation(self) -> None: request_from_json = thousandeyes_sdk.endpoint_test_results.models.RealUserEndpointTestResultsRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "endDate" : "2022-07-18T22:00:54Z", @@ -167,6 +168,7 @@ def test_filter_real_user_tests_network_results_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.endpoint_test_results.models.RealUserEndpointTestNetworkResults.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_filter_real_user_tests_results_models_validation(self) -> None: """Test case for filter_real_user_tests_results request and response models""" @@ -197,6 +199,7 @@ def test_filter_real_user_tests_results_models_validation(self) -> None: request_from_json = thousandeyes_sdk.endpoint_test_results.models.RealUserEndpointTestResultsRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "endDate" : "2022-07-18T22:00:54Z", @@ -247,6 +250,7 @@ def test_filter_real_user_tests_results_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.endpoint_test_results.models.RealUserEndpointTestResults.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_filter_real_user_tests_visited_pages_results_models_validation(self) -> None: """Test case for filter_real_user_tests_visited_pages_results request and response models""" @@ -275,6 +279,7 @@ def test_filter_real_user_tests_visited_pages_results_models_validation(self) -> request_from_json = thousandeyes_sdk.endpoint_test_results.models.RealUserEndpointTestResultRequestFilter.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "endDate" : "2022-07-18T22:00:54Z", @@ -367,10 +372,12 @@ def test_filter_real_user_tests_visited_pages_results_models_validation(self) -> response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.endpoint_test_results.models.RealUserEndpointTestPageResults.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_real_user_test_page_results_models_validation(self) -> None: """Test case for get_real_user_test_page_results request and response models""" + response_body_json = """ { "_links" : { @@ -613,10 +620,12 @@ def test_get_real_user_test_page_results_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.endpoint_test_results.models.RealUserEndpointTestPageDetailResult.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_real_user_test_results_models_validation(self) -> None: """Test case for get_real_user_test_results request and response models""" + response_body_json = """ { "_links" : { @@ -1027,6 +1036,7 @@ def test_get_real_user_test_results_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.endpoint_test_results.models.RealUserEndpointTestDetailResults.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-endpoint-tests/README.md b/thousandeyes-sdk-endpoint-tests/README.md index a1fede6b4..619182cb5 100644 --- a/thousandeyes-sdk-endpoint-tests/README.md +++ b/thousandeyes-sdk-endpoint-tests/README.md @@ -4,7 +4,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.103 +- API version: 7.0.104 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-endpoint-tests/test/test_agent_to_server_endpoint_dynamic_tests_api.py b/thousandeyes-sdk-endpoint-tests/test/test_agent_to_server_endpoint_dynamic_tests_api.py index 069f81ad0..cff38a5cc 100644 --- a/thousandeyes-sdk-endpoint-tests/test/test_agent_to_server_endpoint_dynamic_tests_api.py +++ b/thousandeyes-sdk-endpoint-tests/test/test_agent_to_server_endpoint_dynamic_tests_api.py @@ -52,6 +52,7 @@ def test_create_agent_to_server_endpoint_dynamic_test_models_validation(self) -> request_from_json = thousandeyes_sdk.endpoint_tests.models.DynamicTestRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "hasPing" : true, @@ -105,14 +106,17 @@ def test_create_agent_to_server_endpoint_dynamic_test_models_validation(self) -> response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.endpoint_tests.models.DynamicTest.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_delete_agent_to_server_endpoint_dynamic_test_models_validation(self) -> None: """Test case for delete_agent_to_server_endpoint_dynamic_test request and response models""" + def test_get_agent_to_server_endpoint_dynamic_test_models_validation(self) -> None: """Test case for get_agent_to_server_endpoint_dynamic_test request and response models""" + response_body_json = """ { "hasPing" : true, @@ -166,10 +170,12 @@ def test_get_agent_to_server_endpoint_dynamic_test_models_validation(self) -> No response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.endpoint_tests.models.DynamicTest.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_agent_to_server_endpoint_dynamic_tests_models_validation(self) -> None: """Test case for get_agent_to_server_endpoint_dynamic_tests request and response models""" + response_body_json = """ { "tests" : [ { @@ -284,6 +290,7 @@ def test_get_agent_to_server_endpoint_dynamic_tests_models_validation(self) -> N response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.endpoint_tests.models.DynamicTests.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_update_agent_to_server_endpoint_dynamic_test_models_validation(self) -> None: """Test case for update_agent_to_server_endpoint_dynamic_test request and response models""" @@ -302,6 +309,7 @@ def test_update_agent_to_server_endpoint_dynamic_test_models_validation(self) -> request_from_json = thousandeyes_sdk.endpoint_tests.models.EndpointDynamicTestUpdate.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "hasPing" : true, @@ -355,6 +363,7 @@ def test_update_agent_to_server_endpoint_dynamic_test_models_validation(self) -> response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.endpoint_tests.models.DynamicTest.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-endpoint-tests/test/test_agent_to_server_endpoint_scheduled_tests_api.py b/thousandeyes-sdk-endpoint-tests/test/test_agent_to_server_endpoint_scheduled_tests_api.py index 67f85982c..8632e4fad 100644 --- a/thousandeyes-sdk-endpoint-tests/test/test_agent_to_server_endpoint_scheduled_tests_api.py +++ b/thousandeyes-sdk-endpoint-tests/test/test_agent_to_server_endpoint_scheduled_tests_api.py @@ -52,6 +52,7 @@ def test_create_agent_to_server_endpoint_scheduled_test_models_validation(self) request_from_json = thousandeyes_sdk.endpoint_tests.models.EndpointAgentToServerTestRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "server" : "www.example.com", @@ -106,14 +107,17 @@ def test_create_agent_to_server_endpoint_scheduled_test_models_validation(self) response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.endpoint_tests.models.EndpointAgentToServerTest.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_delete_agent_to_server_endpoint_scheduled_test_models_validation(self) -> None: """Test case for delete_agent_to_server_endpoint_scheduled_test request and response models""" + def test_get_agent_to_server_endpoint_scheduled_test_models_validation(self) -> None: """Test case for get_agent_to_server_endpoint_scheduled_test request and response models""" + response_body_json = """ { "server" : "www.example.com", @@ -168,10 +172,12 @@ def test_get_agent_to_server_endpoint_scheduled_test_models_validation(self) -> response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.endpoint_tests.models.EndpointAgentToServerTest.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_agent_to_server_endpoint_scheduled_tests_models_validation(self) -> None: """Test case for get_agent_to_server_endpoint_scheduled_tests request and response models""" + response_body_json = """ { "tests" : [ { @@ -288,6 +294,7 @@ def test_get_agent_to_server_endpoint_scheduled_tests_models_validation(self) -> response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.endpoint_tests.models.EndpointAgentToServerTests.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_update_agent_to_server_endpoint_scheduled_test_models_validation(self) -> None: """Test case for update_agent_to_server_endpoint_scheduled_test request and response models""" @@ -307,6 +314,7 @@ def test_update_agent_to_server_endpoint_scheduled_test_models_validation(self) request_from_json = thousandeyes_sdk.endpoint_tests.models.EndpointNetworkTestUpdate.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "server" : "www.example.com", @@ -361,6 +369,7 @@ def test_update_agent_to_server_endpoint_scheduled_test_models_validation(self) response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.endpoint_tests.models.EndpointAgentToServerTest.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-endpoint-tests/test/test_endpoint_real_user_tests_api.py b/thousandeyes-sdk-endpoint-tests/test/test_endpoint_real_user_tests_api.py index b71a31bc7..42d87524b 100644 --- a/thousandeyes-sdk-endpoint-tests/test/test_endpoint_real_user_tests_api.py +++ b/thousandeyes-sdk-endpoint-tests/test/test_endpoint_real_user_tests_api.py @@ -31,6 +31,7 @@ def tearDown(self) -> None: def test_get_endpoint_real_user_tests_models_validation(self) -> None: """Test case for get_endpoint_real_user_tests request and response models""" + response_body_json = """ { "realUserTests" : [ { @@ -63,6 +64,7 @@ def test_get_endpoint_real_user_tests_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.endpoint_tests.models.EndpointRealUserTestsResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-endpoint-tests/test/test_endpoint_scheduled_tests_api.py b/thousandeyes-sdk-endpoint-tests/test/test_endpoint_scheduled_tests_api.py index da4704e8e..f356f0cdb 100644 --- a/thousandeyes-sdk-endpoint-tests/test/test_endpoint_scheduled_tests_api.py +++ b/thousandeyes-sdk-endpoint-tests/test/test_endpoint_scheduled_tests_api.py @@ -31,6 +31,7 @@ def tearDown(self) -> None: def test_get_endpoint_scheduled_tests_models_validation(self) -> None: """Test case for get_endpoint_scheduled_tests request and response models""" + response_body_json = """ { "tests" : [ { @@ -147,6 +148,7 @@ def test_get_endpoint_scheduled_tests_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.endpoint_tests.models.EndpointTests.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-endpoint-tests/test/test_http_server_endpoint_scheduled_tests_api.py b/thousandeyes-sdk-endpoint-tests/test/test_http_server_endpoint_scheduled_tests_api.py index 1cbe0bf36..7075b106a 100644 --- a/thousandeyes-sdk-endpoint-tests/test/test_http_server_endpoint_scheduled_tests_api.py +++ b/thousandeyes-sdk-endpoint-tests/test/test_http_server_endpoint_scheduled_tests_api.py @@ -62,6 +62,7 @@ def test_create_http_server_endpoint_scheduled_test_models_validation(self) -> N request_from_json = thousandeyes_sdk.endpoint_tests.models.EndpointHttpServerTestRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "server" : "www.example.com", @@ -127,14 +128,17 @@ def test_create_http_server_endpoint_scheduled_test_models_validation(self) -> N response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.endpoint_tests.models.EndpointHttpServerTest.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_delete_http_server_endpoint_scheduled_test_models_validation(self) -> None: """Test case for delete_http_server_endpoint_scheduled_test request and response models""" + def test_get_http_server_endpoint_scheduled_test_models_validation(self) -> None: """Test case for get_http_server_endpoint_scheduled_test request and response models""" + response_body_json = """ { "server" : "www.example.com", @@ -200,10 +204,12 @@ def test_get_http_server_endpoint_scheduled_test_models_validation(self) -> None response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.endpoint_tests.models.EndpointHttpServerTest.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_http_server_endpoint_scheduled_tests_models_validation(self) -> None: """Test case for get_http_server_endpoint_scheduled_tests request and response models""" + response_body_json = """ { "tests" : [ { @@ -342,6 +348,7 @@ def test_get_http_server_endpoint_scheduled_tests_models_validation(self) -> Non response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.endpoint_tests.models.EndpointHttpServerTests.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_update_http_server_endpoint_scheduled_test_models_validation(self) -> None: """Test case for update_http_server_endpoint_scheduled_test request and response models""" @@ -360,6 +367,7 @@ def test_update_http_server_endpoint_scheduled_test_models_validation(self) -> N request_from_json = thousandeyes_sdk.endpoint_tests.models.EndpointHttpTestUpdate.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "server" : "www.example.com", @@ -425,6 +433,7 @@ def test_update_http_server_endpoint_scheduled_test_models_validation(self) -> N response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.endpoint_tests.models.EndpointHttpServerTest.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-event-detection/README.md b/thousandeyes-sdk-event-detection/README.md index 15af9a5ee..ed80f435c 100644 --- a/thousandeyes-sdk-event-detection/README.md +++ b/thousandeyes-sdk-event-detection/README.md @@ -11,7 +11,7 @@ With the Events API, you can perform the following tasks on the ThousandEyes pla This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.103 +- API version: 7.0.104 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-event-detection/test/test_events_api.py b/thousandeyes-sdk-event-detection/test/test_events_api.py index a83f1b172..3ba5cd38e 100644 --- a/thousandeyes-sdk-event-detection/test/test_events_api.py +++ b/thousandeyes-sdk-event-detection/test/test_events_api.py @@ -31,6 +31,7 @@ def tearDown(self) -> None: def test_get_event_models_validation(self) -> None: """Test case for get_event request and response models""" + response_body_json = """ { "severity" : "medium", @@ -167,10 +168,12 @@ def test_get_event_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.event_detection.models.EventDetail.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_events_models_validation(self) -> None: """Test case for get_events request and response models""" + response_body_json = """ { "endDate" : "2022-07-18T22:00:54Z", @@ -272,6 +275,7 @@ def test_get_events_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.event_detection.models.Events.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-instant-tests/.openapi-generator/FILES b/thousandeyes-sdk-instant-tests/.openapi-generator/FILES index 1b70f8302..a7a684abc 100644 --- a/thousandeyes-sdk-instant-tests/.openapi-generator/FILES +++ b/thousandeyes-sdk-instant-tests/.openapi-generator/FILES @@ -3,7 +3,6 @@ MANIFEST.in README.md docs/APIInstantTestsApi.md docs/AgentBase.md -docs/AgentInterfaces.md docs/AgentResponse.md docs/AgentToAgentInstantTest.md docs/AgentToAgentInstantTestRequest.md @@ -67,6 +66,7 @@ docs/HttpServerInstantTestResponse.md docs/HttpServerProperties.md docs/InstantTest.md docs/InstantTestRequest.md +docs/InstantTestRequestProperties.md docs/InstantTestsApi.md docs/Link.md docs/NetworkProviderInfo.md @@ -87,9 +87,11 @@ docs/SipServerInstantTestRequest.md docs/SipServerInstantTestResponse.md docs/SipServerProperties.md docs/SipTestProtocol.md +docs/SourceInterfaceInstantTestRequest.md docs/TestAgent.md docs/TestAgentResponse.md docs/TestAgentResponseProperties.md +docs/TestAgentWithSourceIpAddress.md docs/TestAuthType.md docs/TestChromiumTrack.md docs/TestCustomHeaders.md @@ -144,7 +146,6 @@ src/thousandeyes_sdk/instant_tests/api/voice_instant_tests_api.py src/thousandeyes_sdk/instant_tests/api/web_transaction_instant_tests_api.py src/thousandeyes_sdk/instant_tests/models/__init__.py src/thousandeyes_sdk/instant_tests/models/agent_base.py -src/thousandeyes_sdk/instant_tests/models/agent_interfaces.py src/thousandeyes_sdk/instant_tests/models/agent_response.py src/thousandeyes_sdk/instant_tests/models/agent_to_agent_instant_test.py src/thousandeyes_sdk/instant_tests/models/agent_to_agent_instant_test_request.py @@ -200,6 +201,7 @@ src/thousandeyes_sdk/instant_tests/models/http_server_instant_test_response.py src/thousandeyes_sdk/instant_tests/models/http_server_properties.py src/thousandeyes_sdk/instant_tests/models/instant_test.py src/thousandeyes_sdk/instant_tests/models/instant_test_request.py +src/thousandeyes_sdk/instant_tests/models/instant_test_request_properties.py src/thousandeyes_sdk/instant_tests/models/link.py src/thousandeyes_sdk/instant_tests/models/network_provider_info.py src/thousandeyes_sdk/instant_tests/models/network_provider_type.py @@ -218,9 +220,11 @@ src/thousandeyes_sdk/instant_tests/models/sip_server_instant_test_request.py src/thousandeyes_sdk/instant_tests/models/sip_server_instant_test_response.py src/thousandeyes_sdk/instant_tests/models/sip_server_properties.py src/thousandeyes_sdk/instant_tests/models/sip_test_protocol.py +src/thousandeyes_sdk/instant_tests/models/source_interface_instant_test_request.py src/thousandeyes_sdk/instant_tests/models/test_agent.py src/thousandeyes_sdk/instant_tests/models/test_agent_response.py src/thousandeyes_sdk/instant_tests/models/test_agent_response_properties.py +src/thousandeyes_sdk/instant_tests/models/test_agent_with_source_ip_address.py src/thousandeyes_sdk/instant_tests/models/test_auth_type.py src/thousandeyes_sdk/instant_tests/models/test_chromium_track.py src/thousandeyes_sdk/instant_tests/models/test_custom_headers.py diff --git a/thousandeyes-sdk-instant-tests/README.md b/thousandeyes-sdk-instant-tests/README.md index b5111dfad..bb92f416b 100644 --- a/thousandeyes-sdk-instant-tests/README.md +++ b/thousandeyes-sdk-instant-tests/README.md @@ -6,7 +6,7 @@ The response does not include the immediate test results. Use the Test Results e This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.103 +- API version: 7.0.104 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator @@ -117,7 +117,6 @@ Class | Method | HTTP request | Description ## Documentation For Models - [AgentBase](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-instant-tests/docs/AgentBase.md) - - [AgentInterfaces](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-instant-tests/docs/AgentInterfaces.md) - [AgentResponse](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-instant-tests/docs/AgentResponse.md) - [AgentToAgentInstantTest](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-instant-tests/docs/AgentToAgentInstantTest.md) - [AgentToAgentInstantTestRequest](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-instant-tests/docs/AgentToAgentInstantTestRequest.md) @@ -173,6 +172,7 @@ Class | Method | HTTP request | Description - [HttpServerProperties](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-instant-tests/docs/HttpServerProperties.md) - [InstantTest](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-instant-tests/docs/InstantTest.md) - [InstantTestRequest](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-instant-tests/docs/InstantTestRequest.md) + - [InstantTestRequestProperties](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-instant-tests/docs/InstantTestRequestProperties.md) - [Link](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-instant-tests/docs/Link.md) - [NetworkProviderInfo](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-instant-tests/docs/NetworkProviderInfo.md) - [NetworkProviderType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-instant-tests/docs/NetworkProviderType.md) @@ -191,9 +191,11 @@ Class | Method | HTTP request | Description - [SipServerInstantTestResponse](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-instant-tests/docs/SipServerInstantTestResponse.md) - [SipServerProperties](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-instant-tests/docs/SipServerProperties.md) - [SipTestProtocol](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-instant-tests/docs/SipTestProtocol.md) + - [SourceInterfaceInstantTestRequest](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-instant-tests/docs/SourceInterfaceInstantTestRequest.md) - [TestAgent](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-instant-tests/docs/TestAgent.md) - [TestAgentResponse](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-instant-tests/docs/TestAgentResponse.md) - [TestAgentResponseProperties](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-instant-tests/docs/TestAgentResponseProperties.md) + - [TestAgentWithSourceIpAddress](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-instant-tests/docs/TestAgentWithSourceIpAddress.md) - [TestAuthType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-instant-tests/docs/TestAuthType.md) - [TestChromiumTrack](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-instant-tests/docs/TestChromiumTrack.md) - [TestCustomHeaders](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-instant-tests/docs/TestCustomHeaders.md) diff --git a/thousandeyes-sdk-instant-tests/docs/AgentInterfaces.md b/thousandeyes-sdk-instant-tests/docs/AgentInterfaces.md deleted file mode 100644 index ba933191f..000000000 --- a/thousandeyes-sdk-instant-tests/docs/AgentInterfaces.md +++ /dev/null @@ -1,30 +0,0 @@ -# AgentInterfaces - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ip_address** | **str** | IP address of the agent interface. | [optional] -**agent_id** | **str** | The agent ID of the enterprise agent for the test. | [optional] - -## Example - -```python -from thousandeyes_sdk.instant_tests.models.agent_interfaces import AgentInterfaces - -# TODO update the JSON string below -json = "{}" -# create an instance of AgentInterfaces from a JSON string -agent_interfaces_instance = AgentInterfaces.from_json(json) -# print the JSON string representation of the object -print(AgentInterfaces.to_json()) - -# convert the object into a dict -agent_interfaces_dict = agent_interfaces_instance.to_dict() -# create an instance of AgentInterfaces from a dict -agent_interfaces_from_dict = AgentInterfaces.from_dict(agent_interfaces_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) - - diff --git a/thousandeyes-sdk-instant-tests/docs/AgentToAgentInstantTestRequest.md b/thousandeyes-sdk-instant-tests/docs/AgentToAgentInstantTestRequest.md index 8c9f2cd63..2f639a94e 100644 --- a/thousandeyes-sdk-instant-tests/docs/AgentToAgentInstantTestRequest.md +++ b/thousandeyes-sdk-instant-tests/docs/AgentToAgentInstantTestRequest.md @@ -33,7 +33,7 @@ Name | Type | Description | Notes **labels** | **List[str]** | A list of test label identifiers (get `labelId` from `/labels` endpoint). | [optional] **tags** | **List[str]** | A list of test tag identifiers (get `id` from `/tags` endpoint). | [optional] **shared_with_accounts** | **List[str]** | A list of account group identifiers that the test is shared with (get `aid` from `/account-groups` endpoint). | [optional] -**agents** | [**List[TestAgent]**](TestAgent.md) | A list of objects with `agentId` (required) and `sourceIpAddress` (optional). | +**agents** | [**List[TestAgentWithSourceIpAddress]**](TestAgentWithSourceIpAddress.md) | Agents assigned to the test. To select a source interface, set `sourceIpAddress` on the same object as its `agentId`. | ## Example diff --git a/thousandeyes-sdk-instant-tests/docs/AgentToServerInstantTestRequest.md b/thousandeyes-sdk-instant-tests/docs/AgentToServerInstantTestRequest.md index 6e24e35e7..f421b2501 100644 --- a/thousandeyes-sdk-instant-tests/docs/AgentToServerInstantTestRequest.md +++ b/thousandeyes-sdk-instant-tests/docs/AgentToServerInstantTestRequest.md @@ -34,7 +34,7 @@ Name | Type | Description | Notes **labels** | **List[str]** | A list of test label identifiers (get `labelId` from `/labels` endpoint). | [optional] **tags** | **List[str]** | A list of test tag identifiers (get `id` from `/tags` endpoint). | [optional] **shared_with_accounts** | **List[str]** | A list of account group identifiers that the test is shared with (get `aid` from `/account-groups` endpoint). | [optional] -**agents** | [**List[TestAgent]**](TestAgent.md) | A list of objects with `agentId` (required) and `sourceIpAddress` (optional). | +**agents** | [**List[TestAgentWithSourceIpAddress]**](TestAgentWithSourceIpAddress.md) | Agents assigned to the test. To select a source interface, set `sourceIpAddress` on the same object as its `agentId`. | ## Example diff --git a/thousandeyes-sdk-instant-tests/docs/ApiInstantTestRequest.md b/thousandeyes-sdk-instant-tests/docs/ApiInstantTestRequest.md index dadebb5f9..d047a8cd9 100644 --- a/thousandeyes-sdk-instant-tests/docs/ApiInstantTestRequest.md +++ b/thousandeyes-sdk-instant-tests/docs/ApiInstantTestRequest.md @@ -39,7 +39,7 @@ Name | Type | Description | Notes **labels** | **List[str]** | A list of test label identifiers (get `labelId` from `/labels` endpoint). | [optional] **tags** | **List[str]** | A list of test tag identifiers (get `id` from `/tags` endpoint). | [optional] **shared_with_accounts** | **List[str]** | A list of account group identifiers that the test is shared with (get `aid` from `/account-groups` endpoint). | [optional] -**agents** | [**List[TestAgent]**](TestAgent.md) | A list of objects with `agentId` (required) and `sourceIpAddress` (optional). | +**agents** | [**List[TestAgent]**](TestAgent.md) | Agents assigned to the test. | **credentials** | **List[str]** | Contains a list of credential IDs (get `credentialId` from `/credentials` endpoint). | [optional] **vault_credentials** | [**List[TestVaultCredential]**](TestVaultCredential.md) | List of credential IDs that are stored in an external vault. | [optional] diff --git a/thousandeyes-sdk-instant-tests/docs/DnsSecInstantTestRequest.md b/thousandeyes-sdk-instant-tests/docs/DnsSecInstantTestRequest.md index 563ec3533..e4e75d7e2 100644 --- a/thousandeyes-sdk-instant-tests/docs/DnsSecInstantTestRequest.md +++ b/thousandeyes-sdk-instant-tests/docs/DnsSecInstantTestRequest.md @@ -22,7 +22,7 @@ Name | Type | Description | Notes **labels** | **List[str]** | A list of test label identifiers (get `labelId` from `/labels` endpoint). | [optional] **tags** | **List[str]** | A list of test tag identifiers (get `id` from `/tags` endpoint). | [optional] **shared_with_accounts** | **List[str]** | A list of account group identifiers that the test is shared with (get `aid` from `/account-groups` endpoint). | [optional] -**agents** | [**List[TestAgent]**](TestAgent.md) | A list of objects with `agentId` (required) and `sourceIpAddress` (optional). | +**agents** | [**List[TestAgent]**](TestAgent.md) | Agents assigned to the test. | ## Example diff --git a/thousandeyes-sdk-instant-tests/docs/DnsServerInstantTestRequest.md b/thousandeyes-sdk-instant-tests/docs/DnsServerInstantTestRequest.md index 47eb82195..e6735c14a 100644 --- a/thousandeyes-sdk-instant-tests/docs/DnsServerInstantTestRequest.md +++ b/thousandeyes-sdk-instant-tests/docs/DnsServerInstantTestRequest.md @@ -34,7 +34,7 @@ Name | Type | Description | Notes **labels** | **List[str]** | A list of test label identifiers (get `labelId` from `/labels` endpoint). | [optional] **tags** | **List[str]** | A list of test tag identifiers (get `id` from `/tags` endpoint). | [optional] **shared_with_accounts** | **List[str]** | A list of account group identifiers that the test is shared with (get `aid` from `/account-groups` endpoint). | [optional] -**agents** | [**List[TestAgent]**](TestAgent.md) | A list of objects with `agentId` (required) and `sourceIpAddress` (optional). | +**agents** | [**List[TestAgent]**](TestAgent.md) | Agents assigned to the test. | ## Example diff --git a/thousandeyes-sdk-instant-tests/docs/DnsTraceInstantTestRequest.md b/thousandeyes-sdk-instant-tests/docs/DnsTraceInstantTestRequest.md index 8b2c0a514..9f8a646e7 100644 --- a/thousandeyes-sdk-instant-tests/docs/DnsTraceInstantTestRequest.md +++ b/thousandeyes-sdk-instant-tests/docs/DnsTraceInstantTestRequest.md @@ -23,7 +23,7 @@ Name | Type | Description | Notes **labels** | **List[str]** | A list of test label identifiers (get `labelId` from `/labels` endpoint). | [optional] **tags** | **List[str]** | A list of test tag identifiers (get `id` from `/tags` endpoint). | [optional] **shared_with_accounts** | **List[str]** | A list of account group identifiers that the test is shared with (get `aid` from `/account-groups` endpoint). | [optional] -**agents** | [**List[TestAgent]**](TestAgent.md) | A list of objects with `agentId` (required) and `sourceIpAddress` (optional). | +**agents** | [**List[TestAgent]**](TestAgent.md) | Agents assigned to the test. | ## Example diff --git a/thousandeyes-sdk-instant-tests/docs/FtpServerInstantTestRequest.md b/thousandeyes-sdk-instant-tests/docs/FtpServerInstantTestRequest.md index f10ec7565..f96e3b1bb 100644 --- a/thousandeyes-sdk-instant-tests/docs/FtpServerInstantTestRequest.md +++ b/thousandeyes-sdk-instant-tests/docs/FtpServerInstantTestRequest.md @@ -38,7 +38,7 @@ Name | Type | Description | Notes **labels** | **List[str]** | A list of test label identifiers (get `labelId` from `/labels` endpoint). | [optional] **tags** | **List[str]** | A list of test tag identifiers (get `id` from `/tags` endpoint). | [optional] **shared_with_accounts** | **List[str]** | A list of account group identifiers that the test is shared with (get `aid` from `/account-groups` endpoint). | [optional] -**agents** | [**List[TestAgent]**](TestAgent.md) | A list of objects with `agentId` (required) and `sourceIpAddress` (optional). | +**agents** | [**List[TestAgentWithSourceIpAddress]**](TestAgentWithSourceIpAddress.md) | Agents assigned to the test. To select a source interface, set `sourceIpAddress` on the same object as its `agentId`. | ## Example diff --git a/thousandeyes-sdk-instant-tests/docs/HttpServerBaseProperties.md b/thousandeyes-sdk-instant-tests/docs/HttpServerBaseProperties.md index 5fdd42b37..dde5544d5 100644 --- a/thousandeyes-sdk-instant-tests/docs/HttpServerBaseProperties.md +++ b/thousandeyes-sdk-instant-tests/docs/HttpServerBaseProperties.md @@ -6,7 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] -**agent_interfaces** | [**AgentInterfaces**](AgentInterfaces.md) | | [optional] **bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] **client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] **content_regex** | **str** | Content regex, this field does not require escaping. | [optional] diff --git a/thousandeyes-sdk-instant-tests/docs/HttpServerInstantTest.md b/thousandeyes-sdk-instant-tests/docs/HttpServerInstantTest.md index 58560eba5..80f8a6923 100644 --- a/thousandeyes-sdk-instant-tests/docs/HttpServerInstantTest.md +++ b/thousandeyes-sdk-instant-tests/docs/HttpServerInstantTest.md @@ -20,7 +20,6 @@ Name | Type | Description | Notes **tags** | [**List[TestTag]**](TestTag.md) | Tags assigned to the test. Returned only when `expand=tag` is specified. This field is not returned for Instant Tests. For more information, see `/tags`. | [optional] [readonly] **shared_with_accounts** | [**List[SharedWithAccount]**](SharedWithAccount.md) | | [optional] [readonly] **auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] -**agent_interfaces** | [**AgentInterfaces**](AgentInterfaces.md) | | [optional] **bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] **client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] **content_regex** | **str** | Content regex, this field does not require escaping. | [optional] diff --git a/thousandeyes-sdk-instant-tests/docs/HttpServerInstantTestRequest.md b/thousandeyes-sdk-instant-tests/docs/HttpServerInstantTestRequest.md index 34581fb5f..9e915e3b7 100644 --- a/thousandeyes-sdk-instant-tests/docs/HttpServerInstantTestRequest.md +++ b/thousandeyes-sdk-instant-tests/docs/HttpServerInstantTestRequest.md @@ -17,7 +17,6 @@ Name | Type | Description | Notes **type** | **str** | | [optional] [readonly] **links** | [**TestLinks**](TestLinks.md) | | [optional] **auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] -**agent_interfaces** | [**AgentInterfaces**](AgentInterfaces.md) | | [optional] **bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] **client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] **content_regex** | **str** | Content regex, this field does not require escaping. | [optional] @@ -60,7 +59,7 @@ Name | Type | Description | Notes **labels** | **List[str]** | A list of test label identifiers (get `labelId` from `/labels` endpoint). | [optional] **tags** | **List[str]** | A list of test tag identifiers (get `id` from `/tags` endpoint). | [optional] **shared_with_accounts** | **List[str]** | A list of account group identifiers that the test is shared with (get `aid` from `/account-groups` endpoint). | [optional] -**agents** | [**List[TestAgent]**](TestAgent.md) | A list of objects with `agentId` (required) and `sourceIpAddress` (optional). | +**agents** | [**List[TestAgentWithSourceIpAddress]**](TestAgentWithSourceIpAddress.md) | Agents assigned to the test. To select a source interface, set `sourceIpAddress` on the same object as its `agentId`. | ## Example diff --git a/thousandeyes-sdk-instant-tests/docs/HttpServerInstantTestResponse.md b/thousandeyes-sdk-instant-tests/docs/HttpServerInstantTestResponse.md index 1862f6112..1f8cb6539 100644 --- a/thousandeyes-sdk-instant-tests/docs/HttpServerInstantTestResponse.md +++ b/thousandeyes-sdk-instant-tests/docs/HttpServerInstantTestResponse.md @@ -20,7 +20,6 @@ Name | Type | Description | Notes **tags** | [**List[TestTag]**](TestTag.md) | Tags assigned to the test. Returned only when `expand=tag` is specified. This field is not returned for Instant Tests. For more information, see `/tags`. | [optional] [readonly] **shared_with_accounts** | [**List[SharedWithAccount]**](SharedWithAccount.md) | | [optional] [readonly] **auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] -**agent_interfaces** | [**AgentInterfaces**](AgentInterfaces.md) | | [optional] **bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] **client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] **content_regex** | **str** | Content regex, this field does not require escaping. | [optional] diff --git a/thousandeyes-sdk-instant-tests/docs/HttpServerProperties.md b/thousandeyes-sdk-instant-tests/docs/HttpServerProperties.md index 0e1283b6c..2dfdd9179 100644 --- a/thousandeyes-sdk-instant-tests/docs/HttpServerProperties.md +++ b/thousandeyes-sdk-instant-tests/docs/HttpServerProperties.md @@ -6,7 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] -**agent_interfaces** | [**AgentInterfaces**](AgentInterfaces.md) | | [optional] **bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] **client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] **content_regex** | **str** | Content regex, this field does not require escaping. | [optional] diff --git a/thousandeyes-sdk-instant-tests/docs/InstantTestRequest.md b/thousandeyes-sdk-instant-tests/docs/InstantTestRequest.md index c260e450c..4dcafec8c 100644 --- a/thousandeyes-sdk-instant-tests/docs/InstantTestRequest.md +++ b/thousandeyes-sdk-instant-tests/docs/InstantTestRequest.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **labels** | **List[str]** | A list of test label identifiers (get `labelId` from `/labels` endpoint). | [optional] **tags** | **List[str]** | A list of test tag identifiers (get `id` from `/tags` endpoint). | [optional] **shared_with_accounts** | **List[str]** | A list of account group identifiers that the test is shared with (get `aid` from `/account-groups` endpoint). | [optional] -**agents** | [**List[TestAgent]**](TestAgent.md) | A list of objects with `agentId` (required) and `sourceIpAddress` (optional). | +**agents** | [**List[TestAgent]**](TestAgent.md) | Agents assigned to the test. | ## Example diff --git a/thousandeyes-sdk-instant-tests/docs/InstantTestRequestProperties.md b/thousandeyes-sdk-instant-tests/docs/InstantTestRequestProperties.md new file mode 100644 index 000000000..258078539 --- /dev/null +++ b/thousandeyes-sdk-instant-tests/docs/InstantTestRequestProperties.md @@ -0,0 +1,31 @@ +# InstantTestRequestProperties + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**labels** | **List[str]** | A list of test label identifiers (get `labelId` from `/labels` endpoint). | [optional] +**tags** | **List[str]** | A list of test tag identifiers (get `id` from `/tags` endpoint). | [optional] +**shared_with_accounts** | **List[str]** | A list of account group identifiers that the test is shared with (get `aid` from `/account-groups` endpoint). | [optional] + +## Example + +```python +from thousandeyes_sdk.instant_tests.models.instant_test_request_properties import InstantTestRequestProperties + +# TODO update the JSON string below +json = "{}" +# create an instance of InstantTestRequestProperties from a JSON string +instant_test_request_properties_instance = InstantTestRequestProperties.from_json(json) +# print the JSON string representation of the object +print(InstantTestRequestProperties.to_json()) + +# convert the object into a dict +instant_test_request_properties_dict = instant_test_request_properties_instance.to_dict() +# create an instance of InstantTestRequestProperties from a dict +instant_test_request_properties_from_dict = InstantTestRequestProperties.from_dict(instant_test_request_properties_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) + + diff --git a/thousandeyes-sdk-instant-tests/docs/PageLoadInstantTest.md b/thousandeyes-sdk-instant-tests/docs/PageLoadInstantTest.md index 9db82ca5c..bf21f99e0 100644 --- a/thousandeyes-sdk-instant-tests/docs/PageLoadInstantTest.md +++ b/thousandeyes-sdk-instant-tests/docs/PageLoadInstantTest.md @@ -20,7 +20,6 @@ Name | Type | Description | Notes **tags** | [**List[TestTag]**](TestTag.md) | Tags assigned to the test. Returned only when `expand=tag` is specified. This field is not returned for Instant Tests. For more information, see `/tags`. | [optional] [readonly] **shared_with_accounts** | [**List[SharedWithAccount]**](SharedWithAccount.md) | | [optional] [readonly] **auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] -**agent_interfaces** | [**AgentInterfaces**](AgentInterfaces.md) | | [optional] **bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] **client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] **content_regex** | **str** | Content regex, this field does not require escaping. | [optional] diff --git a/thousandeyes-sdk-instant-tests/docs/PageLoadInstantTestRequest.md b/thousandeyes-sdk-instant-tests/docs/PageLoadInstantTestRequest.md index 24ccf2ae9..cbbcb0efa 100644 --- a/thousandeyes-sdk-instant-tests/docs/PageLoadInstantTestRequest.md +++ b/thousandeyes-sdk-instant-tests/docs/PageLoadInstantTestRequest.md @@ -17,7 +17,6 @@ Name | Type | Description | Notes **type** | **str** | | [optional] [readonly] **links** | [**TestLinks**](TestLinks.md) | | [optional] **auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] -**agent_interfaces** | [**AgentInterfaces**](AgentInterfaces.md) | | [optional] **bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] **client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] **content_regex** | **str** | Content regex, this field does not require escaping. | [optional] @@ -69,7 +68,7 @@ Name | Type | Description | Notes **labels** | **List[str]** | A list of test label identifiers (get `labelId` from `/labels` endpoint). | [optional] **tags** | **List[str]** | A list of test tag identifiers (get `id` from `/tags` endpoint). | [optional] **shared_with_accounts** | **List[str]** | A list of account group identifiers that the test is shared with (get `aid` from `/account-groups` endpoint). | [optional] -**agents** | [**List[TestAgent]**](TestAgent.md) | A list of objects with `agentId` (required) and `sourceIpAddress` (optional). | +**agents** | [**List[TestAgent]**](TestAgent.md) | Agents assigned to the test. | ## Example diff --git a/thousandeyes-sdk-instant-tests/docs/PageLoadInstantTestResponse.md b/thousandeyes-sdk-instant-tests/docs/PageLoadInstantTestResponse.md index 0801826d1..05aa07c44 100644 --- a/thousandeyes-sdk-instant-tests/docs/PageLoadInstantTestResponse.md +++ b/thousandeyes-sdk-instant-tests/docs/PageLoadInstantTestResponse.md @@ -20,7 +20,6 @@ Name | Type | Description | Notes **tags** | [**List[TestTag]**](TestTag.md) | Tags assigned to the test. Returned only when `expand=tag` is specified. This field is not returned for Instant Tests. For more information, see `/tags`. | [optional] [readonly] **shared_with_accounts** | [**List[SharedWithAccount]**](SharedWithAccount.md) | | [optional] [readonly] **auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] -**agent_interfaces** | [**AgentInterfaces**](AgentInterfaces.md) | | [optional] **bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] **client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] **content_regex** | **str** | Content regex, this field does not require escaping. | [optional] diff --git a/thousandeyes-sdk-instant-tests/docs/PageLoadProperties.md b/thousandeyes-sdk-instant-tests/docs/PageLoadProperties.md index 218ab51ef..83de31052 100644 --- a/thousandeyes-sdk-instant-tests/docs/PageLoadProperties.md +++ b/thousandeyes-sdk-instant-tests/docs/PageLoadProperties.md @@ -6,7 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] -**agent_interfaces** | [**AgentInterfaces**](AgentInterfaces.md) | | [optional] **bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] **client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] **content_regex** | **str** | Content regex, this field does not require escaping. | [optional] diff --git a/thousandeyes-sdk-instant-tests/docs/SipServerInstantTestRequest.md b/thousandeyes-sdk-instant-tests/docs/SipServerInstantTestRequest.md index 160194239..cb3e47885 100644 --- a/thousandeyes-sdk-instant-tests/docs/SipServerInstantTestRequest.md +++ b/thousandeyes-sdk-instant-tests/docs/SipServerInstantTestRequest.md @@ -31,7 +31,7 @@ Name | Type | Description | Notes **labels** | **List[str]** | A list of test label identifiers (get `labelId` from `/labels` endpoint). | [optional] **tags** | **List[str]** | A list of test tag identifiers (get `id` from `/tags` endpoint). | [optional] **shared_with_accounts** | **List[str]** | A list of account group identifiers that the test is shared with (get `aid` from `/account-groups` endpoint). | [optional] -**agents** | [**List[TestAgent]**](TestAgent.md) | A list of objects with `agentId` (required) and `sourceIpAddress` (optional). | +**agents** | [**List[TestAgentWithSourceIpAddress]**](TestAgentWithSourceIpAddress.md) | Agents assigned to the test. To select a source interface, set `sourceIpAddress` on the same object as its `agentId`. | **target_sip_credentials** | [**TestSipCredentials**](TestSipCredentials.md) | | ## Example diff --git a/thousandeyes-sdk-instant-tests/docs/SourceInterfaceInstantTestRequest.md b/thousandeyes-sdk-instant-tests/docs/SourceInterfaceInstantTestRequest.md new file mode 100644 index 000000000..0bcd1b0e2 --- /dev/null +++ b/thousandeyes-sdk-instant-tests/docs/SourceInterfaceInstantTestRequest.md @@ -0,0 +1,32 @@ +# SourceInterfaceInstantTestRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**labels** | **List[str]** | A list of test label identifiers (get `labelId` from `/labels` endpoint). | [optional] +**tags** | **List[str]** | A list of test tag identifiers (get `id` from `/tags` endpoint). | [optional] +**shared_with_accounts** | **List[str]** | A list of account group identifiers that the test is shared with (get `aid` from `/account-groups` endpoint). | [optional] +**agents** | [**List[TestAgentWithSourceIpAddress]**](TestAgentWithSourceIpAddress.md) | Agents assigned to the test. To select a source interface, set `sourceIpAddress` on the same object as its `agentId`. | + +## Example + +```python +from thousandeyes_sdk.instant_tests.models.source_interface_instant_test_request import SourceInterfaceInstantTestRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of SourceInterfaceInstantTestRequest from a JSON string +source_interface_instant_test_request_instance = SourceInterfaceInstantTestRequest.from_json(json) +# print the JSON string representation of the object +print(SourceInterfaceInstantTestRequest.to_json()) + +# convert the object into a dict +source_interface_instant_test_request_dict = source_interface_instant_test_request_instance.to_dict() +# create an instance of SourceInterfaceInstantTestRequest from a dict +source_interface_instant_test_request_from_dict = SourceInterfaceInstantTestRequest.from_dict(source_interface_instant_test_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-instant-tests/docs/TestAgent.md b/thousandeyes-sdk-instant-tests/docs/TestAgent.md index 669dea7b1..354f17f8d 100644 --- a/thousandeyes-sdk-instant-tests/docs/TestAgent.md +++ b/thousandeyes-sdk-instant-tests/docs/TestAgent.md @@ -6,7 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **agent_id** | **str** | Identifier for the agent (get `agentId` from `/agents` endpoint). | [optional] -**source_ip_address** | **str** | IP address from the agent's `ipAddresses` field (get `ipAddresses` from `/agents` endpoint). Used for interface selection. | [optional] ## Example diff --git a/thousandeyes-sdk-instant-tests/docs/TestAgentWithSourceIpAddress.md b/thousandeyes-sdk-instant-tests/docs/TestAgentWithSourceIpAddress.md new file mode 100644 index 000000000..3ce287c43 --- /dev/null +++ b/thousandeyes-sdk-instant-tests/docs/TestAgentWithSourceIpAddress.md @@ -0,0 +1,30 @@ +# TestAgentWithSourceIpAddress + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**agent_id** | **str** | Identifier for the agent (get `agentId` from `/agents` endpoint). | [optional] +**source_ip_address** | **str** | The Enterprise Agent interface IP address to use as the source for the test. The address must be listed in the agent's `ipAddresses` field, available from the `/agents` endpoint. It is not supported for Cloud Agents or Enterprise Agent clusters. | [optional] + +## Example + +```python +from thousandeyes_sdk.instant_tests.models.test_agent_with_source_ip_address import TestAgentWithSourceIpAddress + +# TODO update the JSON string below +json = "{}" +# create an instance of TestAgentWithSourceIpAddress from a JSON string +test_agent_with_source_ip_address_instance = TestAgentWithSourceIpAddress.from_json(json) +# print the JSON string representation of the object +print(TestAgentWithSourceIpAddress.to_json()) + +# convert the object into a dict +test_agent_with_source_ip_address_dict = test_agent_with_source_ip_address_instance.to_dict() +# create an instance of TestAgentWithSourceIpAddress from a dict +test_agent_with_source_ip_address_from_dict = TestAgentWithSourceIpAddress.from_dict(test_agent_with_source_ip_address_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) + + diff --git a/thousandeyes-sdk-instant-tests/docs/VoiceInstantTestRequest.md b/thousandeyes-sdk-instant-tests/docs/VoiceInstantTestRequest.md index 6fc67da32..6f4a2e051 100644 --- a/thousandeyes-sdk-instant-tests/docs/VoiceInstantTestRequest.md +++ b/thousandeyes-sdk-instant-tests/docs/VoiceInstantTestRequest.md @@ -29,7 +29,7 @@ Name | Type | Description | Notes **labels** | **List[str]** | A list of test label identifiers (get `labelId` from `/labels` endpoint). | [optional] **tags** | **List[str]** | A list of test tag identifiers (get `id` from `/tags` endpoint). | [optional] **shared_with_accounts** | **List[str]** | A list of account group identifiers that the test is shared with (get `aid` from `/account-groups` endpoint). | [optional] -**agents** | [**List[TestAgent]**](TestAgent.md) | A list of objects with `agentId` (required) and `sourceIpAddress` (optional). | +**agents** | [**List[TestAgentWithSourceIpAddress]**](TestAgentWithSourceIpAddress.md) | Agents assigned to the test. To select a source interface, set `sourceIpAddress` on the same object as its `agentId`. | ## Example diff --git a/thousandeyes-sdk-instant-tests/docs/WebTransactionInstantTest.md b/thousandeyes-sdk-instant-tests/docs/WebTransactionInstantTest.md index be299c624..d763dbdc6 100644 --- a/thousandeyes-sdk-instant-tests/docs/WebTransactionInstantTest.md +++ b/thousandeyes-sdk-instant-tests/docs/WebTransactionInstantTest.md @@ -20,7 +20,6 @@ Name | Type | Description | Notes **tags** | [**List[TestTag]**](TestTag.md) | Tags assigned to the test. Returned only when `expand=tag` is specified. This field is not returned for Instant Tests. For more information, see `/tags`. | [optional] [readonly] **shared_with_accounts** | [**List[SharedWithAccount]**](SharedWithAccount.md) | | [optional] [readonly] **auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] -**agent_interfaces** | [**AgentInterfaces**](AgentInterfaces.md) | | [optional] **bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] **client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] **content_regex** | **str** | Content regex, this field does not require escaping. | [optional] diff --git a/thousandeyes-sdk-instant-tests/docs/WebTransactionInstantTestRequest.md b/thousandeyes-sdk-instant-tests/docs/WebTransactionInstantTestRequest.md index 7529a8d01..42d2330f4 100644 --- a/thousandeyes-sdk-instant-tests/docs/WebTransactionInstantTestRequest.md +++ b/thousandeyes-sdk-instant-tests/docs/WebTransactionInstantTestRequest.md @@ -17,7 +17,6 @@ Name | Type | Description | Notes **type** | **str** | | [optional] [readonly] **links** | [**TestLinks**](TestLinks.md) | | [optional] **auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] -**agent_interfaces** | [**AgentInterfaces**](AgentInterfaces.md) | | [optional] **bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] **client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] **content_regex** | **str** | Content regex, this field does not require escaping. | [optional] @@ -71,7 +70,7 @@ Name | Type | Description | Notes **labels** | **List[str]** | A list of test label identifiers (get `labelId` from `/labels` endpoint). | [optional] **tags** | **List[str]** | A list of test tag identifiers (get `id` from `/tags` endpoint). | [optional] **shared_with_accounts** | **List[str]** | A list of account group identifiers that the test is shared with (get `aid` from `/account-groups` endpoint). | [optional] -**agents** | [**List[TestAgent]**](TestAgent.md) | A list of objects with `agentId` (required) and `sourceIpAddress` (optional). | +**agents** | [**List[TestAgent]**](TestAgent.md) | Agents assigned to the test. | **credentials** | **List[str]** | Contains a list of credential IDs (get `credentialId` from `/credentials` endpoint). | [optional] ## Example diff --git a/thousandeyes-sdk-instant-tests/docs/WebTransactionInstantTestResponse.md b/thousandeyes-sdk-instant-tests/docs/WebTransactionInstantTestResponse.md index 288879981..ff4e8603d 100644 --- a/thousandeyes-sdk-instant-tests/docs/WebTransactionInstantTestResponse.md +++ b/thousandeyes-sdk-instant-tests/docs/WebTransactionInstantTestResponse.md @@ -20,7 +20,6 @@ Name | Type | Description | Notes **tags** | [**List[TestTag]**](TestTag.md) | Tags assigned to the test. Returned only when `expand=tag` is specified. This field is not returned for Instant Tests. For more information, see `/tags`. | [optional] [readonly] **shared_with_accounts** | [**List[SharedWithAccount]**](SharedWithAccount.md) | | [optional] [readonly] **auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] -**agent_interfaces** | [**AgentInterfaces**](AgentInterfaces.md) | | [optional] **bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] **client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] **content_regex** | **str** | Content regex, this field does not require escaping. | [optional] diff --git a/thousandeyes-sdk-instant-tests/docs/WebTransactionProperties.md b/thousandeyes-sdk-instant-tests/docs/WebTransactionProperties.md index 9c00341ad..0fc5209de 100644 --- a/thousandeyes-sdk-instant-tests/docs/WebTransactionProperties.md +++ b/thousandeyes-sdk-instant-tests/docs/WebTransactionProperties.md @@ -6,7 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] -**agent_interfaces** | [**AgentInterfaces**](AgentInterfaces.md) | | [optional] **bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] **client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] **content_regex** | **str** | Content regex, this field does not require escaping. | [optional] diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/__init__.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/__init__.py index f4245288c..75bc66efb 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/__init__.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/__init__.py @@ -31,7 +31,6 @@ # import models into sdk package from thousandeyes_sdk.instant_tests.models.agent_base import AgentBase -from thousandeyes_sdk.instant_tests.models.agent_interfaces import AgentInterfaces from thousandeyes_sdk.instant_tests.models.agent_response import AgentResponse from thousandeyes_sdk.instant_tests.models.agent_to_agent_instant_test import AgentToAgentInstantTest from thousandeyes_sdk.instant_tests.models.agent_to_agent_instant_test_request import AgentToAgentInstantTestRequest @@ -87,6 +86,7 @@ from thousandeyes_sdk.instant_tests.models.http_server_properties import HttpServerProperties from thousandeyes_sdk.instant_tests.models.instant_test import InstantTest from thousandeyes_sdk.instant_tests.models.instant_test_request import InstantTestRequest +from thousandeyes_sdk.instant_tests.models.instant_test_request_properties import InstantTestRequestProperties from thousandeyes_sdk.instant_tests.models.link import Link from thousandeyes_sdk.instant_tests.models.network_provider_info import NetworkProviderInfo from thousandeyes_sdk.instant_tests.models.network_provider_type import NetworkProviderType @@ -105,9 +105,11 @@ from thousandeyes_sdk.instant_tests.models.sip_server_instant_test_response import SipServerInstantTestResponse from thousandeyes_sdk.instant_tests.models.sip_server_properties import SipServerProperties from thousandeyes_sdk.instant_tests.models.sip_test_protocol import SipTestProtocol +from thousandeyes_sdk.instant_tests.models.source_interface_instant_test_request import SourceInterfaceInstantTestRequest from thousandeyes_sdk.instant_tests.models.test_agent import TestAgent from thousandeyes_sdk.instant_tests.models.test_agent_response import TestAgentResponse from thousandeyes_sdk.instant_tests.models.test_agent_response_properties import TestAgentResponseProperties +from thousandeyes_sdk.instant_tests.models.test_agent_with_source_ip_address import TestAgentWithSourceIpAddress from thousandeyes_sdk.instant_tests.models.test_auth_type import TestAuthType from thousandeyes_sdk.instant_tests.models.test_chromium_track import TestChromiumTrack from thousandeyes_sdk.instant_tests.models.test_custom_headers import TestCustomHeaders diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/__init__.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/__init__.py index d6b62d95e..c104ff74d 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/__init__.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/__init__.py @@ -14,7 +14,6 @@ # import models into model package from thousandeyes_sdk.instant_tests.models.agent_base import AgentBase -from thousandeyes_sdk.instant_tests.models.agent_interfaces import AgentInterfaces from thousandeyes_sdk.instant_tests.models.agent_response import AgentResponse from thousandeyes_sdk.instant_tests.models.agent_to_agent_instant_test import AgentToAgentInstantTest from thousandeyes_sdk.instant_tests.models.agent_to_agent_instant_test_request import AgentToAgentInstantTestRequest @@ -70,6 +69,7 @@ from thousandeyes_sdk.instant_tests.models.http_server_properties import HttpServerProperties from thousandeyes_sdk.instant_tests.models.instant_test import InstantTest from thousandeyes_sdk.instant_tests.models.instant_test_request import InstantTestRequest +from thousandeyes_sdk.instant_tests.models.instant_test_request_properties import InstantTestRequestProperties from thousandeyes_sdk.instant_tests.models.link import Link from thousandeyes_sdk.instant_tests.models.network_provider_info import NetworkProviderInfo from thousandeyes_sdk.instant_tests.models.network_provider_type import NetworkProviderType @@ -88,9 +88,11 @@ from thousandeyes_sdk.instant_tests.models.sip_server_instant_test_response import SipServerInstantTestResponse from thousandeyes_sdk.instant_tests.models.sip_server_properties import SipServerProperties from thousandeyes_sdk.instant_tests.models.sip_test_protocol import SipTestProtocol +from thousandeyes_sdk.instant_tests.models.source_interface_instant_test_request import SourceInterfaceInstantTestRequest from thousandeyes_sdk.instant_tests.models.test_agent import TestAgent from thousandeyes_sdk.instant_tests.models.test_agent_response import TestAgentResponse from thousandeyes_sdk.instant_tests.models.test_agent_response_properties import TestAgentResponseProperties +from thousandeyes_sdk.instant_tests.models.test_agent_with_source_ip_address import TestAgentWithSourceIpAddress from thousandeyes_sdk.instant_tests.models.test_auth_type import TestAuthType from thousandeyes_sdk.instant_tests.models.test_chromium_track import TestChromiumTrack from thousandeyes_sdk.instant_tests.models.test_custom_headers import TestCustomHeaders diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/agent_to_agent_instant_test_request.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/agent_to_agent_instant_test_request.py index 9c8b8635a..d3c17af9b 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/agent_to_agent_instant_test_request.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/agent_to_agent_instant_test_request.py @@ -21,7 +21,7 @@ from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated from thousandeyes_sdk.instant_tests.models.agent_to_agent_test_protocol import AgentToAgentTestProtocol -from thousandeyes_sdk.instant_tests.models.test_agent import TestAgent +from thousandeyes_sdk.instant_tests.models.test_agent_with_source_ip_address import TestAgentWithSourceIpAddress from thousandeyes_sdk.instant_tests.models.test_direction import TestDirection from thousandeyes_sdk.instant_tests.models.test_dscp_id import TestDscpId from thousandeyes_sdk.instant_tests.models.test_links import TestLinks @@ -61,7 +61,7 @@ class AgentToAgentInstantTestRequest(BaseModel): labels: Optional[List[StrictStr]] = Field(default=None, description="A list of test label identifiers (get `labelId` from `/labels` endpoint).") tags: Optional[List[StrictStr]] = Field(default=None, description="A list of test tag identifiers (get `id` from `/tags` endpoint).") shared_with_accounts: Optional[List[StrictStr]] = Field(default=None, description="A list of account group identifiers that the test is shared with (get `aid` from `/account-groups` endpoint).", alias="sharedWithAccounts") - agents: List[TestAgent] = Field(description="A list of objects with `agentId` (required) and `sourceIpAddress` (optional).") + agents: List[TestAgentWithSourceIpAddress] = Field(description="Agents assigned to the test. To select a source interface, set `sourceIpAddress` on the same object as its `agentId`.") __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "direction", "dscp", "dscpId", "mss", "numPathTraces", "pathTraceMode", "port", "protocol", "randomizedStartTime", "targetAgentId", "throughputMeasurements", "throughputDuration", "throughputRate", "fixedPacketRate", "labels", "tags", "sharedWithAccounts", "agents"] model_config = ConfigDict( @@ -172,7 +172,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "labels": obj.get("labels"), "tags": obj.get("tags"), "sharedWithAccounts": obj.get("sharedWithAccounts"), - "agents": [TestAgent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + "agents": [TestAgentWithSourceIpAddress.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None }) return _obj diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/agent_to_server_instant_test_request.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/agent_to_server_instant_test_request.py index a8cd6df0b..589806d25 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/agent_to_server_instant_test_request.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/agent_to_server_instant_test_request.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from thousandeyes_sdk.instant_tests.models.test_agent import TestAgent +from thousandeyes_sdk.instant_tests.models.test_agent_with_source_ip_address import TestAgentWithSourceIpAddress from thousandeyes_sdk.instant_tests.models.test_dscp_id import TestDscpId from thousandeyes_sdk.instant_tests.models.test_ipv6_policy import TestIpv6Policy from thousandeyes_sdk.instant_tests.models.test_links import TestLinks @@ -63,7 +63,7 @@ class AgentToServerInstantTestRequest(BaseModel): labels: Optional[List[StrictStr]] = Field(default=None, description="A list of test label identifiers (get `labelId` from `/labels` endpoint).") tags: Optional[List[StrictStr]] = Field(default=None, description="A list of test tag identifiers (get `id` from `/tags` endpoint).") shared_with_accounts: Optional[List[StrictStr]] = Field(default=None, description="A list of account group identifiers that the test is shared with (get `aid` from `/account-groups` endpoint).", alias="sharedWithAccounts") - agents: List[TestAgent] = Field(description="A list of objects with `agentId` (required) and `sourceIpAddress` (optional).") + agents: List[TestAgentWithSourceIpAddress] = Field(description="Agents assigned to the test. To select a source interface, set `sourceIpAddress` on the same object as its `agentId`.") __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "bandwidthMeasurements", "continuousMode", "fixedPacketRate", "mtuMeasurements", "numPathTraces", "pathTraceMode", "probeMode", "protocol", "randomizedStartTime", "server", "dscp", "dscpId", "ipv6Policy", "pingPayloadSize", "networkMeasurements", "labels", "tags", "sharedWithAccounts", "agents"] model_config = ConfigDict( @@ -175,7 +175,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "labels": obj.get("labels"), "tags": obj.get("tags"), "sharedWithAccounts": obj.get("sharedWithAccounts"), - "agents": [TestAgent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + "agents": [TestAgentWithSourceIpAddress.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None }) return _obj diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_instant_test_request.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_instant_test_request.py index 3ff158201..622b27124 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_instant_test_request.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_instant_test_request.py @@ -70,7 +70,7 @@ class ApiInstantTestRequest(BaseModel): labels: Optional[List[StrictStr]] = Field(default=None, description="A list of test label identifiers (get `labelId` from `/labels` endpoint).") tags: Optional[List[StrictStr]] = Field(default=None, description="A list of test tag identifiers (get `id` from `/tags` endpoint).") shared_with_accounts: Optional[List[StrictStr]] = Field(default=None, description="A list of account group identifiers that the test is shared with (get `aid` from `/account-groups` endpoint).", alias="sharedWithAccounts") - agents: List[TestAgent] = Field(description="A list of objects with `agentId` (required) and `sourceIpAddress` (optional).") + agents: List[TestAgent] = Field(description="Agents assigned to the test.") credentials: Optional[List[StrictStr]] = Field(default=None, description="Contains a list of credential IDs (get `credentialId` from `/credentials` endpoint).") vault_credentials: Optional[List[TestVaultCredential]] = Field(default=None, description="List of credential IDs that are stored in an external vault.", alias="vaultCredentials") __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "clientCertificate", "clientCertDomainsAllowList", "collectProxyNetworkData", "distributedTracing", "followRedirects", "mtuMeasurements", "networkMeasurements", "numPathTraces", "overrideAgentProxy", "overrideProxyId", "pathTraceMode", "predefinedVariables", "probeMode", "protocol", "randomizedStartTime", "requests", "sslVersionId", "targetTime", "timeLimit", "url", "labels", "tags", "sharedWithAccounts", "agents", "credentials", "vaultCredentials"] diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_sec_instant_test_request.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_sec_instant_test_request.py index 15e37bd15..8a3b8c22d 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_sec_instant_test_request.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_sec_instant_test_request.py @@ -46,7 +46,7 @@ class DnsSecInstantTestRequest(BaseModel): labels: Optional[List[StrictStr]] = Field(default=None, description="A list of test label identifiers (get `labelId` from `/labels` endpoint).") tags: Optional[List[StrictStr]] = Field(default=None, description="A list of test tag identifiers (get `id` from `/tags` endpoint).") shared_with_accounts: Optional[List[StrictStr]] = Field(default=None, description="A list of account group identifiers that the test is shared with (get `aid` from `/account-groups` endpoint).", alias="sharedWithAccounts") - agents: List[TestAgent] = Field(description="A list of objects with `agentId` (required) and `sourceIpAddress` (optional).") + agents: List[TestAgent] = Field(description="Agents assigned to the test.") __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "domain", "dnsQueryClass", "randomizedStartTime", "labels", "tags", "sharedWithAccounts", "agents"] model_config = ConfigDict( diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_server_instant_test_request.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_server_instant_test_request.py index f9f6ab114..aa33dad8f 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_server_instant_test_request.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_server_instant_test_request.py @@ -64,7 +64,7 @@ class DnsServerInstantTestRequest(BaseModel): labels: Optional[List[StrictStr]] = Field(default=None, description="A list of test label identifiers (get `labelId` from `/labels` endpoint).") tags: Optional[List[StrictStr]] = Field(default=None, description="A list of test tag identifiers (get `id` from `/tags` endpoint).") shared_with_accounts: Optional[List[StrictStr]] = Field(default=None, description="A list of account group identifiers that the test is shared with (get `aid` from `/account-groups` endpoint).", alias="sharedWithAccounts") - agents: List[TestAgent] = Field(description="A list of objects with `agentId` (required) and `sourceIpAddress` (optional).") + agents: List[TestAgent] = Field(description="Agents assigned to the test.") __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "bandwidthMeasurements", "dnsServers", "dnsTransportProtocol", "domain", "mtuMeasurements", "networkMeasurements", "numPathTraces", "pathTraceMode", "probeMode", "protocol", "randomizedStartTime", "recursiveQueries", "ipv6Policy", "fixedPacketRate", "dnsQueryClass", "labels", "tags", "sharedWithAccounts", "agents"] model_config = ConfigDict( diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_trace_instant_test_request.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_trace_instant_test_request.py index 0b0646feb..5a40141ae 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_trace_instant_test_request.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_trace_instant_test_request.py @@ -48,7 +48,7 @@ class DnsTraceInstantTestRequest(BaseModel): labels: Optional[List[StrictStr]] = Field(default=None, description="A list of test label identifiers (get `labelId` from `/labels` endpoint).") tags: Optional[List[StrictStr]] = Field(default=None, description="A list of test tag identifiers (get `id` from `/tags` endpoint).") shared_with_accounts: Optional[List[StrictStr]] = Field(default=None, description="A list of account group identifiers that the test is shared with (get `aid` from `/account-groups` endpoint).", alias="sharedWithAccounts") - agents: List[TestAgent] = Field(description="A list of objects with `agentId` (required) and `sourceIpAddress` (optional).") + agents: List[TestAgent] = Field(description="Agents assigned to the test.") __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "dnsTransportProtocol", "domain", "dnsQueryClass", "randomizedStartTime", "labels", "tags", "sharedWithAccounts", "agents"] model_config = ConfigDict( diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/ftp_server_instant_test_request.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/ftp_server_instant_test_request.py index 519426242..1a3cc69d7 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/ftp_server_instant_test_request.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/ftp_server_instant_test_request.py @@ -21,7 +21,7 @@ from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated from thousandeyes_sdk.instant_tests.models.ftp_server_request_type import FtpServerRequestType -from thousandeyes_sdk.instant_tests.models.test_agent import TestAgent +from thousandeyes_sdk.instant_tests.models.test_agent_with_source_ip_address import TestAgentWithSourceIpAddress from thousandeyes_sdk.instant_tests.models.test_ipv6_policy import TestIpv6Policy from thousandeyes_sdk.instant_tests.models.test_links import TestLinks from thousandeyes_sdk.instant_tests.models.test_path_trace_mode import TestPathTraceMode @@ -67,7 +67,7 @@ class FtpServerInstantTestRequest(BaseModel): labels: Optional[List[StrictStr]] = Field(default=None, description="A list of test label identifiers (get `labelId` from `/labels` endpoint).") tags: Optional[List[StrictStr]] = Field(default=None, description="A list of test tag identifiers (get `id` from `/tags` endpoint).") shared_with_accounts: Optional[List[StrictStr]] = Field(default=None, description="A list of account group identifiers that the test is shared with (get `aid` from `/account-groups` endpoint).", alias="sharedWithAccounts") - agents: List[TestAgent] = Field(description="A list of objects with `agentId` (required) and `sourceIpAddress` (optional).") + agents: List[TestAgentWithSourceIpAddress] = Field(description="Agents assigned to the test. To select a source interface, set `sourceIpAddress` on the same object as its `agentId`.") __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "bandwidthMeasurements", "downloadLimit", "ftpTargetTime", "ftpTimeLimit", "mtuMeasurements", "networkMeasurements", "numPathTraces", "password", "pathTraceMode", "probeMode", "protocol", "randomizedStartTime", "requestType", "url", "useActiveFtp", "useExplicitFtps", "username", "fixedPacketRate", "ipv6Policy", "labels", "tags", "sharedWithAccounts", "agents"] model_config = ConfigDict( @@ -181,7 +181,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "labels": obj.get("labels"), "tags": obj.get("tags"), "sharedWithAccounts": obj.get("sharedWithAccounts"), - "agents": [TestAgent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + "agents": [TestAgentWithSourceIpAddress.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None }) return _obj diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/http_server_base_properties.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/http_server_base_properties.py index ca4f02aea..83cbbfb7b 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/http_server_base_properties.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/http_server_base_properties.py @@ -19,7 +19,6 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from thousandeyes_sdk.instant_tests.models.agent_interfaces import AgentInterfaces from thousandeyes_sdk.instant_tests.models.o_auth import OAuth from thousandeyes_sdk.instant_tests.models.test_auth_type import TestAuthType from thousandeyes_sdk.instant_tests.models.test_custom_headers import TestCustomHeaders @@ -36,7 +35,6 @@ class HttpServerBaseProperties(BaseModel): HttpServerBaseProperties """ # noqa: E501 auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") - agent_interfaces: Optional[AgentInterfaces] = Field(default=None, alias="agentInterfaces") bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") content_regex: Optional[StrictStr] = Field(default=None, description="Content regex, this field does not require escaping.", alias="contentRegex") @@ -71,7 +69,7 @@ class HttpServerBaseProperties(BaseModel): override_proxy_id: Optional[StrictStr] = Field(default=None, description="ID of the proxy to be used if the default proxy is overridden.", alias="overrideProxyId") collect_proxy_network_data: Optional[StrictBool] = Field(default=False, description="Indicates whether network data to the proxy should be collected.", alias="collectProxyNetworkData") vault_credentials: Optional[List[TestVaultCredential]] = Field(default=None, description="List of credential IDs that are stored in an external vault.", alias="vaultCredentials") - __properties: ClassVar[List[str]] = ["authType", "agentInterfaces", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials"] + __properties: ClassVar[List[str]] = ["authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials"] model_config = ConfigDict( populate_by_name=True, @@ -115,9 +113,6 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of agent_interfaces - if self.agent_interfaces: - _dict['agentInterfaces'] = self.agent_interfaces.to_dict() # override the default output from pydantic by calling `to_dict()` of custom_headers if self.custom_headers: _dict['customHeaders'] = self.custom_headers.to_dict() @@ -144,7 +139,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "authType": obj.get("authType"), - "agentInterfaces": AgentInterfaces.from_dict(obj["agentInterfaces"]) if obj.get("agentInterfaces") is not None else None, "bandwidthMeasurements": obj.get("bandwidthMeasurements"), "clientCertificate": obj.get("clientCertificate"), "contentRegex": obj.get("contentRegex"), diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/http_server_instant_test.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/http_server_instant_test.py index 1bddeca47..d3d33b983 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/http_server_instant_test.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/http_server_instant_test.py @@ -20,7 +20,6 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from thousandeyes_sdk.instant_tests.models.agent_interfaces import AgentInterfaces from thousandeyes_sdk.instant_tests.models.o_auth import OAuth from thousandeyes_sdk.instant_tests.models.request_method import RequestMethod from thousandeyes_sdk.instant_tests.models.shared_with_account import SharedWithAccount @@ -57,7 +56,6 @@ class HttpServerInstantTest(BaseModel): tags: Optional[List[TestTag]] = Field(default=None, description="Tags assigned to the test. Returned only when `expand=tag` is specified. This field is not returned for Instant Tests. For more information, see `/tags`.") shared_with_accounts: Optional[List[SharedWithAccount]] = Field(default=None, alias="sharedWithAccounts") auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") - agent_interfaces: Optional[AgentInterfaces] = Field(default=None, alias="agentInterfaces") bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") content_regex: Optional[StrictStr] = Field(default=None, description="Content regex, this field does not require escaping.", alias="contentRegex") @@ -97,7 +95,7 @@ class HttpServerInstantTest(BaseModel): request_method: Optional[RequestMethod] = Field(default=None, alias="requestMethod") post_body: Optional[StrictStr] = Field(default=None, description="Enter the body for the HTTP POST request in this field. No special escaping is required. If content is provided and `requestMethod` is not specified, `requestMethod` is automatically set to `post`.", alias="postBody") ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "tags", "sharedWithAccounts", "authType", "agentInterfaces", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "headers", "randomizedStartTime", "requestMethod", "postBody", "ipv6Policy"] + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "tags", "sharedWithAccounts", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "headers", "randomizedStartTime", "requestMethod", "postBody", "ipv6Policy"] model_config = ConfigDict( populate_by_name=True, @@ -187,9 +185,6 @@ def to_dict(self) -> Dict[str, Any]: if _item: _items.append(_item.to_dict()) _dict['sharedWithAccounts'] = _items - # override the default output from pydantic by calling `to_dict()` of agent_interfaces - if self.agent_interfaces: - _dict['agentInterfaces'] = self.agent_interfaces.to_dict() # override the default output from pydantic by calling `to_dict()` of custom_headers if self.custom_headers: _dict['customHeaders'] = self.custom_headers.to_dict() @@ -230,7 +225,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "tags": [TestTag.from_dict(_item) for _item in obj["tags"]] if obj.get("tags") is not None else None, "sharedWithAccounts": [SharedWithAccount.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None, "authType": obj.get("authType"), - "agentInterfaces": AgentInterfaces.from_dict(obj["agentInterfaces"]) if obj.get("agentInterfaces") is not None else None, "bandwidthMeasurements": obj.get("bandwidthMeasurements"), "clientCertificate": obj.get("clientCertificate"), "contentRegex": obj.get("contentRegex"), diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/http_server_instant_test_request.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/http_server_instant_test_request.py index fe25eaa40..2e1a09524 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/http_server_instant_test_request.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/http_server_instant_test_request.py @@ -20,10 +20,9 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from thousandeyes_sdk.instant_tests.models.agent_interfaces import AgentInterfaces from thousandeyes_sdk.instant_tests.models.o_auth import OAuth from thousandeyes_sdk.instant_tests.models.request_method import RequestMethod -from thousandeyes_sdk.instant_tests.models.test_agent import TestAgent +from thousandeyes_sdk.instant_tests.models.test_agent_with_source_ip_address import TestAgentWithSourceIpAddress from thousandeyes_sdk.instant_tests.models.test_auth_type import TestAuthType from thousandeyes_sdk.instant_tests.models.test_custom_headers import TestCustomHeaders from thousandeyes_sdk.instant_tests.models.test_ipv6_policy import TestIpv6Policy @@ -52,7 +51,6 @@ class HttpServerInstantTestRequest(BaseModel): type: Optional[StrictStr] = None links: Optional[TestLinks] = Field(default=None, alias="_links") auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") - agent_interfaces: Optional[AgentInterfaces] = Field(default=None, alias="agentInterfaces") bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") content_regex: Optional[StrictStr] = Field(default=None, description="Content regex, this field does not require escaping.", alias="contentRegex") @@ -95,8 +93,8 @@ class HttpServerInstantTestRequest(BaseModel): labels: Optional[List[StrictStr]] = Field(default=None, description="A list of test label identifiers (get `labelId` from `/labels` endpoint).") tags: Optional[List[StrictStr]] = Field(default=None, description="A list of test tag identifiers (get `id` from `/tags` endpoint).") shared_with_accounts: Optional[List[StrictStr]] = Field(default=None, description="A list of account group identifiers that the test is shared with (get `aid` from `/account-groups` endpoint).", alias="sharedWithAccounts") - agents: List[TestAgent] = Field(description="A list of objects with `agentId` (required) and `sourceIpAddress` (optional).") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "authType", "agentInterfaces", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "headers", "randomizedStartTime", "requestMethod", "postBody", "ipv6Policy", "labels", "tags", "sharedWithAccounts", "agents"] + agents: List[TestAgentWithSourceIpAddress] = Field(description="Agents assigned to the test. To select a source interface, set `sourceIpAddress` on the same object as its `agentId`.") + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "headers", "randomizedStartTime", "requestMethod", "postBody", "ipv6Policy", "labels", "tags", "sharedWithAccounts", "agents"] model_config = ConfigDict( populate_by_name=True, @@ -159,9 +157,6 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of links if self.links: _dict['_links'] = self.links.to_dict() - # override the default output from pydantic by calling `to_dict()` of agent_interfaces - if self.agent_interfaces: - _dict['agentInterfaces'] = self.agent_interfaces.to_dict() # override the default output from pydantic by calling `to_dict()` of custom_headers if self.custom_headers: _dict['customHeaders'] = self.custom_headers.to_dict() @@ -206,7 +201,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "type": obj.get("type"), "_links": TestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, "authType": obj.get("authType"), - "agentInterfaces": AgentInterfaces.from_dict(obj["agentInterfaces"]) if obj.get("agentInterfaces") is not None else None, "bandwidthMeasurements": obj.get("bandwidthMeasurements"), "clientCertificate": obj.get("clientCertificate"), "contentRegex": obj.get("contentRegex"), @@ -249,7 +243,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "labels": obj.get("labels"), "tags": obj.get("tags"), "sharedWithAccounts": obj.get("sharedWithAccounts"), - "agents": [TestAgent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + "agents": [TestAgentWithSourceIpAddress.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None }) return _obj diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/http_server_instant_test_response.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/http_server_instant_test_response.py index 0ffb1ce02..4bdadfc4a 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/http_server_instant_test_response.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/http_server_instant_test_response.py @@ -20,7 +20,6 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from thousandeyes_sdk.instant_tests.models.agent_interfaces import AgentInterfaces from thousandeyes_sdk.instant_tests.models.o_auth import OAuth from thousandeyes_sdk.instant_tests.models.request_method import RequestMethod from thousandeyes_sdk.instant_tests.models.shared_with_account import SharedWithAccount @@ -58,7 +57,6 @@ class HttpServerInstantTestResponse(BaseModel): tags: Optional[List[TestTag]] = Field(default=None, description="Tags assigned to the test. Returned only when `expand=tag` is specified. This field is not returned for Instant Tests. For more information, see `/tags`.") shared_with_accounts: Optional[List[SharedWithAccount]] = Field(default=None, alias="sharedWithAccounts") auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") - agent_interfaces: Optional[AgentInterfaces] = Field(default=None, alias="agentInterfaces") bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") content_regex: Optional[StrictStr] = Field(default=None, description="Content regex, this field does not require escaping.", alias="contentRegex") @@ -99,7 +97,7 @@ class HttpServerInstantTestResponse(BaseModel): post_body: Optional[StrictStr] = Field(default=None, description="Enter the body for the HTTP POST request in this field. No special escaping is required. If content is provided and `requestMethod` is not specified, `requestMethod` is automatically set to `post`.", alias="postBody") ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") agents: Optional[List[TestAgentResponse]] = Field(default=None, description="Contains list of agents.") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "tags", "sharedWithAccounts", "authType", "agentInterfaces", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "headers", "randomizedStartTime", "requestMethod", "postBody", "ipv6Policy", "agents"] + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "tags", "sharedWithAccounts", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "headers", "randomizedStartTime", "requestMethod", "postBody", "ipv6Policy", "agents"] model_config = ConfigDict( populate_by_name=True, @@ -189,9 +187,6 @@ def to_dict(self) -> Dict[str, Any]: if _item: _items.append(_item.to_dict()) _dict['sharedWithAccounts'] = _items - # override the default output from pydantic by calling `to_dict()` of agent_interfaces - if self.agent_interfaces: - _dict['agentInterfaces'] = self.agent_interfaces.to_dict() # override the default output from pydantic by calling `to_dict()` of custom_headers if self.custom_headers: _dict['customHeaders'] = self.custom_headers.to_dict() @@ -239,7 +234,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "tags": [TestTag.from_dict(_item) for _item in obj["tags"]] if obj.get("tags") is not None else None, "sharedWithAccounts": [SharedWithAccount.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None, "authType": obj.get("authType"), - "agentInterfaces": AgentInterfaces.from_dict(obj["agentInterfaces"]) if obj.get("agentInterfaces") is not None else None, "bandwidthMeasurements": obj.get("bandwidthMeasurements"), "clientCertificate": obj.get("clientCertificate"), "contentRegex": obj.get("contentRegex"), diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/http_server_properties.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/http_server_properties.py index 70b97baa8..f1055e6c3 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/http_server_properties.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/http_server_properties.py @@ -19,7 +19,6 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from thousandeyes_sdk.instant_tests.models.agent_interfaces import AgentInterfaces from thousandeyes_sdk.instant_tests.models.o_auth import OAuth from thousandeyes_sdk.instant_tests.models.request_method import RequestMethod from thousandeyes_sdk.instant_tests.models.test_auth_type import TestAuthType @@ -38,7 +37,6 @@ class HttpServerProperties(BaseModel): HttpServerProperties """ # noqa: E501 auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") - agent_interfaces: Optional[AgentInterfaces] = Field(default=None, alias="agentInterfaces") bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") content_regex: Optional[StrictStr] = Field(default=None, description="Content regex, this field does not require escaping.", alias="contentRegex") @@ -79,7 +77,7 @@ class HttpServerProperties(BaseModel): post_body: Optional[StrictStr] = Field(default=None, description="Enter the body for the HTTP POST request in this field. No special escaping is required. If content is provided and `requestMethod` is not specified, `requestMethod` is automatically set to `post`.", alias="postBody") ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") type: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["authType", "agentInterfaces", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "headers", "randomizedStartTime", "requestMethod", "postBody", "ipv6Policy", "type"] + __properties: ClassVar[List[str]] = ["authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "headers", "randomizedStartTime", "requestMethod", "postBody", "ipv6Policy", "type"] model_config = ConfigDict( populate_by_name=True, @@ -125,9 +123,6 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of agent_interfaces - if self.agent_interfaces: - _dict['agentInterfaces'] = self.agent_interfaces.to_dict() # override the default output from pydantic by calling `to_dict()` of custom_headers if self.custom_headers: _dict['customHeaders'] = self.custom_headers.to_dict() @@ -154,7 +149,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "authType": obj.get("authType"), - "agentInterfaces": AgentInterfaces.from_dict(obj["agentInterfaces"]) if obj.get("agentInterfaces") is not None else None, "bandwidthMeasurements": obj.get("bandwidthMeasurements"), "clientCertificate": obj.get("clientCertificate"), "contentRegex": obj.get("contentRegex"), diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/instant_test_request.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/instant_test_request.py index fc70b3521..8c237f630 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/instant_test_request.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/instant_test_request.py @@ -29,7 +29,7 @@ class InstantTestRequest(BaseModel): labels: Optional[List[StrictStr]] = Field(default=None, description="A list of test label identifiers (get `labelId` from `/labels` endpoint).") tags: Optional[List[StrictStr]] = Field(default=None, description="A list of test tag identifiers (get `id` from `/tags` endpoint).") shared_with_accounts: Optional[List[StrictStr]] = Field(default=None, description="A list of account group identifiers that the test is shared with (get `aid` from `/account-groups` endpoint).", alias="sharedWithAccounts") - agents: List[TestAgent] = Field(description="A list of objects with `agentId` (required) and `sourceIpAddress` (optional).") + agents: List[TestAgent] = Field(description="Agents assigned to the test.") __properties: ClassVar[List[str]] = ["labels", "tags", "sharedWithAccounts", "agents"] model_config = ConfigDict( diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/instant_test_request_properties.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/instant_test_request_properties.py new file mode 100644 index 000000000..275716a39 --- /dev/null +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/instant_test_request_properties.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Instant Tests API + + The Instant Tests API operations lets you create and run new instant tests. You will need to be an Account Admin. The response does not include the immediate test results. Use the Test Results endpoints to get test results after creating and executing an instant test. You can find the URLs for these endpoints in the _links section of the test definition that is returned when you create the instant test. + + 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 InstantTestRequestProperties(BaseModel): + """ + InstantTestRequestProperties + """ # noqa: E501 + labels: Optional[List[StrictStr]] = Field(default=None, description="A list of test label identifiers (get `labelId` from `/labels` endpoint).") + tags: Optional[List[StrictStr]] = Field(default=None, description="A list of test tag identifiers (get `id` from `/tags` endpoint).") + shared_with_accounts: Optional[List[StrictStr]] = Field(default=None, description="A list of account group identifiers that the test is shared with (get `aid` from `/account-groups` endpoint).", alias="sharedWithAccounts") + __properties: ClassVar[List[str]] = ["labels", "tags", "sharedWithAccounts"] + + 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 InstantTestRequestProperties 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 InstantTestRequestProperties from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "labels": obj.get("labels"), + "tags": obj.get("tags"), + "sharedWithAccounts": obj.get("sharedWithAccounts") + }) + return _obj + + diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/page_load_instant_test.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/page_load_instant_test.py index 2809f8bad..31dac8034 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/page_load_instant_test.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/page_load_instant_test.py @@ -20,7 +20,6 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from thousandeyes_sdk.instant_tests.models.agent_interfaces import AgentInterfaces from thousandeyes_sdk.instant_tests.models.o_auth import OAuth from thousandeyes_sdk.instant_tests.models.shared_with_account import SharedWithAccount from thousandeyes_sdk.instant_tests.models.test_auth_type import TestAuthType @@ -57,7 +56,6 @@ class PageLoadInstantTest(BaseModel): tags: Optional[List[TestTag]] = Field(default=None, description="Tags assigned to the test. Returned only when `expand=tag` is specified. This field is not returned for Instant Tests. For more information, see `/tags`.") shared_with_accounts: Optional[List[SharedWithAccount]] = Field(default=None, alias="sharedWithAccounts") auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") - agent_interfaces: Optional[AgentInterfaces] = Field(default=None, alias="agentInterfaces") bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") content_regex: Optional[StrictStr] = Field(default=None, description="Content regex, this field does not require escaping.", alias="contentRegex") @@ -106,7 +104,7 @@ class PageLoadInstantTest(BaseModel): page_loading_strategy: Optional[TestPageLoadingStrategy] = Field(default=None, alias="pageLoadingStrategy") randomized_start_time: Optional[StrictBool] = Field(default=False, description="Indicates whether agents should randomize the start time in each test round.", alias="randomizedStartTime") identify_agent_traffic_with_user_agent: Optional[StrictBool] = Field(default=False, description="Determines how agent traffic is identified: * `false`: Adds the `x-thousandeyes-agent: yes` header. * `true`: Appends `(ThousandEyes Agent)` to the `user-agent` header. For more information, see [Notes on Agent ID Strategy](https://docs.thousandeyes.com/product-documentation/browser-synthetics/test-settings-page-load-transaction#notes-on-agent-id-strategy). ", alias="identifyAgentTrafficWithUserAgent") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "tags", "sharedWithAccounts", "authType", "agentInterfaces", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "emulatedDeviceId", "pageLoadTargetTime", "pageLoadTimeLimit", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "chromeOptions", "chromePolicies", "chromiumTrack", "pageLoadingStrategy", "randomizedStartTime", "identifyAgentTrafficWithUserAgent"] + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "tags", "sharedWithAccounts", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "emulatedDeviceId", "pageLoadTargetTime", "pageLoadTimeLimit", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "chromeOptions", "chromePolicies", "chromiumTrack", "pageLoadingStrategy", "randomizedStartTime", "identifyAgentTrafficWithUserAgent"] model_config = ConfigDict( populate_by_name=True, @@ -196,9 +194,6 @@ def to_dict(self) -> Dict[str, Any]: if _item: _items.append(_item.to_dict()) _dict['sharedWithAccounts'] = _items - # override the default output from pydantic by calling `to_dict()` of agent_interfaces - if self.agent_interfaces: - _dict['agentInterfaces'] = self.agent_interfaces.to_dict() # override the default output from pydantic by calling `to_dict()` of custom_headers if self.custom_headers: _dict['customHeaders'] = self.custom_headers.to_dict() @@ -239,7 +234,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "tags": [TestTag.from_dict(_item) for _item in obj["tags"]] if obj.get("tags") is not None else None, "sharedWithAccounts": [SharedWithAccount.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None, "authType": obj.get("authType"), - "agentInterfaces": AgentInterfaces.from_dict(obj["agentInterfaces"]) if obj.get("agentInterfaces") is not None else None, "bandwidthMeasurements": obj.get("bandwidthMeasurements"), "clientCertificate": obj.get("clientCertificate"), "contentRegex": obj.get("contentRegex"), diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/page_load_instant_test_request.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/page_load_instant_test_request.py index 169ef846c..0ba2c1a3c 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/page_load_instant_test_request.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/page_load_instant_test_request.py @@ -20,7 +20,6 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from thousandeyes_sdk.instant_tests.models.agent_interfaces import AgentInterfaces from thousandeyes_sdk.instant_tests.models.o_auth import OAuth from thousandeyes_sdk.instant_tests.models.test_agent import TestAgent from thousandeyes_sdk.instant_tests.models.test_auth_type import TestAuthType @@ -52,7 +51,6 @@ class PageLoadInstantTestRequest(BaseModel): type: Optional[StrictStr] = None links: Optional[TestLinks] = Field(default=None, alias="_links") auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") - agent_interfaces: Optional[AgentInterfaces] = Field(default=None, alias="agentInterfaces") bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") content_regex: Optional[StrictStr] = Field(default=None, description="Content regex, this field does not require escaping.", alias="contentRegex") @@ -104,8 +102,8 @@ class PageLoadInstantTestRequest(BaseModel): labels: Optional[List[StrictStr]] = Field(default=None, description="A list of test label identifiers (get `labelId` from `/labels` endpoint).") tags: Optional[List[StrictStr]] = Field(default=None, description="A list of test tag identifiers (get `id` from `/tags` endpoint).") shared_with_accounts: Optional[List[StrictStr]] = Field(default=None, description="A list of account group identifiers that the test is shared with (get `aid` from `/account-groups` endpoint).", alias="sharedWithAccounts") - agents: List[TestAgent] = Field(description="A list of objects with `agentId` (required) and `sourceIpAddress` (optional).") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "authType", "agentInterfaces", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "emulatedDeviceId", "pageLoadTargetTime", "pageLoadTimeLimit", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "chromeOptions", "chromePolicies", "chromiumTrack", "pageLoadingStrategy", "randomizedStartTime", "identifyAgentTrafficWithUserAgent", "labels", "tags", "sharedWithAccounts", "agents"] + agents: List[TestAgent] = Field(description="Agents assigned to the test.") + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "emulatedDeviceId", "pageLoadTargetTime", "pageLoadTimeLimit", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "chromeOptions", "chromePolicies", "chromiumTrack", "pageLoadingStrategy", "randomizedStartTime", "identifyAgentTrafficWithUserAgent", "labels", "tags", "sharedWithAccounts", "agents"] model_config = ConfigDict( populate_by_name=True, @@ -168,9 +166,6 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of links if self.links: _dict['_links'] = self.links.to_dict() - # override the default output from pydantic by calling `to_dict()` of agent_interfaces - if self.agent_interfaces: - _dict['agentInterfaces'] = self.agent_interfaces.to_dict() # override the default output from pydantic by calling `to_dict()` of custom_headers if self.custom_headers: _dict['customHeaders'] = self.custom_headers.to_dict() @@ -215,7 +210,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "type": obj.get("type"), "_links": TestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, "authType": obj.get("authType"), - "agentInterfaces": AgentInterfaces.from_dict(obj["agentInterfaces"]) if obj.get("agentInterfaces") is not None else None, "bandwidthMeasurements": obj.get("bandwidthMeasurements"), "clientCertificate": obj.get("clientCertificate"), "contentRegex": obj.get("contentRegex"), diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/page_load_instant_test_response.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/page_load_instant_test_response.py index 52cf0ad44..65548b8ae 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/page_load_instant_test_response.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/page_load_instant_test_response.py @@ -20,7 +20,6 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from thousandeyes_sdk.instant_tests.models.agent_interfaces import AgentInterfaces from thousandeyes_sdk.instant_tests.models.o_auth import OAuth from thousandeyes_sdk.instant_tests.models.shared_with_account import SharedWithAccount from thousandeyes_sdk.instant_tests.models.test_agent_response import TestAgentResponse @@ -58,7 +57,6 @@ class PageLoadInstantTestResponse(BaseModel): tags: Optional[List[TestTag]] = Field(default=None, description="Tags assigned to the test. Returned only when `expand=tag` is specified. This field is not returned for Instant Tests. For more information, see `/tags`.") shared_with_accounts: Optional[List[SharedWithAccount]] = Field(default=None, alias="sharedWithAccounts") auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") - agent_interfaces: Optional[AgentInterfaces] = Field(default=None, alias="agentInterfaces") bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") content_regex: Optional[StrictStr] = Field(default=None, description="Content regex, this field does not require escaping.", alias="contentRegex") @@ -108,7 +106,7 @@ class PageLoadInstantTestResponse(BaseModel): randomized_start_time: Optional[StrictBool] = Field(default=False, description="Indicates whether agents should randomize the start time in each test round.", alias="randomizedStartTime") identify_agent_traffic_with_user_agent: Optional[StrictBool] = Field(default=False, description="Determines how agent traffic is identified: * `false`: Adds the `x-thousandeyes-agent: yes` header. * `true`: Appends `(ThousandEyes Agent)` to the `user-agent` header. For more information, see [Notes on Agent ID Strategy](https://docs.thousandeyes.com/product-documentation/browser-synthetics/test-settings-page-load-transaction#notes-on-agent-id-strategy). ", alias="identifyAgentTrafficWithUserAgent") agents: Optional[List[TestAgentResponse]] = Field(default=None, description="Contains list of agents.") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "tags", "sharedWithAccounts", "authType", "agentInterfaces", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "emulatedDeviceId", "pageLoadTargetTime", "pageLoadTimeLimit", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "chromeOptions", "chromePolicies", "chromiumTrack", "pageLoadingStrategy", "randomizedStartTime", "identifyAgentTrafficWithUserAgent", "agents"] + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "tags", "sharedWithAccounts", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "emulatedDeviceId", "pageLoadTargetTime", "pageLoadTimeLimit", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "chromeOptions", "chromePolicies", "chromiumTrack", "pageLoadingStrategy", "randomizedStartTime", "identifyAgentTrafficWithUserAgent", "agents"] model_config = ConfigDict( populate_by_name=True, @@ -198,9 +196,6 @@ def to_dict(self) -> Dict[str, Any]: if _item: _items.append(_item.to_dict()) _dict['sharedWithAccounts'] = _items - # override the default output from pydantic by calling `to_dict()` of agent_interfaces - if self.agent_interfaces: - _dict['agentInterfaces'] = self.agent_interfaces.to_dict() # override the default output from pydantic by calling `to_dict()` of custom_headers if self.custom_headers: _dict['customHeaders'] = self.custom_headers.to_dict() @@ -248,7 +243,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "tags": [TestTag.from_dict(_item) for _item in obj["tags"]] if obj.get("tags") is not None else None, "sharedWithAccounts": [SharedWithAccount.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None, "authType": obj.get("authType"), - "agentInterfaces": AgentInterfaces.from_dict(obj["agentInterfaces"]) if obj.get("agentInterfaces") is not None else None, "bandwidthMeasurements": obj.get("bandwidthMeasurements"), "clientCertificate": obj.get("clientCertificate"), "contentRegex": obj.get("contentRegex"), diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/page_load_properties.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/page_load_properties.py index 44b160e32..f5fcd166a 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/page_load_properties.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/page_load_properties.py @@ -19,7 +19,6 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from thousandeyes_sdk.instant_tests.models.agent_interfaces import AgentInterfaces from thousandeyes_sdk.instant_tests.models.o_auth import OAuth from thousandeyes_sdk.instant_tests.models.test_auth_type import TestAuthType from thousandeyes_sdk.instant_tests.models.test_chromium_track import TestChromiumTrack @@ -38,7 +37,6 @@ class PageLoadProperties(BaseModel): PageLoadProperties """ # noqa: E501 auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") - agent_interfaces: Optional[AgentInterfaces] = Field(default=None, alias="agentInterfaces") bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") content_regex: Optional[StrictStr] = Field(default=None, description="Content regex, this field does not require escaping.", alias="contentRegex") @@ -88,7 +86,7 @@ class PageLoadProperties(BaseModel): randomized_start_time: Optional[StrictBool] = Field(default=False, description="Indicates whether agents should randomize the start time in each test round.", alias="randomizedStartTime") type: Optional[StrictStr] = None identify_agent_traffic_with_user_agent: Optional[StrictBool] = Field(default=False, description="Determines how agent traffic is identified: * `false`: Adds the `x-thousandeyes-agent: yes` header. * `true`: Appends `(ThousandEyes Agent)` to the `user-agent` header. For more information, see [Notes on Agent ID Strategy](https://docs.thousandeyes.com/product-documentation/browser-synthetics/test-settings-page-load-transaction#notes-on-agent-id-strategy). ", alias="identifyAgentTrafficWithUserAgent") - __properties: ClassVar[List[str]] = ["authType", "agentInterfaces", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "emulatedDeviceId", "pageLoadTargetTime", "pageLoadTimeLimit", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "chromeOptions", "chromePolicies", "chromiumTrack", "pageLoadingStrategy", "randomizedStartTime", "type", "identifyAgentTrafficWithUserAgent"] + __properties: ClassVar[List[str]] = ["authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "emulatedDeviceId", "pageLoadTargetTime", "pageLoadTimeLimit", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "chromeOptions", "chromePolicies", "chromiumTrack", "pageLoadingStrategy", "randomizedStartTime", "type", "identifyAgentTrafficWithUserAgent"] model_config = ConfigDict( populate_by_name=True, @@ -134,9 +132,6 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of agent_interfaces - if self.agent_interfaces: - _dict['agentInterfaces'] = self.agent_interfaces.to_dict() # override the default output from pydantic by calling `to_dict()` of custom_headers if self.custom_headers: _dict['customHeaders'] = self.custom_headers.to_dict() @@ -163,7 +158,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "authType": obj.get("authType"), - "agentInterfaces": AgentInterfaces.from_dict(obj["agentInterfaces"]) if obj.get("agentInterfaces") is not None else None, "bandwidthMeasurements": obj.get("bandwidthMeasurements"), "clientCertificate": obj.get("clientCertificate"), "contentRegex": obj.get("contentRegex"), diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/sip_server_instant_test_request.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/sip_server_instant_test_request.py index 9e0c54d16..6d3f6d977 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/sip_server_instant_test_request.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/sip_server_instant_test_request.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from thousandeyes_sdk.instant_tests.models.test_agent import TestAgent +from thousandeyes_sdk.instant_tests.models.test_agent_with_source_ip_address import TestAgentWithSourceIpAddress from thousandeyes_sdk.instant_tests.models.test_ipv6_policy import TestIpv6Policy from thousandeyes_sdk.instant_tests.models.test_links import TestLinks from thousandeyes_sdk.instant_tests.models.test_path_trace_mode import TestPathTraceMode @@ -59,7 +59,7 @@ class SipServerInstantTestRequest(BaseModel): labels: Optional[List[StrictStr]] = Field(default=None, description="A list of test label identifiers (get `labelId` from `/labels` endpoint).") tags: Optional[List[StrictStr]] = Field(default=None, description="A list of test tag identifiers (get `id` from `/tags` endpoint).") shared_with_accounts: Optional[List[StrictStr]] = Field(default=None, description="A list of account group identifiers that the test is shared with (get `aid` from `/account-groups` endpoint).", alias="sharedWithAccounts") - agents: List[TestAgent] = Field(description="A list of objects with `agentId` (required) and `sourceIpAddress` (optional).") + agents: List[TestAgentWithSourceIpAddress] = Field(description="Agents assigned to the test. To select a source interface, set `sourceIpAddress` on the same object as its `agentId`.") target_sip_credentials: TestSipCredentials = Field(alias="targetSipCredentials") __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "mtuMeasurements", "networkMeasurements", "numPathTraces", "optionsRegex", "pathTraceMode", "probeMode", "randomizedStartTime", "registerEnabled", "sipTargetTime", "sipTimeLimit", "fixedPacketRate", "ipv6Policy", "labels", "tags", "sharedWithAccounts", "agents", "targetSipCredentials"] @@ -170,7 +170,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "labels": obj.get("labels"), "tags": obj.get("tags"), "sharedWithAccounts": obj.get("sharedWithAccounts"), - "agents": [TestAgent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None, + "agents": [TestAgentWithSourceIpAddress.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None, "targetSipCredentials": TestSipCredentials.from_dict(obj["targetSipCredentials"]) if obj.get("targetSipCredentials") is not None else None }) return _obj diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/source_interface_instant_test_request.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/source_interface_instant_test_request.py new file mode 100644 index 000000000..d046bf77b --- /dev/null +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/source_interface_instant_test_request.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Instant Tests API + + The Instant Tests API operations lets you create and run new instant tests. You will need to be an Account Admin. The response does not include the immediate test results. Use the Test Results endpoints to get test results after creating and executing an instant test. You can find the URLs for these endpoints in the _links section of the test definition that is returned when you create the instant test. + + 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.instant_tests.models.test_agent_with_source_ip_address import TestAgentWithSourceIpAddress +from typing import Optional, Set +from typing_extensions import Self + +class SourceInterfaceInstantTestRequest(BaseModel): + """ + SourceInterfaceInstantTestRequest + """ # noqa: E501 + labels: Optional[List[StrictStr]] = Field(default=None, description="A list of test label identifiers (get `labelId` from `/labels` endpoint).") + tags: Optional[List[StrictStr]] = Field(default=None, description="A list of test tag identifiers (get `id` from `/tags` endpoint).") + shared_with_accounts: Optional[List[StrictStr]] = Field(default=None, description="A list of account group identifiers that the test is shared with (get `aid` from `/account-groups` endpoint).", alias="sharedWithAccounts") + agents: List[TestAgentWithSourceIpAddress] = Field(description="Agents assigned to the test. To select a source interface, set `sourceIpAddress` on the same object as its `agentId`.") + __properties: ClassVar[List[str]] = ["labels", "tags", "sharedWithAccounts", "agents"] + + 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 SourceInterfaceInstantTestRequest 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 agents (list) + _items = [] + if self.agents: + for _item in self.agents: + if _item: + _items.append(_item.to_dict()) + _dict['agents'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SourceInterfaceInstantTestRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "labels": obj.get("labels"), + "tags": obj.get("tags"), + "sharedWithAccounts": obj.get("sharedWithAccounts"), + "agents": [TestAgentWithSourceIpAddress.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + }) + return _obj + + diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_agent.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_agent.py index 11dea6ca9..06fbc1d31 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_agent.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_agent.py @@ -26,8 +26,7 @@ class TestAgent(BaseModel): TestAgent """ # noqa: E501 agent_id: Optional[StrictStr] = Field(default=None, description="Identifier for the agent (get `agentId` from `/agents` endpoint).", alias="agentId") - source_ip_address: Optional[StrictStr] = Field(default=None, description="IP address from the agent's `ipAddresses` field (get `ipAddresses` from `/agents` endpoint). Used for interface selection.", alias="sourceIpAddress") - __properties: ClassVar[List[str]] = ["agentId", "sourceIpAddress"] + __properties: ClassVar[List[str]] = ["agentId"] model_config = ConfigDict( populate_by_name=True, @@ -81,8 +80,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "agentId": obj.get("agentId"), - "sourceIpAddress": obj.get("sourceIpAddress") + "agentId": obj.get("agentId") }) return _obj diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/agent_interfaces.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_agent_with_source_ip_address.py similarity index 75% rename from thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/agent_interfaces.py rename to thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_agent_with_source_ip_address.py index b053a84f4..5cfdfcba1 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/agent_interfaces.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_agent_with_source_ip_address.py @@ -21,13 +21,13 @@ from typing import Optional, Set from typing_extensions import Self -class AgentInterfaces(BaseModel): +class TestAgentWithSourceIpAddress(BaseModel): """ - AgentInterfaces + TestAgentWithSourceIpAddress """ # noqa: E501 - ip_address: Optional[StrictStr] = Field(default=None, description="IP address of the agent interface.", alias="ipAddress") - agent_id: Optional[StrictStr] = Field(default=None, description="The agent ID of the enterprise agent for the test.", alias="agentId") - __properties: ClassVar[List[str]] = ["ipAddress", "agentId"] + agent_id: Optional[StrictStr] = Field(default=None, description="Identifier for the agent (get `agentId` from `/agents` endpoint).", alias="agentId") + source_ip_address: Optional[StrictStr] = Field(default=None, description="The Enterprise Agent interface IP address to use as the source for the test. The address must be listed in the agent's `ipAddresses` field, available from the `/agents` endpoint. It is not supported for Cloud Agents or Enterprise Agent clusters.", alias="sourceIpAddress") + __properties: ClassVar[List[str]] = ["agentId", "sourceIpAddress"] model_config = ConfigDict( populate_by_name=True, @@ -48,7 +48,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of AgentInterfaces from a JSON string""" + """Create an instance of TestAgentWithSourceIpAddress from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -73,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of AgentInterfaces from a dict""" + """Create an instance of TestAgentWithSourceIpAddress from a dict""" if obj is None: return None @@ -81,8 +81,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "ipAddress": obj.get("ipAddress"), - "agentId": obj.get("agentId") + "agentId": obj.get("agentId"), + "sourceIpAddress": obj.get("sourceIpAddress") }) return _obj diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/voice_instant_test_request.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/voice_instant_test_request.py index 4e9919606..7e199f8a7 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/voice_instant_test_request.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/voice_instant_test_request.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from thousandeyes_sdk.instant_tests.models.test_agent import TestAgent +from thousandeyes_sdk.instant_tests.models.test_agent_with_source_ip_address import TestAgentWithSourceIpAddress from thousandeyes_sdk.instant_tests.models.test_dscp_id import TestDscpId from thousandeyes_sdk.instant_tests.models.test_links import TestLinks from typing import Optional, Set @@ -54,7 +54,7 @@ class VoiceInstantTestRequest(BaseModel): labels: Optional[List[StrictStr]] = Field(default=None, description="A list of test label identifiers (get `labelId` from `/labels` endpoint).") tags: Optional[List[StrictStr]] = Field(default=None, description="A list of test tag identifiers (get `id` from `/tags` endpoint).") shared_with_accounts: Optional[List[StrictStr]] = Field(default=None, description="A list of account group identifiers that the test is shared with (get `aid` from `/account-groups` endpoint).", alias="sharedWithAccounts") - agents: List[TestAgent] = Field(description="A list of objects with `agentId` (required) and `sourceIpAddress` (optional).") + agents: List[TestAgentWithSourceIpAddress] = Field(description="Agents assigned to the test. To select a source interface, set `sourceIpAddress` on the same object as its `agentId`.") __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "codec", "codecId", "dscp", "dscpId", "duration", "jitterBuffer", "numPathTraces", "port", "randomizedStartTime", "targetAgentId", "labels", "tags", "sharedWithAccounts", "agents"] model_config = ConfigDict( @@ -163,7 +163,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "labels": obj.get("labels"), "tags": obj.get("tags"), "sharedWithAccounts": obj.get("sharedWithAccounts"), - "agents": [TestAgent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + "agents": [TestAgentWithSourceIpAddress.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None }) return _obj diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/web_transaction_instant_test.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/web_transaction_instant_test.py index b2c00cbb1..56238eda2 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/web_transaction_instant_test.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/web_transaction_instant_test.py @@ -20,7 +20,6 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from thousandeyes_sdk.instant_tests.models.agent_interfaces import AgentInterfaces from thousandeyes_sdk.instant_tests.models.o_auth import OAuth from thousandeyes_sdk.instant_tests.models.shared_with_account import SharedWithAccount from thousandeyes_sdk.instant_tests.models.test_auth_type import TestAuthType @@ -57,7 +56,6 @@ class WebTransactionInstantTest(BaseModel): tags: Optional[List[TestTag]] = Field(default=None, description="Tags assigned to the test. Returned only when `expand=tag` is specified. This field is not returned for Instant Tests. For more information, see `/tags`.") shared_with_accounts: Optional[List[SharedWithAccount]] = Field(default=None, alias="sharedWithAccounts") auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") - agent_interfaces: Optional[AgentInterfaces] = Field(default=None, alias="agentInterfaces") bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") content_regex: Optional[StrictStr] = Field(default=None, description="Content regex, this field does not require escaping.", alias="contentRegex") @@ -109,7 +107,7 @@ class WebTransactionInstantTest(BaseModel): randomized_start_time: Optional[StrictBool] = Field(default=False, description="Indicates whether agents should randomize the start time in each test round.", alias="randomizedStartTime") identify_agent_traffic_with_user_agent: Optional[StrictBool] = Field(default=False, description="Determines how agent traffic is identified: * `false`: Adds the `x-thousandeyes-agent: yes` header. * `true`: Appends `(ThousandEyes Agent)` to the `user-agent` header. For more information, see [Notes on Agent ID Strategy](https://docs.thousandeyes.com/product-documentation/browser-synthetics/test-settings-page-load-transaction#notes-on-agent-id-strategy). ", alias="identifyAgentTrafficWithUserAgent") credentials: Optional[List[StrictStr]] = Field(default=None, description="Contains a list of credential IDs (get `credentialId` from `/credentials` endpoint).") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "tags", "sharedWithAccounts", "authType", "agentInterfaces", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "emulatedDeviceId", "targetTime", "timeLimit", "transactionScript", "flagCollectConsoleLogs", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "chromeOptions", "chromePolicies", "chromiumTrack", "pageLoadingStrategy", "randomizedStartTime", "identifyAgentTrafficWithUserAgent", "credentials"] + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "tags", "sharedWithAccounts", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "emulatedDeviceId", "targetTime", "timeLimit", "transactionScript", "flagCollectConsoleLogs", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "chromeOptions", "chromePolicies", "chromiumTrack", "pageLoadingStrategy", "randomizedStartTime", "identifyAgentTrafficWithUserAgent", "credentials"] model_config = ConfigDict( populate_by_name=True, @@ -199,9 +197,6 @@ def to_dict(self) -> Dict[str, Any]: if _item: _items.append(_item.to_dict()) _dict['sharedWithAccounts'] = _items - # override the default output from pydantic by calling `to_dict()` of agent_interfaces - if self.agent_interfaces: - _dict['agentInterfaces'] = self.agent_interfaces.to_dict() # override the default output from pydantic by calling `to_dict()` of custom_headers if self.custom_headers: _dict['customHeaders'] = self.custom_headers.to_dict() @@ -242,7 +237,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "tags": [TestTag.from_dict(_item) for _item in obj["tags"]] if obj.get("tags") is not None else None, "sharedWithAccounts": [SharedWithAccount.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None, "authType": obj.get("authType"), - "agentInterfaces": AgentInterfaces.from_dict(obj["agentInterfaces"]) if obj.get("agentInterfaces") is not None else None, "bandwidthMeasurements": obj.get("bandwidthMeasurements"), "clientCertificate": obj.get("clientCertificate"), "contentRegex": obj.get("contentRegex"), diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/web_transaction_instant_test_request.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/web_transaction_instant_test_request.py index 387747c3a..f41891719 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/web_transaction_instant_test_request.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/web_transaction_instant_test_request.py @@ -20,7 +20,6 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from thousandeyes_sdk.instant_tests.models.agent_interfaces import AgentInterfaces from thousandeyes_sdk.instant_tests.models.o_auth import OAuth from thousandeyes_sdk.instant_tests.models.test_agent import TestAgent from thousandeyes_sdk.instant_tests.models.test_auth_type import TestAuthType @@ -52,7 +51,6 @@ class WebTransactionInstantTestRequest(BaseModel): type: Optional[StrictStr] = None links: Optional[TestLinks] = Field(default=None, alias="_links") auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") - agent_interfaces: Optional[AgentInterfaces] = Field(default=None, alias="agentInterfaces") bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") content_regex: Optional[StrictStr] = Field(default=None, description="Content regex, this field does not require escaping.", alias="contentRegex") @@ -106,9 +104,9 @@ class WebTransactionInstantTestRequest(BaseModel): labels: Optional[List[StrictStr]] = Field(default=None, description="A list of test label identifiers (get `labelId` from `/labels` endpoint).") tags: Optional[List[StrictStr]] = Field(default=None, description="A list of test tag identifiers (get `id` from `/tags` endpoint).") shared_with_accounts: Optional[List[StrictStr]] = Field(default=None, description="A list of account group identifiers that the test is shared with (get `aid` from `/account-groups` endpoint).", alias="sharedWithAccounts") - agents: List[TestAgent] = Field(description="A list of objects with `agentId` (required) and `sourceIpAddress` (optional).") + agents: List[TestAgent] = Field(description="Agents assigned to the test.") credentials: Optional[List[StrictStr]] = Field(default=None, description="Contains a list of credential IDs (get `credentialId` from `/credentials` endpoint).") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "authType", "agentInterfaces", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "emulatedDeviceId", "targetTime", "timeLimit", "transactionScript", "flagCollectConsoleLogs", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "chromeOptions", "chromePolicies", "chromiumTrack", "pageLoadingStrategy", "randomizedStartTime", "identifyAgentTrafficWithUserAgent", "labels", "tags", "sharedWithAccounts", "agents", "credentials"] + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "emulatedDeviceId", "targetTime", "timeLimit", "transactionScript", "flagCollectConsoleLogs", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "chromeOptions", "chromePolicies", "chromiumTrack", "pageLoadingStrategy", "randomizedStartTime", "identifyAgentTrafficWithUserAgent", "labels", "tags", "sharedWithAccounts", "agents", "credentials"] model_config = ConfigDict( populate_by_name=True, @@ -171,9 +169,6 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of links if self.links: _dict['_links'] = self.links.to_dict() - # override the default output from pydantic by calling `to_dict()` of agent_interfaces - if self.agent_interfaces: - _dict['agentInterfaces'] = self.agent_interfaces.to_dict() # override the default output from pydantic by calling `to_dict()` of custom_headers if self.custom_headers: _dict['customHeaders'] = self.custom_headers.to_dict() @@ -218,7 +213,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "type": obj.get("type"), "_links": TestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, "authType": obj.get("authType"), - "agentInterfaces": AgentInterfaces.from_dict(obj["agentInterfaces"]) if obj.get("agentInterfaces") is not None else None, "bandwidthMeasurements": obj.get("bandwidthMeasurements"), "clientCertificate": obj.get("clientCertificate"), "contentRegex": obj.get("contentRegex"), diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/web_transaction_instant_test_response.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/web_transaction_instant_test_response.py index 621ed2abe..94cf77330 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/web_transaction_instant_test_response.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/web_transaction_instant_test_response.py @@ -20,7 +20,6 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from thousandeyes_sdk.instant_tests.models.agent_interfaces import AgentInterfaces from thousandeyes_sdk.instant_tests.models.o_auth import OAuth from thousandeyes_sdk.instant_tests.models.shared_with_account import SharedWithAccount from thousandeyes_sdk.instant_tests.models.test_agent_response import TestAgentResponse @@ -58,7 +57,6 @@ class WebTransactionInstantTestResponse(BaseModel): tags: Optional[List[TestTag]] = Field(default=None, description="Tags assigned to the test. Returned only when `expand=tag` is specified. This field is not returned for Instant Tests. For more information, see `/tags`.") shared_with_accounts: Optional[List[SharedWithAccount]] = Field(default=None, alias="sharedWithAccounts") auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") - agent_interfaces: Optional[AgentInterfaces] = Field(default=None, alias="agentInterfaces") bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") content_regex: Optional[StrictStr] = Field(default=None, description="Content regex, this field does not require escaping.", alias="contentRegex") @@ -111,7 +109,7 @@ class WebTransactionInstantTestResponse(BaseModel): identify_agent_traffic_with_user_agent: Optional[StrictBool] = Field(default=False, description="Determines how agent traffic is identified: * `false`: Adds the `x-thousandeyes-agent: yes` header. * `true`: Appends `(ThousandEyes Agent)` to the `user-agent` header. For more information, see [Notes on Agent ID Strategy](https://docs.thousandeyes.com/product-documentation/browser-synthetics/test-settings-page-load-transaction#notes-on-agent-id-strategy). ", alias="identifyAgentTrafficWithUserAgent") credentials: Optional[List[StrictStr]] = Field(default=None, description="Contains a list of credential IDs (get `credentialId` from `/credentials` endpoint).") agents: Optional[List[TestAgentResponse]] = Field(default=None, description="Contains list of agents.") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "tags", "sharedWithAccounts", "authType", "agentInterfaces", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "emulatedDeviceId", "targetTime", "timeLimit", "transactionScript", "flagCollectConsoleLogs", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "chromeOptions", "chromePolicies", "chromiumTrack", "pageLoadingStrategy", "randomizedStartTime", "identifyAgentTrafficWithUserAgent", "credentials", "agents"] + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "tags", "sharedWithAccounts", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "emulatedDeviceId", "targetTime", "timeLimit", "transactionScript", "flagCollectConsoleLogs", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "chromeOptions", "chromePolicies", "chromiumTrack", "pageLoadingStrategy", "randomizedStartTime", "identifyAgentTrafficWithUserAgent", "credentials", "agents"] model_config = ConfigDict( populate_by_name=True, @@ -201,9 +199,6 @@ def to_dict(self) -> Dict[str, Any]: if _item: _items.append(_item.to_dict()) _dict['sharedWithAccounts'] = _items - # override the default output from pydantic by calling `to_dict()` of agent_interfaces - if self.agent_interfaces: - _dict['agentInterfaces'] = self.agent_interfaces.to_dict() # override the default output from pydantic by calling `to_dict()` of custom_headers if self.custom_headers: _dict['customHeaders'] = self.custom_headers.to_dict() @@ -251,7 +246,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "tags": [TestTag.from_dict(_item) for _item in obj["tags"]] if obj.get("tags") is not None else None, "sharedWithAccounts": [SharedWithAccount.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None, "authType": obj.get("authType"), - "agentInterfaces": AgentInterfaces.from_dict(obj["agentInterfaces"]) if obj.get("agentInterfaces") is not None else None, "bandwidthMeasurements": obj.get("bandwidthMeasurements"), "clientCertificate": obj.get("clientCertificate"), "contentRegex": obj.get("contentRegex"), diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/web_transaction_properties.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/web_transaction_properties.py index 94d9d025a..8d8e05158 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/web_transaction_properties.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/web_transaction_properties.py @@ -19,7 +19,6 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from thousandeyes_sdk.instant_tests.models.agent_interfaces import AgentInterfaces from thousandeyes_sdk.instant_tests.models.o_auth import OAuth from thousandeyes_sdk.instant_tests.models.test_auth_type import TestAuthType from thousandeyes_sdk.instant_tests.models.test_chromium_track import TestChromiumTrack @@ -38,7 +37,6 @@ class WebTransactionProperties(BaseModel): WebTransactionProperties """ # noqa: E501 auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") - agent_interfaces: Optional[AgentInterfaces] = Field(default=None, alias="agentInterfaces") bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") content_regex: Optional[StrictStr] = Field(default=None, description="Content regex, this field does not require escaping.", alias="contentRegex") @@ -90,7 +88,7 @@ class WebTransactionProperties(BaseModel): randomized_start_time: Optional[StrictBool] = Field(default=False, description="Indicates whether agents should randomize the start time in each test round.", alias="randomizedStartTime") type: Optional[StrictStr] = None identify_agent_traffic_with_user_agent: Optional[StrictBool] = Field(default=False, description="Determines how agent traffic is identified: * `false`: Adds the `x-thousandeyes-agent: yes` header. * `true`: Appends `(ThousandEyes Agent)` to the `user-agent` header. For more information, see [Notes on Agent ID Strategy](https://docs.thousandeyes.com/product-documentation/browser-synthetics/test-settings-page-load-transaction#notes-on-agent-id-strategy). ", alias="identifyAgentTrafficWithUserAgent") - __properties: ClassVar[List[str]] = ["authType", "agentInterfaces", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "emulatedDeviceId", "targetTime", "timeLimit", "transactionScript", "flagCollectConsoleLogs", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "chromeOptions", "chromePolicies", "chromiumTrack", "pageLoadingStrategy", "randomizedStartTime", "type", "identifyAgentTrafficWithUserAgent"] + __properties: ClassVar[List[str]] = ["authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "emulatedDeviceId", "targetTime", "timeLimit", "transactionScript", "flagCollectConsoleLogs", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "chromeOptions", "chromePolicies", "chromiumTrack", "pageLoadingStrategy", "randomizedStartTime", "type", "identifyAgentTrafficWithUserAgent"] model_config = ConfigDict( populate_by_name=True, @@ -136,9 +134,6 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of agent_interfaces - if self.agent_interfaces: - _dict['agentInterfaces'] = self.agent_interfaces.to_dict() # override the default output from pydantic by calling `to_dict()` of custom_headers if self.custom_headers: _dict['customHeaders'] = self.custom_headers.to_dict() @@ -165,7 +160,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "authType": obj.get("authType"), - "agentInterfaces": AgentInterfaces.from_dict(obj["agentInterfaces"]) if obj.get("agentInterfaces") is not None else None, "bandwidthMeasurements": obj.get("bandwidthMeasurements"), "clientCertificate": obj.get("clientCertificate"), "contentRegex": obj.get("contentRegex"), diff --git a/thousandeyes-sdk-instant-tests/test/mock_manifest.py b/thousandeyes-sdk-instant-tests/test/mock_manifest.py index 82193ab99..2a91bebfb 100644 --- a/thousandeyes-sdk-instant-tests/test/mock_manifest.py +++ b/thousandeyes-sdk-instant-tests/test/mock_manifest.py @@ -382,11 +382,7 @@ "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 19, "createdDate" : "2022-07-17T22:00:54Z", @@ -672,9 +668,6 @@ "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -960,9 +953,6 @@ "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -1221,11 +1211,7 @@ "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -1517,11 +1503,7 @@ "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -1781,11 +1763,7 @@ "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -2079,9 +2057,6 @@ "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -2252,10 +2227,6 @@ "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ { "labelId" : "961", "name" : "Artem label", @@ -2437,10 +2408,6 @@ "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "randomizedStartTime" : false, @@ -2493,11 +2460,7 @@ "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "disableScreenshot" : false, @@ -2664,10 +2627,6 @@ "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ { "labelId" : "961", "name" : "Artem label", @@ -2840,10 +2799,6 @@ "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "randomizedStartTime" : false, @@ -2894,9 +2849,6 @@ "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "postBody" : "{ \\"example\\" : \\"value\\"}", @@ -3191,9 +3143,6 @@ "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -3466,9 +3415,6 @@ "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "codec" : "G.711 @ 64 Kbps", "codecId" : "0", @@ -3640,10 +3586,6 @@ "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ { "labelId" : "961", "name" : "Artem label", @@ -3828,10 +3770,6 @@ "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "randomizedStartTime" : false, @@ -3884,11 +3822,7 @@ "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 30, "createdDate" : "2022-07-17T22:00:54Z", diff --git a/thousandeyes-sdk-instant-tests/test/test_agent_to_agent_instant_tests_api.py b/thousandeyes-sdk-instant-tests/test/test_agent_to_agent_instant_tests_api.py index 603e57413..c14ddd14b 100644 --- a/thousandeyes-sdk-instant-tests/test/test_agent_to_agent_instant_tests_api.py +++ b/thousandeyes-sdk-instant-tests/test/test_agent_to_agent_instant_tests_api.py @@ -71,9 +71,6 @@ def test_create_agent_to_agent_instant_test_models_validation(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -90,6 +87,7 @@ def test_create_agent_to_agent_instant_test_models_validation(self) -> None: request_from_json = thousandeyes_sdk.instant_tests.models.AgentToAgentInstantTestRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "_links" : { @@ -208,6 +206,7 @@ def test_create_agent_to_agent_instant_test_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.instant_tests.models.AgentToAgentInstantTestResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-instant-tests/test/test_agent_to_agent_instant_tests_api_integration.py b/thousandeyes-sdk-instant-tests/test/test_agent_to_agent_instant_tests_api_integration.py index fcc58a69e..8d55414b3 100644 --- a/thousandeyes-sdk-instant-tests/test/test_agent_to_agent_instant_tests_api_integration.py +++ b/thousandeyes-sdk-instant-tests/test/test_agent_to_agent_instant_tests_api_integration.py @@ -73,9 +73,6 @@ def test_create_agent_to_agent_instant_test_happy_path(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -264,9 +261,6 @@ def test_create_agent_to_agent_instant_test_error_400(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -361,9 +355,6 @@ def test_create_agent_to_agent_instant_test_error_401(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -446,9 +437,6 @@ def test_create_agent_to_agent_instant_test_error_403(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -534,9 +522,6 @@ def test_create_agent_to_agent_instant_test_error_404(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -622,9 +607,6 @@ def test_create_agent_to_agent_instant_test_error_429(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -710,9 +692,6 @@ def test_create_agent_to_agent_instant_test_error_500(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -798,9 +777,6 @@ def test_create_agent_to_agent_instant_test_error_502(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", diff --git a/thousandeyes-sdk-instant-tests/test/test_agent_to_server_instant_tests_api.py b/thousandeyes-sdk-instant-tests/test/test_agent_to_server_instant_tests_api.py index 72b1594f3..30c0116e8 100644 --- a/thousandeyes-sdk-instant-tests/test/test_agent_to_server_instant_tests_api.py +++ b/thousandeyes-sdk-instant-tests/test/test_agent_to_server_instant_tests_api.py @@ -72,9 +72,6 @@ def test_create_agent_to_server_instant_test_models_validation(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -91,6 +88,7 @@ def test_create_agent_to_server_instant_test_models_validation(self) -> None: request_from_json = thousandeyes_sdk.instant_tests.models.AgentToServerInstantTestRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "server" : "www.thousandeyes.com:80", @@ -210,6 +208,7 @@ def test_create_agent_to_server_instant_test_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.instant_tests.models.AgentToServerInstantTestResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-instant-tests/test/test_agent_to_server_instant_tests_api_integration.py b/thousandeyes-sdk-instant-tests/test/test_agent_to_server_instant_tests_api_integration.py index 41b26aa4c..9ac933699 100644 --- a/thousandeyes-sdk-instant-tests/test/test_agent_to_server_instant_tests_api_integration.py +++ b/thousandeyes-sdk-instant-tests/test/test_agent_to_server_instant_tests_api_integration.py @@ -74,9 +74,6 @@ def test_create_agent_to_server_instant_test_happy_path(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -267,9 +264,6 @@ def test_create_agent_to_server_instant_test_error_400(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -365,9 +359,6 @@ def test_create_agent_to_server_instant_test_error_401(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -451,9 +442,6 @@ def test_create_agent_to_server_instant_test_error_403(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -540,9 +528,6 @@ def test_create_agent_to_server_instant_test_error_404(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -629,9 +614,6 @@ def test_create_agent_to_server_instant_test_error_429(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -718,9 +700,6 @@ def test_create_agent_to_server_instant_test_error_500(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -807,9 +786,6 @@ def test_create_agent_to_server_instant_test_error_502(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", diff --git a/thousandeyes-sdk-instant-tests/test/test_api_instant_tests_api.py b/thousandeyes-sdk-instant-tests/test/test_api_instant_tests_api.py index af63e2d45..0fad562dd 100644 --- a/thousandeyes-sdk-instant-tests/test/test_api_instant_tests_api.py +++ b/thousandeyes-sdk-instant-tests/test/test_api_instant_tests_api.py @@ -167,11 +167,7 @@ def test_create_api_instant_test_models_validation(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 19, "createdDate" : "2022-07-17T22:00:54Z", @@ -190,6 +186,7 @@ def test_create_api_instant_test_models_validation(self) -> None: request_from_json = thousandeyes_sdk.instant_tests.models.ApiInstantTestRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "clientCertificate" : "-----BEGIN PRIVATE KEY-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END PRIVATE KEY-----\\n-----BEGIN CERTIFICATE-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END CERTIFICATE-----\\n", @@ -408,6 +405,7 @@ def test_create_api_instant_test_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.instant_tests.models.ApiInstantTestResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-instant-tests/test/test_api_instant_tests_api_integration.py b/thousandeyes-sdk-instant-tests/test/test_api_instant_tests_api_integration.py index 3dd3e3814..9e01f93a7 100644 --- a/thousandeyes-sdk-instant-tests/test/test_api_instant_tests_api_integration.py +++ b/thousandeyes-sdk-instant-tests/test/test_api_instant_tests_api_integration.py @@ -169,11 +169,7 @@ def test_create_api_instant_test_happy_path(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 19, "createdDate" : "2022-07-17T22:00:54Z", @@ -560,11 +556,7 @@ def test_create_api_instant_test_error_400(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 19, "createdDate" : "2022-07-17T22:00:54Z", @@ -757,11 +749,7 @@ def test_create_api_instant_test_error_401(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 19, "createdDate" : "2022-07-17T22:00:54Z", @@ -942,11 +930,7 @@ def test_create_api_instant_test_error_403(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 19, "createdDate" : "2022-07-17T22:00:54Z", @@ -1130,11 +1114,7 @@ def test_create_api_instant_test_error_404(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 19, "createdDate" : "2022-07-17T22:00:54Z", @@ -1318,11 +1298,7 @@ def test_create_api_instant_test_error_429(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 19, "createdDate" : "2022-07-17T22:00:54Z", @@ -1506,11 +1482,7 @@ def test_create_api_instant_test_error_500(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 19, "createdDate" : "2022-07-17T22:00:54Z", @@ -1694,11 +1666,7 @@ def test_create_api_instant_test_error_502(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 19, "createdDate" : "2022-07-17T22:00:54Z", diff --git a/thousandeyes-sdk-instant-tests/test/test_dns_server_instant_tests_api.py b/thousandeyes-sdk-instant-tests/test/test_dns_server_instant_tests_api.py index c821d5365..4962bca1d 100644 --- a/thousandeyes-sdk-instant-tests/test/test_dns_server_instant_tests_api.py +++ b/thousandeyes-sdk-instant-tests/test/test_dns_server_instant_tests_api.py @@ -71,11 +71,7 @@ def test_create_dns_server_instant_test_models_validation(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -91,6 +87,7 @@ def test_create_dns_server_instant_test_models_validation(self) -> None: request_from_json = thousandeyes_sdk.instant_tests.models.DnsServerInstantTestRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "mtuMeasurements" : false, @@ -216,6 +213,7 @@ def test_create_dns_server_instant_test_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.instant_tests.models.DnsServerInstantTestResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-instant-tests/test/test_dns_server_instant_tests_api_integration.py b/thousandeyes-sdk-instant-tests/test/test_dns_server_instant_tests_api_integration.py index 50f63a15a..f1f30ced1 100644 --- a/thousandeyes-sdk-instant-tests/test/test_dns_server_instant_tests_api_integration.py +++ b/thousandeyes-sdk-instant-tests/test/test_dns_server_instant_tests_api_integration.py @@ -73,11 +73,7 @@ def test_create_dns_server_instant_test_happy_path(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -272,11 +268,7 @@ def test_create_dns_server_instant_test_error_400(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -370,11 +362,7 @@ def test_create_dns_server_instant_test_error_401(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -456,11 +444,7 @@ def test_create_dns_server_instant_test_error_403(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -545,11 +529,7 @@ def test_create_dns_server_instant_test_error_404(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -634,11 +614,7 @@ def test_create_dns_server_instant_test_error_429(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -723,11 +699,7 @@ def test_create_dns_server_instant_test_error_500(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -812,11 +784,7 @@ def test_create_dns_server_instant_test_error_502(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", diff --git a/thousandeyes-sdk-instant-tests/test/test_dns_trace_instant_tests_api.py b/thousandeyes-sdk-instant-tests/test/test_dns_trace_instant_tests_api.py index 4ffefe556..374657427 100644 --- a/thousandeyes-sdk-instant-tests/test/test_dns_trace_instant_tests_api.py +++ b/thousandeyes-sdk-instant-tests/test/test_dns_trace_instant_tests_api.py @@ -58,11 +58,7 @@ def test_create_dns_trace_instant_test_models_validation(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -80,6 +76,7 @@ def test_create_dns_trace_instant_test_models_validation(self) -> None: request_from_json = thousandeyes_sdk.instant_tests.models.DnsTraceInstantTestRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "dnsQueryClass" : "in", @@ -188,6 +185,7 @@ def test_create_dns_trace_instant_test_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.instant_tests.models.DnsTraceInstantTestResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-instant-tests/test/test_dns_trace_instant_tests_api_integration.py b/thousandeyes-sdk-instant-tests/test/test_dns_trace_instant_tests_api_integration.py index 0a8b96c3a..12a0f727c 100644 --- a/thousandeyes-sdk-instant-tests/test/test_dns_trace_instant_tests_api_integration.py +++ b/thousandeyes-sdk-instant-tests/test/test_dns_trace_instant_tests_api_integration.py @@ -60,11 +60,7 @@ def test_create_dns_trace_instant_test_happy_path(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -231,11 +227,7 @@ def test_create_dns_trace_instant_test_error_400(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -318,11 +310,7 @@ def test_create_dns_trace_instant_test_error_401(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -393,11 +381,7 @@ def test_create_dns_trace_instant_test_error_403(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -471,11 +455,7 @@ def test_create_dns_trace_instant_test_error_404(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -549,11 +529,7 @@ def test_create_dns_trace_instant_test_error_429(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -627,11 +603,7 @@ def test_create_dns_trace_instant_test_error_500(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -705,11 +677,7 @@ def test_create_dns_trace_instant_test_error_502(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", diff --git a/thousandeyes-sdk-instant-tests/test/test_dnssec_instant_tests_api.py b/thousandeyes-sdk-instant-tests/test/test_dnssec_instant_tests_api.py index fb132caba..17698888f 100644 --- a/thousandeyes-sdk-instant-tests/test/test_dnssec_instant_tests_api.py +++ b/thousandeyes-sdk-instant-tests/test/test_dnssec_instant_tests_api.py @@ -57,11 +57,7 @@ def test_create_dns_sec_instant_test_models_validation(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -79,6 +75,7 @@ def test_create_dns_sec_instant_test_models_validation(self) -> None: request_from_json = thousandeyes_sdk.instant_tests.models.DnsSecInstantTestRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "dnsQueryClass" : "in", @@ -186,6 +183,7 @@ def test_create_dns_sec_instant_test_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.instant_tests.models.DnsSecInstantTestResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-instant-tests/test/test_dnssec_instant_tests_api_integration.py b/thousandeyes-sdk-instant-tests/test/test_dnssec_instant_tests_api_integration.py index 8f14bf197..95863e7ec 100644 --- a/thousandeyes-sdk-instant-tests/test/test_dnssec_instant_tests_api_integration.py +++ b/thousandeyes-sdk-instant-tests/test/test_dnssec_instant_tests_api_integration.py @@ -59,11 +59,7 @@ def test_create_dns_sec_instant_test_happy_path(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -228,11 +224,7 @@ def test_create_dns_sec_instant_test_error_400(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -314,11 +306,7 @@ def test_create_dns_sec_instant_test_error_401(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -388,11 +376,7 @@ def test_create_dns_sec_instant_test_error_403(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -465,11 +449,7 @@ def test_create_dns_sec_instant_test_error_404(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -542,11 +522,7 @@ def test_create_dns_sec_instant_test_error_429(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -619,11 +595,7 @@ def test_create_dns_sec_instant_test_error_500(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -696,11 +668,7 @@ def test_create_dns_sec_instant_test_error_502(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", diff --git a/thousandeyes-sdk-instant-tests/test/test_ftp_server_instant_tests_api.py b/thousandeyes-sdk-instant-tests/test/test_ftp_server_instant_tests_api.py index 95b6ca33c..fad96bc04 100644 --- a/thousandeyes-sdk-instant-tests/test/test_ftp_server_instant_tests_api.py +++ b/thousandeyes-sdk-instant-tests/test/test_ftp_server_instant_tests_api.py @@ -75,9 +75,6 @@ def test_create_ftp_server_instant_test_models_validation(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -95,6 +92,7 @@ def test_create_ftp_server_instant_test_models_validation(self) -> None: request_from_json = thousandeyes_sdk.instant_tests.models.FtpServerInstantTestRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "mtuMeasurements" : false, @@ -218,6 +216,7 @@ def test_create_ftp_server_instant_test_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.instant_tests.models.FtpServerInstantTestResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-instant-tests/test/test_ftp_server_instant_tests_api_integration.py b/thousandeyes-sdk-instant-tests/test/test_ftp_server_instant_tests_api_integration.py index ef8132361..77ee2c388 100644 --- a/thousandeyes-sdk-instant-tests/test/test_ftp_server_instant_tests_api_integration.py +++ b/thousandeyes-sdk-instant-tests/test/test_ftp_server_instant_tests_api_integration.py @@ -77,9 +77,6 @@ def test_create_ftp_server_instant_test_happy_path(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -278,9 +275,6 @@ def test_create_ftp_server_instant_test_error_400(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -380,9 +374,6 @@ def test_create_ftp_server_instant_test_error_401(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -470,9 +461,6 @@ def test_create_ftp_server_instant_test_error_403(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -563,9 +551,6 @@ def test_create_ftp_server_instant_test_error_404(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -656,9 +641,6 @@ def test_create_ftp_server_instant_test_error_429(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -749,9 +731,6 @@ def test_create_ftp_server_instant_test_error_500(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -842,9 +821,6 @@ def test_create_ftp_server_instant_test_error_502(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", diff --git a/thousandeyes-sdk-instant-tests/test/test_http_page_load_instant_tests_api.py b/thousandeyes-sdk-instant-tests/test/test_http_page_load_instant_tests_api.py index 49d7fb3bd..097c9dce4 100644 --- a/thousandeyes-sdk-instant-tests/test/test_http_page_load_instant_tests_api.py +++ b/thousandeyes-sdk-instant-tests/test/test_http_page_load_instant_tests_api.py @@ -77,10 +77,6 @@ def test_create_page_load_instant_test_models_validation(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "randomizedStartTime" : false, @@ -133,11 +129,7 @@ def test_create_page_load_instant_test_models_validation(self) -> None: "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "disableScreenshot" : false, @@ -155,6 +147,7 @@ def test_create_page_load_instant_test_models_validation(self) -> None: request_from_json = thousandeyes_sdk.instant_tests.models.PageLoadInstantTestRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "clientCertificate" : "-----BEGIN PRIVATE KEY-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END PRIVATE KEY-----\\n-----BEGIN CERTIFICATE-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END CERTIFICATE-----\\n", @@ -202,10 +195,6 @@ def test_create_page_load_instant_test_models_validation(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ { "labelId" : "961", "name" : "Artem label", @@ -338,6 +327,7 @@ def test_create_page_load_instant_test_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.instant_tests.models.PageLoadInstantTestResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-instant-tests/test/test_http_page_load_instant_tests_api_integration.py b/thousandeyes-sdk-instant-tests/test/test_http_page_load_instant_tests_api_integration.py index ad48ee087..6d869d332 100644 --- a/thousandeyes-sdk-instant-tests/test/test_http_page_load_instant_tests_api_integration.py +++ b/thousandeyes-sdk-instant-tests/test/test_http_page_load_instant_tests_api_integration.py @@ -79,10 +79,6 @@ def test_create_page_load_instant_test_happy_path(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "randomizedStartTime" : false, @@ -135,11 +131,7 @@ def test_create_page_load_instant_test_happy_path(self) -> None: "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "disableScreenshot" : false, @@ -203,10 +195,6 @@ def test_create_page_load_instant_test_happy_path(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ { "labelId" : "961", "name" : "Artem label", @@ -400,10 +388,6 @@ def test_create_page_load_instant_test_error_400(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "randomizedStartTime" : false, @@ -456,11 +440,7 @@ def test_create_page_load_instant_test_error_400(self) -> None: "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "disableScreenshot" : false, @@ -562,10 +542,6 @@ def test_create_page_load_instant_test_error_401(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "randomizedStartTime" : false, @@ -618,11 +594,7 @@ def test_create_page_load_instant_test_error_401(self) -> None: "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "disableScreenshot" : false, @@ -712,10 +684,6 @@ def test_create_page_load_instant_test_error_403(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "randomizedStartTime" : false, @@ -768,11 +736,7 @@ def test_create_page_load_instant_test_error_403(self) -> None: "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "disableScreenshot" : false, @@ -865,10 +829,6 @@ def test_create_page_load_instant_test_error_404(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "randomizedStartTime" : false, @@ -921,11 +881,7 @@ def test_create_page_load_instant_test_error_404(self) -> None: "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "disableScreenshot" : false, @@ -1018,10 +974,6 @@ def test_create_page_load_instant_test_error_429(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "randomizedStartTime" : false, @@ -1074,11 +1026,7 @@ def test_create_page_load_instant_test_error_429(self) -> None: "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "disableScreenshot" : false, @@ -1171,10 +1119,6 @@ def test_create_page_load_instant_test_error_500(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "randomizedStartTime" : false, @@ -1227,11 +1171,7 @@ def test_create_page_load_instant_test_error_500(self) -> None: "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "disableScreenshot" : false, @@ -1324,10 +1264,6 @@ def test_create_page_load_instant_test_error_502(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "randomizedStartTime" : false, @@ -1380,11 +1316,7 @@ def test_create_page_load_instant_test_error_502(self) -> None: "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "disableScreenshot" : false, diff --git a/thousandeyes-sdk-instant-tests/test/test_http_server_instant_tests_api.py b/thousandeyes-sdk-instant-tests/test/test_http_server_instant_tests_api.py index 63216faf8..c33d0e20d 100644 --- a/thousandeyes-sdk-instant-tests/test/test_http_server_instant_tests_api.py +++ b/thousandeyes-sdk-instant-tests/test/test_http_server_instant_tests_api.py @@ -73,10 +73,6 @@ def test_create_http_server_instant_test_models_validation(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "randomizedStartTime" : false, @@ -127,9 +123,6 @@ def test_create_http_server_instant_test_models_validation(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "postBody" : "{ \\"example\\" : \\"value\\"}", @@ -146,6 +139,7 @@ def test_create_http_server_instant_test_models_validation(self) -> None: request_from_json = thousandeyes_sdk.instant_tests.models.HttpServerInstantTestRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "clientCertificate" : "-----BEGIN PRIVATE KEY-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END PRIVATE KEY-----\\n-----BEGIN CERTIFICATE-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END CERTIFICATE-----\\n", @@ -189,10 +183,6 @@ def test_create_http_server_instant_test_models_validation(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ { "labelId" : "961", "name" : "Artem label", @@ -320,6 +310,7 @@ def test_create_http_server_instant_test_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.instant_tests.models.HttpServerInstantTestResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-instant-tests/test/test_http_server_instant_tests_api_integration.py b/thousandeyes-sdk-instant-tests/test/test_http_server_instant_tests_api_integration.py index db7d98a9d..49d6142f5 100644 --- a/thousandeyes-sdk-instant-tests/test/test_http_server_instant_tests_api_integration.py +++ b/thousandeyes-sdk-instant-tests/test/test_http_server_instant_tests_api_integration.py @@ -75,10 +75,6 @@ def test_create_http_server_instant_test_happy_path(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "randomizedStartTime" : false, @@ -129,9 +125,6 @@ def test_create_http_server_instant_test_happy_path(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "postBody" : "{ \\"example\\" : \\"value\\"}", @@ -190,10 +183,6 @@ def test_create_http_server_instant_test_happy_path(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ { "labelId" : "961", "name" : "Artem label", @@ -378,10 +367,6 @@ def test_create_http_server_instant_test_error_400(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "randomizedStartTime" : false, @@ -432,9 +417,6 @@ def test_create_http_server_instant_test_error_400(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "postBody" : "{ \\"example\\" : \\"value\\"}", @@ -531,10 +513,6 @@ def test_create_http_server_instant_test_error_401(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "randomizedStartTime" : false, @@ -585,9 +563,6 @@ def test_create_http_server_instant_test_error_401(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "postBody" : "{ \\"example\\" : \\"value\\"}", @@ -672,10 +647,6 @@ def test_create_http_server_instant_test_error_403(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "randomizedStartTime" : false, @@ -726,9 +697,6 @@ def test_create_http_server_instant_test_error_403(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "postBody" : "{ \\"example\\" : \\"value\\"}", @@ -816,10 +784,6 @@ def test_create_http_server_instant_test_error_404(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "randomizedStartTime" : false, @@ -870,9 +834,6 @@ def test_create_http_server_instant_test_error_404(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "postBody" : "{ \\"example\\" : \\"value\\"}", @@ -960,10 +921,6 @@ def test_create_http_server_instant_test_error_429(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "randomizedStartTime" : false, @@ -1014,9 +971,6 @@ def test_create_http_server_instant_test_error_429(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "postBody" : "{ \\"example\\" : \\"value\\"}", @@ -1104,10 +1058,6 @@ def test_create_http_server_instant_test_error_500(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "randomizedStartTime" : false, @@ -1158,9 +1108,6 @@ def test_create_http_server_instant_test_error_500(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "postBody" : "{ \\"example\\" : \\"value\\"}", @@ -1248,10 +1195,6 @@ def test_create_http_server_instant_test_error_502(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "randomizedStartTime" : false, @@ -1302,9 +1245,6 @@ def test_create_http_server_instant_test_error_502(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "postBody" : "{ \\"example\\" : \\"value\\"}", diff --git a/thousandeyes-sdk-instant-tests/test/test_instant_tests_api.py b/thousandeyes-sdk-instant-tests/test/test_instant_tests_api.py index 537745240..d58186b67 100644 --- a/thousandeyes-sdk-instant-tests/test/test_instant_tests_api.py +++ b/thousandeyes-sdk-instant-tests/test/test_instant_tests_api.py @@ -31,6 +31,7 @@ def tearDown(self) -> None: def test_run_instant_test_models_validation(self) -> None: """Test case for run_instant_test request and response models""" + if __name__ == '__main__': diff --git a/thousandeyes-sdk-instant-tests/test/test_sip_server_instant_tests_api.py b/thousandeyes-sdk-instant-tests/test/test_sip_server_instant_tests_api.py index 38fa99a05..ee1f3fe12 100644 --- a/thousandeyes-sdk-instant-tests/test/test_sip_server_instant_tests_api.py +++ b/thousandeyes-sdk-instant-tests/test/test_sip_server_instant_tests_api.py @@ -78,9 +78,6 @@ def test_create_sip_server_instant_test_models_validation(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -96,6 +93,7 @@ def test_create_sip_server_instant_test_models_validation(self) -> None: request_from_json = thousandeyes_sdk.instant_tests.models.SipServerInstantTestRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "mtuMeasurements" : false, @@ -218,6 +216,7 @@ def test_create_sip_server_instant_test_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.instant_tests.models.SipServerInstantTestResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-instant-tests/test/test_sip_server_instant_tests_api_integration.py b/thousandeyes-sdk-instant-tests/test/test_sip_server_instant_tests_api_integration.py index b510444c8..2bf63a9cb 100644 --- a/thousandeyes-sdk-instant-tests/test/test_sip_server_instant_tests_api_integration.py +++ b/thousandeyes-sdk-instant-tests/test/test_sip_server_instant_tests_api_integration.py @@ -80,9 +80,6 @@ def test_create_sip_server_instant_test_happy_path(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -281,9 +278,6 @@ def test_create_sip_server_instant_test_error_400(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -384,9 +378,6 @@ def test_create_sip_server_instant_test_error_401(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -475,9 +466,6 @@ def test_create_sip_server_instant_test_error_403(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -569,9 +557,6 @@ def test_create_sip_server_instant_test_error_404(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -663,9 +648,6 @@ def test_create_sip_server_instant_test_error_429(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -757,9 +739,6 @@ def test_create_sip_server_instant_test_error_500(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -851,9 +830,6 @@ def test_create_sip_server_instant_test_error_502(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", diff --git a/thousandeyes-sdk-instant-tests/test/test_voice_instant_tests_api.py b/thousandeyes-sdk-instant-tests/test/test_voice_instant_tests_api.py index 406ca0abb..470e1068e 100644 --- a/thousandeyes-sdk-instant-tests/test/test_voice_instant_tests_api.py +++ b/thousandeyes-sdk-instant-tests/test/test_voice_instant_tests_api.py @@ -65,9 +65,6 @@ def test_create_voice_instant_test_models_validation(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "codec" : "G.711 @ 64 Kbps", "codecId" : "0", @@ -86,6 +83,7 @@ def test_create_voice_instant_test_models_validation(self) -> None: request_from_json = thousandeyes_sdk.instant_tests.models.VoiceInstantTestRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "_links" : { @@ -200,6 +198,7 @@ def test_create_voice_instant_test_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.instant_tests.models.VoiceInstantTestResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-instant-tests/test/test_voice_instant_tests_api_integration.py b/thousandeyes-sdk-instant-tests/test/test_voice_instant_tests_api_integration.py index 693f2f6b9..75bdaa46a 100644 --- a/thousandeyes-sdk-instant-tests/test/test_voice_instant_tests_api_integration.py +++ b/thousandeyes-sdk-instant-tests/test/test_voice_instant_tests_api_integration.py @@ -67,9 +67,6 @@ def test_create_voice_instant_test_happy_path(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "codec" : "G.711 @ 64 Kbps", "codecId" : "0", @@ -250,9 +247,6 @@ def test_create_voice_instant_test_error_400(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "codec" : "G.711 @ 64 Kbps", "codecId" : "0", @@ -343,9 +337,6 @@ def test_create_voice_instant_test_error_401(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "codec" : "G.711 @ 64 Kbps", "codecId" : "0", @@ -424,9 +415,6 @@ def test_create_voice_instant_test_error_403(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "codec" : "G.711 @ 64 Kbps", "codecId" : "0", @@ -508,9 +496,6 @@ def test_create_voice_instant_test_error_404(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "codec" : "G.711 @ 64 Kbps", "codecId" : "0", @@ -592,9 +577,6 @@ def test_create_voice_instant_test_error_429(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "codec" : "G.711 @ 64 Kbps", "codecId" : "0", @@ -676,9 +658,6 @@ def test_create_voice_instant_test_error_500(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "codec" : "G.711 @ 64 Kbps", "codecId" : "0", @@ -760,9 +739,6 @@ def test_create_voice_instant_test_error_502(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "codec" : "G.711 @ 64 Kbps", "codecId" : "0", diff --git a/thousandeyes-sdk-instant-tests/test/test_web_transaction_instant_tests_api.py b/thousandeyes-sdk-instant-tests/test/test_web_transaction_instant_tests_api.py index 01f1ccf7f..70f7c78f9 100644 --- a/thousandeyes-sdk-instant-tests/test/test_web_transaction_instant_tests_api.py +++ b/thousandeyes-sdk-instant-tests/test/test_web_transaction_instant_tests_api.py @@ -77,10 +77,6 @@ def test_create_web_transaction_instant_test_models_validation(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "randomizedStartTime" : false, @@ -133,11 +129,7 @@ def test_create_web_transaction_instant_test_models_validation(self) -> None: "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 30, "createdDate" : "2022-07-17T22:00:54Z", @@ -158,6 +150,7 @@ def test_create_web_transaction_instant_test_models_validation(self) -> None: request_from_json = thousandeyes_sdk.instant_tests.models.WebTransactionInstantTestRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "clientCertificate" : "-----BEGIN PRIVATE KEY-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END PRIVATE KEY-----\\n-----BEGIN CERTIFICATE-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END CERTIFICATE-----\\n", @@ -205,10 +198,6 @@ def test_create_web_transaction_instant_test_models_validation(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ { "labelId" : "961", "name" : "Artem label", @@ -344,6 +333,7 @@ def test_create_web_transaction_instant_test_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.instant_tests.models.WebTransactionInstantTestResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-instant-tests/test/test_web_transaction_instant_tests_api_integration.py b/thousandeyes-sdk-instant-tests/test/test_web_transaction_instant_tests_api_integration.py index 816683679..3e4aa0b7f 100644 --- a/thousandeyes-sdk-instant-tests/test/test_web_transaction_instant_tests_api_integration.py +++ b/thousandeyes-sdk-instant-tests/test/test_web_transaction_instant_tests_api_integration.py @@ -79,10 +79,6 @@ def test_create_web_transaction_instant_test_happy_path(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "randomizedStartTime" : false, @@ -135,11 +131,7 @@ def test_create_web_transaction_instant_test_happy_path(self) -> None: "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 30, "createdDate" : "2022-07-17T22:00:54Z", @@ -206,10 +198,6 @@ def test_create_web_transaction_instant_test_happy_path(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ { "labelId" : "961", "name" : "Artem label", @@ -406,10 +394,6 @@ def test_create_web_transaction_instant_test_error_400(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "randomizedStartTime" : false, @@ -462,11 +446,7 @@ def test_create_web_transaction_instant_test_error_400(self) -> None: "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 30, "createdDate" : "2022-07-17T22:00:54Z", @@ -571,10 +551,6 @@ def test_create_web_transaction_instant_test_error_401(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "randomizedStartTime" : false, @@ -627,11 +603,7 @@ def test_create_web_transaction_instant_test_error_401(self) -> None: "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 30, "createdDate" : "2022-07-17T22:00:54Z", @@ -724,10 +696,6 @@ def test_create_web_transaction_instant_test_error_403(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "randomizedStartTime" : false, @@ -780,11 +748,7 @@ def test_create_web_transaction_instant_test_error_403(self) -> None: "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 30, "createdDate" : "2022-07-17T22:00:54Z", @@ -880,10 +844,6 @@ def test_create_web_transaction_instant_test_error_404(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "randomizedStartTime" : false, @@ -936,11 +896,7 @@ def test_create_web_transaction_instant_test_error_404(self) -> None: "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 30, "createdDate" : "2022-07-17T22:00:54Z", @@ -1036,10 +992,6 @@ def test_create_web_transaction_instant_test_error_429(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "randomizedStartTime" : false, @@ -1092,11 +1044,7 @@ def test_create_web_transaction_instant_test_error_429(self) -> None: "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 30, "createdDate" : "2022-07-17T22:00:54Z", @@ -1192,10 +1140,6 @@ def test_create_web_transaction_instant_test_error_500(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "randomizedStartTime" : false, @@ -1248,11 +1192,7 @@ def test_create_web_transaction_instant_test_error_500(self) -> None: "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 30, "createdDate" : "2022-07-17T22:00:54Z", @@ -1348,10 +1288,6 @@ def test_create_web_transaction_instant_test_error_502(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" ], "randomizedStartTime" : false, @@ -1404,11 +1340,7 @@ def test_create_web_transaction_instant_test_error_502(self) -> None: "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 30, "createdDate" : "2022-07-17T22:00:54Z", diff --git a/thousandeyes-sdk-internet-insights/README.md b/thousandeyes-sdk-internet-insights/README.md index d1cf823cb..9dd2b66c3 100644 --- a/thousandeyes-sdk-internet-insights/README.md +++ b/thousandeyes-sdk-internet-insights/README.md @@ -16,7 +16,7 @@ For more information about Internet Insights, see the [Internet Insights](https: This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.103 +- API version: 7.0.104 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-internet-insights/test/test_internet_insights_catalog_providers_api.py b/thousandeyes-sdk-internet-insights/test/test_internet_insights_catalog_providers_api.py index c485b4b58..483ae5063 100644 --- a/thousandeyes-sdk-internet-insights/test/test_internet_insights_catalog_providers_api.py +++ b/thousandeyes-sdk-internet-insights/test/test_internet_insights_catalog_providers_api.py @@ -45,6 +45,7 @@ def test_filter_catalog_providers_models_validation(self) -> None: request_from_json = thousandeyes_sdk.internet_insights.models.ApiCatalogProviderFilter.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "_links" : { @@ -111,10 +112,12 @@ def test_filter_catalog_providers_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.internet_insights.models.ApiCatalogProviderResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_catalog_provider_models_validation(self) -> None: """Test case for get_catalog_provider request and response models""" + response_body_json = """ { "_links" : { @@ -153,6 +156,7 @@ def test_get_catalog_provider_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.internet_insights.models.ApiCatalogProviderDetails.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-internet-insights/test/test_internet_insights_outages_api.py b/thousandeyes-sdk-internet-insights/test/test_internet_insights_outages_api.py index 76054d25f..bc8a8761e 100644 --- a/thousandeyes-sdk-internet-insights/test/test_internet_insights_outages_api.py +++ b/thousandeyes-sdk-internet-insights/test/test_internet_insights_outages_api.py @@ -45,6 +45,7 @@ def test_filter_outages_models_validation(self) -> None: request_from_json = thousandeyes_sdk.internet_insights.models.ApiOutageFilter.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "_links" : { @@ -121,10 +122,12 @@ def test_filter_outages_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.internet_insights.models.ApiOutagesResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_app_outage_models_validation(self) -> None: """Test case for get_app_outage request and response models""" + response_body_json = """ { "affectedDomains" : [ "amazon.com", "amazon.com" ], @@ -188,10 +191,12 @@ def test_get_app_outage_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.internet_insights.models.ApiApplicationOutageDetails.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_network_outage_models_validation(self) -> None: """Test case for get_network_outage request and response models""" + response_body_json = """ { "affectedDomains" : [ "periodic-failure.com", "periodic-failure.com" ], @@ -243,6 +248,7 @@ def test_get_network_outage_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.internet_insights.models.ApiNetworkOutageDetails.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-snapshots/README.md b/thousandeyes-sdk-snapshots/README.md index 4503071be..8d76fb0ec 100644 --- a/thousandeyes-sdk-snapshots/README.md +++ b/thousandeyes-sdk-snapshots/README.md @@ -3,7 +3,7 @@ Creates a new test snapshot in ThousandEyes. This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.103 +- API version: 7.0.104 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-snapshots/test/test_test_snapshots_api.py b/thousandeyes-sdk-snapshots/test/test_test_snapshots_api.py index 40e308768..94144ff7b 100644 --- a/thousandeyes-sdk-snapshots/test/test_test_snapshots_api.py +++ b/thousandeyes-sdk-snapshots/test/test_test_snapshots_api.py @@ -43,6 +43,7 @@ def test_create_test_snapshot_models_validation(self) -> None: request_from_json = thousandeyes_sdk.snapshots.models.SnapshotRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "shareDate" : "2023-06-06T00:00:00Z", @@ -114,6 +115,7 @@ def test_create_test_snapshot_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.snapshots.models.SnapshotResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-streaming/README.md b/thousandeyes-sdk-streaming/README.md index 58a8c0400..b6c1b2e4b 100644 --- a/thousandeyes-sdk-streaming/README.md +++ b/thousandeyes-sdk-streaming/README.md @@ -25,7 +25,7 @@ For more information about ThousandEyes for OpenTelemetry, see the [product docu This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.103 +- API version: 7.0.104 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-streaming/test/test_streaming_api.py b/thousandeyes-sdk-streaming/test/test_streaming_api.py index 4bc5fed77..930df5d51 100644 --- a/thousandeyes-sdk-streaming/test/test_streaming_api.py +++ b/thousandeyes-sdk-streaming/test/test_streaming_api.py @@ -102,6 +102,7 @@ def test_create_stream_models_validation(self) -> None: request_from_json = thousandeyes_sdk.streaming.models.Stream.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "endpointAgentLabel" : [ { @@ -187,14 +188,17 @@ def test_create_stream_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.streaming.models.CreateStreamResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_delete_stream_models_validation(self) -> None: """Test case for delete_stream request and response models""" + def test_get_stream_models_validation(self) -> None: """Test case for get_stream request and response models""" + response_body_json = """ { "endpointAgentLabel" : [ { @@ -282,10 +286,12 @@ def test_get_stream_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.streaming.models.GetStreamResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_streams_models_validation(self) -> None: """Test case for get_streams request and response models""" + response_body_json = """ [ { "endpointAgentLabel" : [ { @@ -457,6 +463,7 @@ def test_get_streams_models_validation(self) -> None: for index, element in enumerate(response_from_dict): self.assertIsNotNone(element) assert_constructed_model_matches_example_json(element, response_loaded_json[index]) + def test_update_stream_models_validation(self) -> None: """Test case for update_stream request and response models""" @@ -528,6 +535,7 @@ def test_update_stream_models_validation(self) -> None: request_from_json = thousandeyes_sdk.streaming.models.PutStream.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "endpointAgentLabel" : [ { @@ -615,6 +623,7 @@ def test_update_stream_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.streaming.models.GetStreamResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-tags/README.md b/thousandeyes-sdk-tags/README.md index e079cd352..4e8dfc51e 100644 --- a/thousandeyes-sdk-tags/README.md +++ b/thousandeyes-sdk-tags/README.md @@ -16,7 +16,7 @@ Things to note with the ThousandEyes Tags API: This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.103 +- API version: 7.0.104 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-tags/test/test_tag_assignment_api.py b/thousandeyes-sdk-tags/test/test_tag_assignment_api.py index 8d3e5367b..af77ba0bf 100644 --- a/thousandeyes-sdk-tags/test/test_tag_assignment_api.py +++ b/thousandeyes-sdk-tags/test/test_tag_assignment_api.py @@ -46,6 +46,7 @@ def test_assign_tag_models_validation(self) -> None: request_from_json = thousandeyes_sdk.tags.models.TagAssignment.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "assignments" : [ { @@ -73,6 +74,7 @@ def test_assign_tag_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tags.models.BulkTagAssignment.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_assign_tags_models_validation(self) -> None: """Test case for assign_tags request and response models""" @@ -140,6 +142,7 @@ def test_assign_tags_models_validation(self) -> None: request_from_json = thousandeyes_sdk.tags.models.BulkTagAssignments.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "_links" : { @@ -202,6 +205,7 @@ def test_assign_tags_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tags.models.BulkTagAssignments.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_unassign_tag_models_validation(self) -> None: """Test case for unassign_tag request and response models""" @@ -221,6 +225,7 @@ def test_unassign_tag_models_validation(self) -> None: request_from_json = thousandeyes_sdk.tags.models.TagAssignment.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + def test_unassign_tags_models_validation(self) -> None: """Test case for unassign_tags request and response models""" @@ -288,6 +293,7 @@ def test_unassign_tags_models_validation(self) -> None: request_from_json = thousandeyes_sdk.tags.models.BulkTagAssignments.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "_links" : { @@ -350,6 +356,7 @@ def test_unassign_tags_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tags.models.BulkTagAssignments.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-tags/test/test_tags_api.py b/thousandeyes-sdk-tags/test/test_tags_api.py index 866e623e2..489cf99a2 100644 --- a/thousandeyes-sdk-tags/test/test_tags_api.py +++ b/thousandeyes-sdk-tags/test/test_tags_api.py @@ -72,6 +72,7 @@ def test_create_tag_models_validation(self) -> None: request_from_json = thousandeyes_sdk.tags.models.TagInfo.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "assignments" : [ { @@ -124,6 +125,7 @@ def test_create_tag_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tags.models.Tag.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_create_tags_models_validation(self) -> None: """Test case for create_tags request and response models""" @@ -322,6 +324,7 @@ def test_create_tags_models_validation(self) -> None: request_from_json = thousandeyes_sdk.tags.models.BulkTagResponse.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "_links" : { @@ -515,14 +518,17 @@ def test_create_tags_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tags.models.BulkTagResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_delete_tag_models_validation(self) -> None: """Test case for delete_tag request and response models""" + def test_get_tag_models_validation(self) -> None: """Test case for get_tag request and response models""" + response_body_json = """ { "assignments" : [ { @@ -575,10 +581,12 @@ def test_get_tag_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tags.models.Tag.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_tags_models_validation(self) -> None: """Test case for get_tags request and response models""" + response_body_json = """ { "_links" : { @@ -691,6 +699,7 @@ def test_get_tags_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tags.models.Tags.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_update_tag_models_validation(self) -> None: """Test case for update_tag request and response models""" @@ -736,6 +745,7 @@ def test_update_tag_models_validation(self) -> None: request_from_json = thousandeyes_sdk.tags.models.TagInfo.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "assignments" : [ { @@ -788,6 +798,7 @@ def test_update_tag_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tags.models.Tag.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-test-results/README.md b/thousandeyes-sdk-test-results/README.md index 6405597c7..5d18ceace 100644 --- a/thousandeyes-sdk-test-results/README.md +++ b/thousandeyes-sdk-test-results/README.md @@ -3,7 +3,7 @@ Get test result metrics for Network and Application Synthetics tests. This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.103 +- API version: 7.0.104 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-test-results/test/test_api_test_results_api.py b/thousandeyes-sdk-test-results/test/test_api_test_results_api.py index 844348372..f4dc08984 100644 --- a/thousandeyes-sdk-test-results/test/test_api_test_results_api.py +++ b/thousandeyes-sdk-test-results/test/test_api_test_results_api.py @@ -31,6 +31,7 @@ def tearDown(self) -> None: def test_get_test_api_agent_round_results_models_validation(self) -> None: """Test case for get_test_api_agent_round_results request and response models""" + response_body_json = """ { "test" : { @@ -255,10 +256,12 @@ def test_get_test_api_agent_round_results_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.test_results.models.ApiDetailTestResults.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_test_api_results_models_validation(self) -> None: """Test case for get_test_api_results request and response models""" + response_body_json = """ { "test" : { @@ -387,6 +390,7 @@ def test_get_test_api_results_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.test_results.models.ApiTestResults.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-test-results/test/test_dns_server_test_results_api.py b/thousandeyes-sdk-test-results/test/test_dns_server_test_results_api.py index bead99932..71f978264 100644 --- a/thousandeyes-sdk-test-results/test/test_dns_server_test_results_api.py +++ b/thousandeyes-sdk-test-results/test/test_dns_server_test_results_api.py @@ -31,6 +31,7 @@ def tearDown(self) -> None: def test_get_test_dns_server_result_models_validation(self) -> None: """Test case for get_test_dns_server_result request and response models""" + response_body_json = """ { "test" : { @@ -161,10 +162,12 @@ def test_get_test_dns_server_result_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.test_results.models.DnsServerTestResults.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_test_dns_servers_results_models_validation(self) -> None: """Test case for get_test_dns_servers_results request and response models""" + response_body_json = """ { "test" : { @@ -295,6 +298,7 @@ def test_get_test_dns_servers_results_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.test_results.models.DnsServerTestResults.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-test-results/test/test_dns_trace_test_results_api.py b/thousandeyes-sdk-test-results/test/test_dns_trace_test_results_api.py index 4c9a15c71..54f09c05f 100644 --- a/thousandeyes-sdk-test-results/test/test_dns_trace_test_results_api.py +++ b/thousandeyes-sdk-test-results/test/test_dns_trace_test_results_api.py @@ -31,6 +31,7 @@ def tearDown(self) -> None: def test_get_test_dns_trace_results_models_validation(self) -> None: """Test case for get_test_dns_trace_results request and response models""" + response_body_json = """ { "test" : { @@ -165,6 +166,7 @@ def test_get_test_dns_trace_results_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.test_results.models.DnsTraceTestResults.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-test-results/test/test_dnssec_test_results_api.py b/thousandeyes-sdk-test-results/test/test_dnssec_test_results_api.py index 27d1f60ee..52c68040e 100644 --- a/thousandeyes-sdk-test-results/test/test_dnssec_test_results_api.py +++ b/thousandeyes-sdk-test-results/test/test_dnssec_test_results_api.py @@ -31,6 +31,7 @@ def tearDown(self) -> None: def test_get_test_dns_sec_results_models_validation(self) -> None: """Test case for get_test_dns_sec_results request and response models""" + response_body_json = """ { "test" : { @@ -155,6 +156,7 @@ def test_get_test_dns_sec_results_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.test_results.models.DnssecTestResults.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-test-results/test/test_network_bgp_test_results_api.py b/thousandeyes-sdk-test-results/test/test_network_bgp_test_results_api.py index efd34ea5c..e1afba447 100644 --- a/thousandeyes-sdk-test-results/test/test_network_bgp_test_results_api.py +++ b/thousandeyes-sdk-test-results/test/test_network_bgp_test_results_api.py @@ -31,6 +31,7 @@ def tearDown(self) -> None: def test_get_test_bgp_results_models_validation(self) -> None: """Test case for get_test_bgp_results request and response models""" + response_body_json = """ { "test" : { @@ -159,10 +160,12 @@ def test_get_test_bgp_results_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.test_results.models.BgpTestResults.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_test_bgp_routes_prefix_round_results_models_validation(self) -> None: """Test case for get_test_bgp_routes_prefix_round_results request and response models""" + response_body_json = """ { "test" : { @@ -275,6 +278,7 @@ def test_get_test_bgp_routes_prefix_round_results_models_validation(self) -> Non response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.test_results.models.BgpTestRouteInformationResults.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-test-results/test/test_network_test_results_api.py b/thousandeyes-sdk-test-results/test/test_network_test_results_api.py index ff11aaf36..ef915e066 100644 --- a/thousandeyes-sdk-test-results/test/test_network_test_results_api.py +++ b/thousandeyes-sdk-test-results/test/test_network_test_results_api.py @@ -31,6 +31,7 @@ def tearDown(self) -> None: def test_get_test_network_results_models_validation(self) -> None: """Test case for get_test_network_results request and response models""" + response_body_json = """ { "test" : { @@ -189,10 +190,12 @@ def test_get_test_network_results_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.test_results.models.NetworkTestResults.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_test_path_vis_agent_round_results_models_validation(self) -> None: """Test case for get_test_path_vis_agent_round_results request and response models""" + response_body_json = """ { "test" : { @@ -389,10 +392,12 @@ def test_get_test_path_vis_agent_round_results_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.test_results.models.PathVisDetailTestResults.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_test_path_vis_results_models_validation(self) -> None: """Test case for get_test_path_vis_results request and response models""" + response_body_json = """ { "test" : { @@ -555,6 +560,7 @@ def test_get_test_path_vis_results_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.test_results.models.PathVisTestResults.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-test-results/test/test_voice_rtp_server_test_results_api.py b/thousandeyes-sdk-test-results/test/test_voice_rtp_server_test_results_api.py index 292e97848..8e5e28d68 100644 --- a/thousandeyes-sdk-test-results/test/test_voice_rtp_server_test_results_api.py +++ b/thousandeyes-sdk-test-results/test/test_voice_rtp_server_test_results_api.py @@ -31,6 +31,7 @@ def tearDown(self) -> None: def test_get_test_rtp_server_results_models_validation(self) -> None: """Test case for get_test_rtp_server_results request and response models""" + response_body_json = """ { "test" : { @@ -173,6 +174,7 @@ def test_get_test_rtp_server_results_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.test_results.models.RtpStreamTestResults.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-test-results/test/test_voice_sip_server_test_results_api.py b/thousandeyes-sdk-test-results/test/test_voice_sip_server_test_results_api.py index aaa8d210c..92607f196 100644 --- a/thousandeyes-sdk-test-results/test/test_voice_sip_server_test_results_api.py +++ b/thousandeyes-sdk-test-results/test/test_voice_sip_server_test_results_api.py @@ -31,6 +31,7 @@ def tearDown(self) -> None: def test_get_test_sip_server_results_models_validation(self) -> None: """Test case for get_test_sip_server_results request and response models""" + response_body_json = """ { "test" : { @@ -183,6 +184,7 @@ def test_get_test_sip_server_results_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.test_results.models.SipServerTestResults.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-test-results/test/test_web_ftp_server_test_results_api.py b/thousandeyes-sdk-test-results/test/test_web_ftp_server_test_results_api.py index 196e56148..724c5007c 100644 --- a/thousandeyes-sdk-test-results/test/test_web_ftp_server_test_results_api.py +++ b/thousandeyes-sdk-test-results/test/test_web_ftp_server_test_results_api.py @@ -31,6 +31,7 @@ def tearDown(self) -> None: def test_get_test_ftp_server_results_models_validation(self) -> None: """Test case for get_test_ftp_server_results request and response models""" + response_body_json = """ { "test" : { @@ -177,6 +178,7 @@ def test_get_test_ftp_server_results_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.test_results.models.FtpServerTestResults.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-test-results/test/test_web_http_server_test_results_api.py b/thousandeyes-sdk-test-results/test/test_web_http_server_test_results_api.py index 036fe7133..df8893b95 100644 --- a/thousandeyes-sdk-test-results/test/test_web_http_server_test_results_api.py +++ b/thousandeyes-sdk-test-results/test/test_web_http_server_test_results_api.py @@ -31,6 +31,7 @@ def tearDown(self) -> None: def test_get_test_http_server_results_models_validation(self) -> None: """Test case for get_test_http_server_results request and response models""" + response_body_json = """ { "test" : { @@ -359,6 +360,7 @@ def test_get_test_http_server_results_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.test_results.models.HttpTestResults.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-test-results/test/test_web_page_load_test_results_api.py b/thousandeyes-sdk-test-results/test/test_web_page_load_test_results_api.py index c16b6f3dc..123ef838a 100644 --- a/thousandeyes-sdk-test-results/test/test_web_page_load_test_results_api.py +++ b/thousandeyes-sdk-test-results/test/test_web_page_load_test_results_api.py @@ -31,6 +31,7 @@ def tearDown(self) -> None: def test_get_test_page_load_agent_round_results_models_validation(self) -> None: """Test case for get_test_page_load_agent_round_results request and response models""" + response_body_json = """ { "test" : { @@ -593,10 +594,12 @@ def test_get_test_page_load_agent_round_results_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.test_results.models.PageLoadDetailTestResults.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_test_page_load_results_models_validation(self) -> None: """Test case for get_test_page_load_results request and response models""" + response_body_json = """ { "test" : { @@ -729,6 +732,7 @@ def test_get_test_page_load_results_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.test_results.models.PageLoadTestResults.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-test-results/test/test_web_transactions_test_results_api.py b/thousandeyes-sdk-test-results/test/test_web_transactions_test_results_api.py index ee2763a2f..5041393c3 100644 --- a/thousandeyes-sdk-test-results/test/test_web_transactions_test_results_api.py +++ b/thousandeyes-sdk-test-results/test/test_web_transactions_test_results_api.py @@ -31,6 +31,7 @@ def tearDown(self) -> None: def test_get_test_console_logs_agent_round_results_models_validation(self) -> None: """Test case for get_test_console_logs_agent_round_results request and response models""" + response_body_json = """ { "test" : { @@ -163,10 +164,12 @@ def test_get_test_console_logs_agent_round_results_models_validation(self) -> No response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.test_results.models.ConsoleLogsTestResults.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_test_web_transaction_agent_round_page_results_models_validation(self) -> None: """Test case for get_test_web_transaction_agent_round_page_results request and response models""" + response_body_json = """ { "test" : { @@ -765,10 +768,12 @@ def test_get_test_web_transaction_agent_round_page_results_models_validation(sel response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.test_results.models.WebTransactionPageDetailTestResults.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_test_web_transaction_agent_round_results_models_validation(self) -> None: """Test case for get_test_web_transaction_agent_round_results request and response models""" + response_body_json = """ { "test" : { @@ -935,10 +940,12 @@ def test_get_test_web_transaction_agent_round_results_models_validation(self) -> response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.test_results.models.WebTransactionDetailTestResults.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_test_web_transaction_results_models_validation(self) -> None: """Test case for get_test_web_transaction_results request and response models""" + response_body_json = """ { "test" : { @@ -1067,6 +1074,7 @@ def test_get_test_web_transaction_results_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.test_results.models.WebTransactionTestResults.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-tests/.openapi-generator/FILES b/thousandeyes-sdk-tests/.openapi-generator/FILES index 970f22d6e..842aeff9c 100644 --- a/thousandeyes-sdk-tests/.openapi-generator/FILES +++ b/thousandeyes-sdk-tests/.openapi-generator/FILES @@ -3,7 +3,6 @@ MANIFEST.in README.md docs/APITestsApi.md docs/AgentBase.md -docs/AgentInterfaces.md docs/AgentResponse.md docs/AgentToAgentInstantTest.md docs/AgentToAgentProperties.md @@ -129,9 +128,11 @@ docs/SipServerTestRequest.md docs/SipServerTestResponse.md docs/SipServerTests.md docs/SipTestProtocol.md +docs/SourceInterfaceTestRequest.md docs/TestAgentRequest.md docs/TestAgentResponse.md docs/TestAgentResponseProperties.md +docs/TestAgentWithSourceIpRequest.md docs/TestAuthType.md docs/TestChromiumTrack.md docs/TestCustomHeaders.md @@ -218,7 +219,6 @@ src/thousandeyes_sdk/tests/api/voice_tests_api.py src/thousandeyes_sdk/tests/api/web_transaction_tests_api.py src/thousandeyes_sdk/tests/models/__init__.py src/thousandeyes_sdk/tests/models/agent_base.py -src/thousandeyes_sdk/tests/models/agent_interfaces.py src/thousandeyes_sdk/tests/models/agent_response.py src/thousandeyes_sdk/tests/models/agent_to_agent_instant_test.py src/thousandeyes_sdk/tests/models/agent_to_agent_properties.py @@ -333,9 +333,11 @@ src/thousandeyes_sdk/tests/models/sip_server_test_request.py src/thousandeyes_sdk/tests/models/sip_server_test_response.py src/thousandeyes_sdk/tests/models/sip_server_tests.py src/thousandeyes_sdk/tests/models/sip_test_protocol.py +src/thousandeyes_sdk/tests/models/source_interface_test_request.py src/thousandeyes_sdk/tests/models/test_agent_request.py src/thousandeyes_sdk/tests/models/test_agent_response.py src/thousandeyes_sdk/tests/models/test_agent_response_properties.py +src/thousandeyes_sdk/tests/models/test_agent_with_source_ip_request.py src/thousandeyes_sdk/tests/models/test_auth_type.py src/thousandeyes_sdk/tests/models/test_chromium_track.py src/thousandeyes_sdk/tests/models/test_custom_headers.py diff --git a/thousandeyes-sdk-tests/README.md b/thousandeyes-sdk-tests/README.md index 1dd77d4fb..ea53a70f4 100644 --- a/thousandeyes-sdk-tests/README.md +++ b/thousandeyes-sdk-tests/README.md @@ -6,7 +6,7 @@ This API allows you to list, create, edit, and delete Network and Application Sy This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.103 +- API version: 7.0.104 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator @@ -175,7 +175,6 @@ Class | Method | HTTP request | Description ## Documentation For Models - [AgentBase](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-tests/docs/AgentBase.md) - - [AgentInterfaces](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-tests/docs/AgentInterfaces.md) - [AgentResponse](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-tests/docs/AgentResponse.md) - [AgentToAgentInstantTest](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-tests/docs/AgentToAgentInstantTest.md) - [AgentToAgentProperties](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-tests/docs/AgentToAgentProperties.md) @@ -290,9 +289,11 @@ Class | Method | HTTP request | Description - [SipServerTestResponse](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-tests/docs/SipServerTestResponse.md) - [SipServerTests](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-tests/docs/SipServerTests.md) - [SipTestProtocol](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-tests/docs/SipTestProtocol.md) + - [SourceInterfaceTestRequest](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-tests/docs/SourceInterfaceTestRequest.md) - [TestAgentRequest](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-tests/docs/TestAgentRequest.md) - [TestAgentResponse](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-tests/docs/TestAgentResponse.md) - [TestAgentResponseProperties](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-tests/docs/TestAgentResponseProperties.md) + - [TestAgentWithSourceIpRequest](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-tests/docs/TestAgentWithSourceIpRequest.md) - [TestAuthType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-tests/docs/TestAuthType.md) - [TestChromiumTrack](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-tests/docs/TestChromiumTrack.md) - [TestCustomHeaders](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-tests/docs/TestCustomHeaders.md) diff --git a/thousandeyes-sdk-tests/docs/AgentInterfaces.md b/thousandeyes-sdk-tests/docs/AgentInterfaces.md deleted file mode 100644 index cd8e0b27a..000000000 --- a/thousandeyes-sdk-tests/docs/AgentInterfaces.md +++ /dev/null @@ -1,30 +0,0 @@ -# AgentInterfaces - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ip_address** | **str** | IP address of the agent interface. | [optional] -**agent_id** | **str** | The agent ID of the enterprise agent for the test. | [optional] - -## Example - -```python -from thousandeyes_sdk.tests.models.agent_interfaces import AgentInterfaces - -# TODO update the JSON string below -json = "{}" -# create an instance of AgentInterfaces from a JSON string -agent_interfaces_instance = AgentInterfaces.from_json(json) -# print the JSON string representation of the object -print(AgentInterfaces.to_json()) - -# convert the object into a dict -agent_interfaces_dict = agent_interfaces_instance.to_dict() -# create an instance of AgentInterfaces from a dict -agent_interfaces_from_dict = AgentInterfaces.from_dict(agent_interfaces_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) - - diff --git a/thousandeyes-sdk-tests/docs/AgentToAgentTestRequest.md b/thousandeyes-sdk-tests/docs/AgentToAgentTestRequest.md index 7b3fc019d..fc513c951 100644 --- a/thousandeyes-sdk-tests/docs/AgentToAgentTestRequest.md +++ b/thousandeyes-sdk-tests/docs/AgentToAgentTestRequest.md @@ -39,7 +39,7 @@ Name | Type | Description | Notes **tags** | **List[str]** | Contains list of test tag IDs (get `id` from `/tags` endpoint). | [optional] **shared_with_accounts** | **List[str]** | Contains list of account group IDs. Test is shared with the listed account groups (get `aid` from `/account-groups` endpoint) | [optional] **alert_rules** | **List[str]** | List of alert rules IDs to apply to the test (get `ruleId` from `/alerts/rules` endpoint. If `alertsEnabled` is set to `true` and `alertRules` is not included on test creation or update, applicable user default alert rules will be used) | [optional] -**agents** | [**List[TestAgentRequest]**](TestAgentRequest.md) | Contains list of Agent IDs (get `agentId` from `/agents` endpoint). | +**agents** | [**List[TestAgentWithSourceIpRequest]**](TestAgentWithSourceIpRequest.md) | Agents assigned to the test. To select a source interface, set `sourceIpAddress` on the same object as its `agentId`. | **monitors** | **List[str]** | Contains list of BGP monitor IDs (get `monitorId` from `/monitors` endpoint) | [optional] ## Example diff --git a/thousandeyes-sdk-tests/docs/AgentToServerTestRequest.md b/thousandeyes-sdk-tests/docs/AgentToServerTestRequest.md index 79cfcf02d..5943048fb 100644 --- a/thousandeyes-sdk-tests/docs/AgentToServerTestRequest.md +++ b/thousandeyes-sdk-tests/docs/AgentToServerTestRequest.md @@ -40,7 +40,7 @@ Name | Type | Description | Notes **tags** | **List[str]** | Contains list of test tag IDs (get `id` from `/tags` endpoint). | [optional] **shared_with_accounts** | **List[str]** | Contains list of account group IDs. Test is shared with the listed account groups (get `aid` from `/account-groups` endpoint) | [optional] **alert_rules** | **List[str]** | List of alert rules IDs to apply to the test (get `ruleId` from `/alerts/rules` endpoint. If `alertsEnabled` is set to `true` and `alertRules` is not included on test creation or update, applicable user default alert rules will be used) | [optional] -**agents** | [**List[TestAgentRequest]**](TestAgentRequest.md) | Contains list of Agent IDs (get `agentId` from `/agents` endpoint). | +**agents** | [**List[TestAgentWithSourceIpRequest]**](TestAgentWithSourceIpRequest.md) | Agents assigned to the test. To select a source interface, set `sourceIpAddress` on the same object as its `agentId`. | **monitors** | **List[str]** | Contains list of BGP monitor IDs (get `monitorId` from `/monitors` endpoint) | [optional] **port** | **int** | Port number to use for the test. The default port is 80. | [optional] diff --git a/thousandeyes-sdk-tests/docs/ApiTestRequest.md b/thousandeyes-sdk-tests/docs/ApiTestRequest.md index a53ae0938..49ed3d888 100644 --- a/thousandeyes-sdk-tests/docs/ApiTestRequest.md +++ b/thousandeyes-sdk-tests/docs/ApiTestRequest.md @@ -45,7 +45,7 @@ Name | Type | Description | Notes **tags** | **List[str]** | Contains list of test tag IDs (get `id` from `/tags` endpoint). | [optional] **shared_with_accounts** | **List[str]** | Contains list of account group IDs. Test is shared with the listed account groups (get `aid` from `/account-groups` endpoint) | [optional] **alert_rules** | **List[str]** | List of alert rules IDs to apply to the test (get `ruleId` from `/alerts/rules` endpoint. If `alertsEnabled` is set to `true` and `alertRules` is not included on test creation or update, applicable user default alert rules will be used) | [optional] -**agents** | [**List[TestAgentRequest]**](TestAgentRequest.md) | Contains list of Agent IDs (get `agentId` from `/agents` endpoint). | +**agents** | [**List[TestAgentRequest]**](TestAgentRequest.md) | Agents assigned to the test. | **monitors** | **List[str]** | Contains list of BGP monitor IDs (get `monitorId` from `/monitors` endpoint) | [optional] **credentials** | **List[str]** | Contains a list of credential IDs (get `credentialId` from `/credentials` endpoint). | [optional] **vault_credentials** | [**List[TestVaultCredential]**](TestVaultCredential.md) | List of credential IDs that are stored in an external vault. | [optional] diff --git a/thousandeyes-sdk-tests/docs/DnsSecTestRequest.md b/thousandeyes-sdk-tests/docs/DnsSecTestRequest.md index 9bac0bd66..10b6d88f7 100644 --- a/thousandeyes-sdk-tests/docs/DnsSecTestRequest.md +++ b/thousandeyes-sdk-tests/docs/DnsSecTestRequest.md @@ -26,7 +26,7 @@ Name | Type | Description | Notes **tags** | **List[str]** | Contains list of test tag IDs (get `id` from `/tags` endpoint). | [optional] **shared_with_accounts** | **List[str]** | Contains list of account group IDs. Test is shared with the listed account groups (get `aid` from `/account-groups` endpoint) | [optional] **alert_rules** | **List[str]** | List of alert rules IDs to apply to the test (get `ruleId` from `/alerts/rules` endpoint. If `alertsEnabled` is set to `true` and `alertRules` is not included on test creation or update, applicable user default alert rules will be used) | [optional] -**agents** | [**List[TestAgentRequest]**](TestAgentRequest.md) | Contains list of Agent IDs (get `agentId` from `/agents` endpoint). | +**agents** | [**List[TestAgentRequest]**](TestAgentRequest.md) | Agents assigned to the test. | ## Example diff --git a/thousandeyes-sdk-tests/docs/DnsServerTestRequest.md b/thousandeyes-sdk-tests/docs/DnsServerTestRequest.md index 67f4afec2..24142bd69 100644 --- a/thousandeyes-sdk-tests/docs/DnsServerTestRequest.md +++ b/thousandeyes-sdk-tests/docs/DnsServerTestRequest.md @@ -40,7 +40,7 @@ Name | Type | Description | Notes **tags** | **List[str]** | Contains list of test tag IDs (get `id` from `/tags` endpoint). | [optional] **shared_with_accounts** | **List[str]** | Contains list of account group IDs. Test is shared with the listed account groups (get `aid` from `/account-groups` endpoint) | [optional] **alert_rules** | **List[str]** | List of alert rules IDs to apply to the test (get `ruleId` from `/alerts/rules` endpoint. If `alertsEnabled` is set to `true` and `alertRules` is not included on test creation or update, applicable user default alert rules will be used) | [optional] -**agents** | [**List[TestAgentRequest]**](TestAgentRequest.md) | Contains list of Agent IDs (get `agentId` from `/agents` endpoint). | +**agents** | [**List[TestAgentRequest]**](TestAgentRequest.md) | Agents assigned to the test. | **monitors** | **List[str]** | Contains list of BGP monitor IDs (get `monitorId` from `/monitors` endpoint) | [optional] ## Example diff --git a/thousandeyes-sdk-tests/docs/DnsTraceTestRequest.md b/thousandeyes-sdk-tests/docs/DnsTraceTestRequest.md index d9b6a89a4..4ee8f544a 100644 --- a/thousandeyes-sdk-tests/docs/DnsTraceTestRequest.md +++ b/thousandeyes-sdk-tests/docs/DnsTraceTestRequest.md @@ -27,7 +27,7 @@ Name | Type | Description | Notes **tags** | **List[str]** | Contains list of test tag IDs (get `id` from `/tags` endpoint). | [optional] **shared_with_accounts** | **List[str]** | Contains list of account group IDs. Test is shared with the listed account groups (get `aid` from `/account-groups` endpoint) | [optional] **alert_rules** | **List[str]** | List of alert rules IDs to apply to the test (get `ruleId` from `/alerts/rules` endpoint. If `alertsEnabled` is set to `true` and `alertRules` is not included on test creation or update, applicable user default alert rules will be used) | [optional] -**agents** | [**List[TestAgentRequest]**](TestAgentRequest.md) | Contains list of Agent IDs (get `agentId` from `/agents` endpoint). | +**agents** | [**List[TestAgentRequest]**](TestAgentRequest.md) | Agents assigned to the test. | ## Example diff --git a/thousandeyes-sdk-tests/docs/FtpServerTestRequest.md b/thousandeyes-sdk-tests/docs/FtpServerTestRequest.md index 1d7e872fe..e65577889 100644 --- a/thousandeyes-sdk-tests/docs/FtpServerTestRequest.md +++ b/thousandeyes-sdk-tests/docs/FtpServerTestRequest.md @@ -44,7 +44,7 @@ Name | Type | Description | Notes **tags** | **List[str]** | Contains list of test tag IDs (get `id` from `/tags` endpoint). | [optional] **shared_with_accounts** | **List[str]** | Contains list of account group IDs. Test is shared with the listed account groups (get `aid` from `/account-groups` endpoint) | [optional] **alert_rules** | **List[str]** | List of alert rules IDs to apply to the test (get `ruleId` from `/alerts/rules` endpoint. If `alertsEnabled` is set to `true` and `alertRules` is not included on test creation or update, applicable user default alert rules will be used) | [optional] -**agents** | [**List[TestAgentRequest]**](TestAgentRequest.md) | Contains list of Agent IDs (get `agentId` from `/agents` endpoint). | +**agents** | [**List[TestAgentWithSourceIpRequest]**](TestAgentWithSourceIpRequest.md) | Agents assigned to the test. To select a source interface, set `sourceIpAddress` on the same object as its `agentId`. | **monitors** | **List[str]** | Contains list of BGP monitor IDs (get `monitorId` from `/monitors` endpoint) | [optional] ## Example diff --git a/thousandeyes-sdk-tests/docs/HttpServerBaseProperties.md b/thousandeyes-sdk-tests/docs/HttpServerBaseProperties.md index aa21cfdf5..43985206a 100644 --- a/thousandeyes-sdk-tests/docs/HttpServerBaseProperties.md +++ b/thousandeyes-sdk-tests/docs/HttpServerBaseProperties.md @@ -6,7 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] -**agent_interfaces** | [**AgentInterfaces**](AgentInterfaces.md) | | [optional] **bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] **client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] **content_regex** | **str** | Content regex, this field does not require escaping. | [optional] diff --git a/thousandeyes-sdk-tests/docs/HttpServerInstantTest.md b/thousandeyes-sdk-tests/docs/HttpServerInstantTest.md index cee33ff0f..bdb059205 100644 --- a/thousandeyes-sdk-tests/docs/HttpServerInstantTest.md +++ b/thousandeyes-sdk-tests/docs/HttpServerInstantTest.md @@ -20,7 +20,6 @@ Name | Type | Description | Notes **tags** | [**List[TestTag]**](TestTag.md) | Tags assigned to the test. Returned only when `expand=tag` is specified. This field is not returned for Instant Tests. For more information, see `/tags`. | [optional] [readonly] **shared_with_accounts** | [**List[SharedWithAccount]**](SharedWithAccount.md) | | [optional] [readonly] **auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] -**agent_interfaces** | [**AgentInterfaces**](AgentInterfaces.md) | | [optional] **bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] **client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] **content_regex** | **str** | Content regex, this field does not require escaping. | [optional] diff --git a/thousandeyes-sdk-tests/docs/HttpServerProperties.md b/thousandeyes-sdk-tests/docs/HttpServerProperties.md index 125d04450..359231f4a 100644 --- a/thousandeyes-sdk-tests/docs/HttpServerProperties.md +++ b/thousandeyes-sdk-tests/docs/HttpServerProperties.md @@ -6,7 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] -**agent_interfaces** | [**AgentInterfaces**](AgentInterfaces.md) | | [optional] **bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] **client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] **content_regex** | **str** | Content regex, this field does not require escaping. | [optional] diff --git a/thousandeyes-sdk-tests/docs/HttpServerTest.md b/thousandeyes-sdk-tests/docs/HttpServerTest.md index dc26e2439..eae5a5ba9 100644 --- a/thousandeyes-sdk-tests/docs/HttpServerTest.md +++ b/thousandeyes-sdk-tests/docs/HttpServerTest.md @@ -24,7 +24,6 @@ Name | Type | Description | Notes **tags** | [**List[TestTag]**](TestTag.md) | Tags assigned to the test. Returned only when `expand=tag` is specified. This field is not returned for Instant Tests. For more information, see `/tags`. | [optional] [readonly] **shared_with_accounts** | [**List[SharedWithAccount]**](SharedWithAccount.md) | | [optional] [readonly] **auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] -**agent_interfaces** | [**AgentInterfaces**](AgentInterfaces.md) | | [optional] **bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] **client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] **content_regex** | **str** | Content regex, this field does not require escaping. | [optional] diff --git a/thousandeyes-sdk-tests/docs/HttpServerTestRequest.md b/thousandeyes-sdk-tests/docs/HttpServerTestRequest.md index a10bad0e2..651947712 100644 --- a/thousandeyes-sdk-tests/docs/HttpServerTestRequest.md +++ b/thousandeyes-sdk-tests/docs/HttpServerTestRequest.md @@ -20,7 +20,6 @@ Name | Type | Description | Notes **type** | **str** | | [optional] [readonly] **links** | [**TestLinks**](TestLinks.md) | | [optional] **auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] -**agent_interfaces** | [**AgentInterfaces**](AgentInterfaces.md) | | [optional] **bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] **client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] **content_regex** | **str** | Content regex, this field does not require escaping. | [optional] @@ -66,7 +65,7 @@ Name | Type | Description | Notes **tags** | **List[str]** | Contains list of test tag IDs (get `id` from `/tags` endpoint). | [optional] **shared_with_accounts** | **List[str]** | Contains list of account group IDs. Test is shared with the listed account groups (get `aid` from `/account-groups` endpoint) | [optional] **alert_rules** | **List[str]** | List of alert rules IDs to apply to the test (get `ruleId` from `/alerts/rules` endpoint. If `alertsEnabled` is set to `true` and `alertRules` is not included on test creation or update, applicable user default alert rules will be used) | [optional] -**agents** | [**List[TestAgentRequest]**](TestAgentRequest.md) | Contains list of Agent IDs (get `agentId` from `/agents` endpoint). | +**agents** | [**List[TestAgentWithSourceIpRequest]**](TestAgentWithSourceIpRequest.md) | Agents assigned to the test. To select a source interface, set `sourceIpAddress` on the same object as its `agentId`. | **monitors** | **List[str]** | Contains list of BGP monitor IDs (get `monitorId` from `/monitors` endpoint) | [optional] ## Example diff --git a/thousandeyes-sdk-tests/docs/HttpServerTestResponse.md b/thousandeyes-sdk-tests/docs/HttpServerTestResponse.md index cf2a5f407..797a45e18 100644 --- a/thousandeyes-sdk-tests/docs/HttpServerTestResponse.md +++ b/thousandeyes-sdk-tests/docs/HttpServerTestResponse.md @@ -24,7 +24,6 @@ Name | Type | Description | Notes **tags** | [**List[TestTag]**](TestTag.md) | Tags assigned to the test. Returned only when `expand=tag` is specified. This field is not returned for Instant Tests. For more information, see `/tags`. | [optional] [readonly] **shared_with_accounts** | [**List[SharedWithAccount]**](SharedWithAccount.md) | | [optional] [readonly] **auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] -**agent_interfaces** | [**AgentInterfaces**](AgentInterfaces.md) | | [optional] **bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] **client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] **content_regex** | **str** | Content regex, this field does not require escaping. | [optional] diff --git a/thousandeyes-sdk-tests/docs/PageLoadInstantTest.md b/thousandeyes-sdk-tests/docs/PageLoadInstantTest.md index 3a2797117..97882c68e 100644 --- a/thousandeyes-sdk-tests/docs/PageLoadInstantTest.md +++ b/thousandeyes-sdk-tests/docs/PageLoadInstantTest.md @@ -20,7 +20,6 @@ Name | Type | Description | Notes **tags** | [**List[TestTag]**](TestTag.md) | Tags assigned to the test. Returned only when `expand=tag` is specified. This field is not returned for Instant Tests. For more information, see `/tags`. | [optional] [readonly] **shared_with_accounts** | [**List[SharedWithAccount]**](SharedWithAccount.md) | | [optional] [readonly] **auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] -**agent_interfaces** | [**AgentInterfaces**](AgentInterfaces.md) | | [optional] **bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] **client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] **content_regex** | **str** | Content regex, this field does not require escaping. | [optional] diff --git a/thousandeyes-sdk-tests/docs/PageLoadProperties.md b/thousandeyes-sdk-tests/docs/PageLoadProperties.md index 3dc98dc07..67cd837c0 100644 --- a/thousandeyes-sdk-tests/docs/PageLoadProperties.md +++ b/thousandeyes-sdk-tests/docs/PageLoadProperties.md @@ -6,7 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] -**agent_interfaces** | [**AgentInterfaces**](AgentInterfaces.md) | | [optional] **bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] **client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] **content_regex** | **str** | Content regex, this field does not require escaping. | [optional] diff --git a/thousandeyes-sdk-tests/docs/PageLoadTest.md b/thousandeyes-sdk-tests/docs/PageLoadTest.md index e62ee6957..fd76c5a5f 100644 --- a/thousandeyes-sdk-tests/docs/PageLoadTest.md +++ b/thousandeyes-sdk-tests/docs/PageLoadTest.md @@ -24,7 +24,6 @@ Name | Type | Description | Notes **tags** | [**List[TestTag]**](TestTag.md) | Tags assigned to the test. Returned only when `expand=tag` is specified. This field is not returned for Instant Tests. For more information, see `/tags`. | [optional] [readonly] **shared_with_accounts** | [**List[SharedWithAccount]**](SharedWithAccount.md) | | [optional] [readonly] **auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] -**agent_interfaces** | [**AgentInterfaces**](AgentInterfaces.md) | | [optional] **bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] **client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] **content_regex** | **str** | Content regex, this field does not require escaping. | [optional] diff --git a/thousandeyes-sdk-tests/docs/PageLoadTestRequest.md b/thousandeyes-sdk-tests/docs/PageLoadTestRequest.md index 04e5fad84..fe6ef7788 100644 --- a/thousandeyes-sdk-tests/docs/PageLoadTestRequest.md +++ b/thousandeyes-sdk-tests/docs/PageLoadTestRequest.md @@ -20,7 +20,6 @@ Name | Type | Description | Notes **type** | **str** | | [optional] [readonly] **links** | [**TestLinks**](TestLinks.md) | | [optional] **auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] -**agent_interfaces** | [**AgentInterfaces**](AgentInterfaces.md) | | [optional] **bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] **client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] **content_regex** | **str** | Content regex, this field does not require escaping. | [optional] @@ -77,7 +76,7 @@ Name | Type | Description | Notes **tags** | **List[str]** | Contains list of test tag IDs (get `id` from `/tags` endpoint). | [optional] **shared_with_accounts** | **List[str]** | Contains list of account group IDs. Test is shared with the listed account groups (get `aid` from `/account-groups` endpoint) | [optional] **alert_rules** | **List[str]** | List of alert rules IDs to apply to the test (get `ruleId` from `/alerts/rules` endpoint. If `alertsEnabled` is set to `true` and `alertRules` is not included on test creation or update, applicable user default alert rules will be used) | [optional] -**agents** | [**List[TestAgentRequest]**](TestAgentRequest.md) | Contains list of Agent IDs (get `agentId` from `/agents` endpoint). | +**agents** | [**List[TestAgentRequest]**](TestAgentRequest.md) | Agents assigned to the test. | **monitors** | **List[str]** | Contains list of BGP monitor IDs (get `monitorId` from `/monitors` endpoint) | [optional] ## Example diff --git a/thousandeyes-sdk-tests/docs/PageLoadTestResponse.md b/thousandeyes-sdk-tests/docs/PageLoadTestResponse.md index 6d2a79dd8..1c191e2c4 100644 --- a/thousandeyes-sdk-tests/docs/PageLoadTestResponse.md +++ b/thousandeyes-sdk-tests/docs/PageLoadTestResponse.md @@ -24,7 +24,6 @@ Name | Type | Description | Notes **tags** | [**List[TestTag]**](TestTag.md) | Tags assigned to the test. Returned only when `expand=tag` is specified. This field is not returned for Instant Tests. For more information, see `/tags`. | [optional] [readonly] **shared_with_accounts** | [**List[SharedWithAccount]**](SharedWithAccount.md) | | [optional] [readonly] **auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] -**agent_interfaces** | [**AgentInterfaces**](AgentInterfaces.md) | | [optional] **bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] **client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] **content_regex** | **str** | Content regex, this field does not require escaping. | [optional] diff --git a/thousandeyes-sdk-tests/docs/SipServerTestRequest.md b/thousandeyes-sdk-tests/docs/SipServerTestRequest.md index 620db3c65..106480e89 100644 --- a/thousandeyes-sdk-tests/docs/SipServerTestRequest.md +++ b/thousandeyes-sdk-tests/docs/SipServerTestRequest.md @@ -35,7 +35,7 @@ Name | Type | Description | Notes **tags** | **List[str]** | Contains list of test tag IDs (get `id` from `/tags` endpoint). | [optional] **shared_with_accounts** | **List[str]** | Contains list of account group IDs. Test is shared with the listed account groups (get `aid` from `/account-groups` endpoint) | [optional] **alert_rules** | **List[str]** | List of alert rules IDs to apply to the test (get `ruleId` from `/alerts/rules` endpoint. If `alertsEnabled` is set to `true` and `alertRules` is not included on test creation or update, applicable user default alert rules will be used) | [optional] -**agents** | [**List[TestAgentRequest]**](TestAgentRequest.md) | Contains list of Agent IDs (get `agentId` from `/agents` endpoint). | +**agents** | [**List[TestAgentWithSourceIpRequest]**](TestAgentWithSourceIpRequest.md) | Agents assigned to the test. To select a source interface, set `sourceIpAddress` on the same object as its `agentId`. | **monitors** | **List[str]** | Contains list of BGP monitor IDs (get `monitorId` from `/monitors` endpoint) | [optional] **target_sip_credentials** | [**TestSipCredentials**](TestSipCredentials.md) | | **bgp_measurements** | **bool** | Set to `true` to enable bgp measurements. | [optional] [default to True] diff --git a/thousandeyes-sdk-tests/docs/SourceInterfaceTestRequest.md b/thousandeyes-sdk-tests/docs/SourceInterfaceTestRequest.md new file mode 100644 index 000000000..0b5707556 --- /dev/null +++ b/thousandeyes-sdk-tests/docs/SourceInterfaceTestRequest.md @@ -0,0 +1,33 @@ +# SourceInterfaceTestRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**labels** | **List[str]** | Contains list of test label IDs (get `labelId` from `/labels` endpoint) | [optional] +**tags** | **List[str]** | Contains list of test tag IDs (get `id` from `/tags` endpoint). | [optional] +**shared_with_accounts** | **List[str]** | Contains list of account group IDs. Test is shared with the listed account groups (get `aid` from `/account-groups` endpoint) | [optional] +**alert_rules** | **List[str]** | List of alert rules IDs to apply to the test (get `ruleId` from `/alerts/rules` endpoint. If `alertsEnabled` is set to `true` and `alertRules` is not included on test creation or update, applicable user default alert rules will be used) | [optional] +**agents** | [**List[TestAgentWithSourceIpRequest]**](TestAgentWithSourceIpRequest.md) | Agents assigned to the test. To select a source interface, set `sourceIpAddress` on the same object as its `agentId`. | + +## Example + +```python +from thousandeyes_sdk.tests.models.source_interface_test_request import SourceInterfaceTestRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of SourceInterfaceTestRequest from a JSON string +source_interface_test_request_instance = SourceInterfaceTestRequest.from_json(json) +# print the JSON string representation of the object +print(SourceInterfaceTestRequest.to_json()) + +# convert the object into a dict +source_interface_test_request_dict = source_interface_test_request_instance.to_dict() +# create an instance of SourceInterfaceTestRequest from a dict +source_interface_test_request_from_dict = SourceInterfaceTestRequest.from_dict(source_interface_test_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-tests/docs/TestAgentRequest.md b/thousandeyes-sdk-tests/docs/TestAgentRequest.md index c9f160021..d50311082 100644 --- a/thousandeyes-sdk-tests/docs/TestAgentRequest.md +++ b/thousandeyes-sdk-tests/docs/TestAgentRequest.md @@ -6,7 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **agent_id** | **str** | The agent ID. Get `agentId` from `/agents` endpoint. | -**source_ip_address** | **str** | The IP address from the `ipAddresses` field in agent details, used for interface selection. Get `ipAddresses` from the `/agents` endpoint. | [optional] ## Example diff --git a/thousandeyes-sdk-tests/docs/TestAgentWithSourceIpRequest.md b/thousandeyes-sdk-tests/docs/TestAgentWithSourceIpRequest.md new file mode 100644 index 000000000..a3c1baf7f --- /dev/null +++ b/thousandeyes-sdk-tests/docs/TestAgentWithSourceIpRequest.md @@ -0,0 +1,30 @@ +# TestAgentWithSourceIpRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**agent_id** | **str** | The agent ID. Get `agentId` from `/agents` endpoint. | +**source_ip_address** | **str** | The Enterprise Agent interface IP address to use as the source for the test. The address must be listed in the agent's `ipAddresses` field, available from the `/agents` endpoint. It is not supported for Cloud Agents or Enterprise Agent clusters. | [optional] + +## Example + +```python +from thousandeyes_sdk.tests.models.test_agent_with_source_ip_request import TestAgentWithSourceIpRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of TestAgentWithSourceIpRequest from a JSON string +test_agent_with_source_ip_request_instance = TestAgentWithSourceIpRequest.from_json(json) +# print the JSON string representation of the object +print(TestAgentWithSourceIpRequest.to_json()) + +# convert the object into a dict +test_agent_with_source_ip_request_dict = test_agent_with_source_ip_request_instance.to_dict() +# create an instance of TestAgentWithSourceIpRequest from a dict +test_agent_with_source_ip_request_from_dict = TestAgentWithSourceIpRequest.from_dict(test_agent_with_source_ip_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-tests/docs/TestRequest.md b/thousandeyes-sdk-tests/docs/TestRequest.md index e44438a33..93f9e3ac0 100644 --- a/thousandeyes-sdk-tests/docs/TestRequest.md +++ b/thousandeyes-sdk-tests/docs/TestRequest.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **tags** | **List[str]** | Contains list of test tag IDs (get `id` from `/tags` endpoint). | [optional] **shared_with_accounts** | **List[str]** | Contains list of account group IDs. Test is shared with the listed account groups (get `aid` from `/account-groups` endpoint) | [optional] **alert_rules** | **List[str]** | List of alert rules IDs to apply to the test (get `ruleId` from `/alerts/rules` endpoint. If `alertsEnabled` is set to `true` and `alertRules` is not included on test creation or update, applicable user default alert rules will be used) | [optional] -**agents** | [**List[TestAgentRequest]**](TestAgentRequest.md) | Contains list of Agent IDs (get `agentId` from `/agents` endpoint). | +**agents** | [**List[TestAgentRequest]**](TestAgentRequest.md) | Agents assigned to the test. | ## Example diff --git a/thousandeyes-sdk-tests/docs/UnexpandedHttpServerTest.md b/thousandeyes-sdk-tests/docs/UnexpandedHttpServerTest.md index 94e780083..fa2edf31d 100644 --- a/thousandeyes-sdk-tests/docs/UnexpandedHttpServerTest.md +++ b/thousandeyes-sdk-tests/docs/UnexpandedHttpServerTest.md @@ -20,7 +20,6 @@ Name | Type | Description | Notes **type** | **str** | | [optional] [readonly] **links** | [**TestLinks**](TestLinks.md) | | [optional] **auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] -**agent_interfaces** | [**AgentInterfaces**](AgentInterfaces.md) | | [optional] **bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] **client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] **content_regex** | **str** | Content regex, this field does not require escaping. | [optional] diff --git a/thousandeyes-sdk-tests/docs/UnexpandedPageLoadTest.md b/thousandeyes-sdk-tests/docs/UnexpandedPageLoadTest.md index fbe7fde17..ac642879c 100644 --- a/thousandeyes-sdk-tests/docs/UnexpandedPageLoadTest.md +++ b/thousandeyes-sdk-tests/docs/UnexpandedPageLoadTest.md @@ -20,7 +20,6 @@ Name | Type | Description | Notes **type** | **str** | | [optional] [readonly] **links** | [**TestLinks**](TestLinks.md) | | [optional] **auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] -**agent_interfaces** | [**AgentInterfaces**](AgentInterfaces.md) | | [optional] **bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] **client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] **content_regex** | **str** | Content regex, this field does not require escaping. | [optional] diff --git a/thousandeyes-sdk-tests/docs/UnexpandedWebTransactionTest.md b/thousandeyes-sdk-tests/docs/UnexpandedWebTransactionTest.md index 5b21fa489..b3d149e97 100644 --- a/thousandeyes-sdk-tests/docs/UnexpandedWebTransactionTest.md +++ b/thousandeyes-sdk-tests/docs/UnexpandedWebTransactionTest.md @@ -20,7 +20,6 @@ Name | Type | Description | Notes **type** | **str** | | [optional] [readonly] **links** | [**TestLinks**](TestLinks.md) | | [optional] **auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] -**agent_interfaces** | [**AgentInterfaces**](AgentInterfaces.md) | | [optional] **bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] **client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] **content_regex** | **str** | Content regex, this field does not require escaping. | [optional] diff --git a/thousandeyes-sdk-tests/docs/UpdateAgentToServerTestRequest.md b/thousandeyes-sdk-tests/docs/UpdateAgentToServerTestRequest.md index e99405766..c96cf3b79 100644 --- a/thousandeyes-sdk-tests/docs/UpdateAgentToServerTestRequest.md +++ b/thousandeyes-sdk-tests/docs/UpdateAgentToServerTestRequest.md @@ -25,7 +25,7 @@ Name | Type | Description | Notes **ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] **ping_payload_size** | **int** | Payload size (not total packet size) for the end-to-end metric's probes, ping payload size allows values from 0 to 1400 bytes. When set to null, payload sizes are 0 bytes for ICMP-based tests and 1 byte for TCP-based tests. | [optional] **network_measurements** | **bool** | View packet loss in 1-second intervals. This is only available for 1-minute interval tests. Set to `true` to enable network measurements. | [optional] [default to False] -**agents** | [**List[TestAgentRequest]**](TestAgentRequest.md) | Contains list of Agent IDs (get `agentId` from `/agents` endpoint). | [optional] +**agents** | [**List[TestAgentWithSourceIpRequest]**](TestAgentWithSourceIpRequest.md) | Agents assigned to the test. To select a source interface, set `sourceIpAddress` on the same object as its `agentId`. | [optional] **interval** | [**TestInterval**](TestInterval.md) | | [optional] **alerts_enabled** | **bool** | Indicates if alerts are enabled. | [optional] **enabled** | **bool** | Test is enabled. | [optional] [default to True] diff --git a/thousandeyes-sdk-tests/docs/VoiceTestRequest.md b/thousandeyes-sdk-tests/docs/VoiceTestRequest.md index 5a8d666c1..a098c9bc5 100644 --- a/thousandeyes-sdk-tests/docs/VoiceTestRequest.md +++ b/thousandeyes-sdk-tests/docs/VoiceTestRequest.md @@ -35,7 +35,7 @@ Name | Type | Description | Notes **tags** | **List[str]** | Contains list of test tag IDs (get `id` from `/tags` endpoint). | [optional] **shared_with_accounts** | **List[str]** | Contains list of account group IDs. Test is shared with the listed account groups (get `aid` from `/account-groups` endpoint) | [optional] **alert_rules** | **List[str]** | List of alert rules IDs to apply to the test (get `ruleId` from `/alerts/rules` endpoint. If `alertsEnabled` is set to `true` and `alertRules` is not included on test creation or update, applicable user default alert rules will be used) | [optional] -**agents** | [**List[TestAgentRequest]**](TestAgentRequest.md) | Contains list of Agent IDs (get `agentId` from `/agents` endpoint). | +**agents** | [**List[TestAgentWithSourceIpRequest]**](TestAgentWithSourceIpRequest.md) | Agents assigned to the test. To select a source interface, set `sourceIpAddress` on the same object as its `agentId`. | **monitors** | **List[str]** | Contains list of BGP monitor IDs (get `monitorId` from `/monitors` endpoint) | [optional] ## Example diff --git a/thousandeyes-sdk-tests/docs/WebTransactionInstantTest.md b/thousandeyes-sdk-tests/docs/WebTransactionInstantTest.md index 599a9f46a..5688e5a3e 100644 --- a/thousandeyes-sdk-tests/docs/WebTransactionInstantTest.md +++ b/thousandeyes-sdk-tests/docs/WebTransactionInstantTest.md @@ -20,7 +20,6 @@ Name | Type | Description | Notes **tags** | [**List[TestTag]**](TestTag.md) | Tags assigned to the test. Returned only when `expand=tag` is specified. This field is not returned for Instant Tests. For more information, see `/tags`. | [optional] [readonly] **shared_with_accounts** | [**List[SharedWithAccount]**](SharedWithAccount.md) | | [optional] [readonly] **auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] -**agent_interfaces** | [**AgentInterfaces**](AgentInterfaces.md) | | [optional] **bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] **client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] **content_regex** | **str** | Content regex, this field does not require escaping. | [optional] diff --git a/thousandeyes-sdk-tests/docs/WebTransactionProperties.md b/thousandeyes-sdk-tests/docs/WebTransactionProperties.md index 0afedf623..38270fd43 100644 --- a/thousandeyes-sdk-tests/docs/WebTransactionProperties.md +++ b/thousandeyes-sdk-tests/docs/WebTransactionProperties.md @@ -6,7 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] -**agent_interfaces** | [**AgentInterfaces**](AgentInterfaces.md) | | [optional] **bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] **client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] **content_regex** | **str** | Content regex, this field does not require escaping. | [optional] diff --git a/thousandeyes-sdk-tests/docs/WebTransactionTest.md b/thousandeyes-sdk-tests/docs/WebTransactionTest.md index 045e776ed..d4eed1c96 100644 --- a/thousandeyes-sdk-tests/docs/WebTransactionTest.md +++ b/thousandeyes-sdk-tests/docs/WebTransactionTest.md @@ -24,7 +24,6 @@ Name | Type | Description | Notes **tags** | [**List[TestTag]**](TestTag.md) | Tags assigned to the test. Returned only when `expand=tag` is specified. This field is not returned for Instant Tests. For more information, see `/tags`. | [optional] [readonly] **shared_with_accounts** | [**List[SharedWithAccount]**](SharedWithAccount.md) | | [optional] [readonly] **auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] -**agent_interfaces** | [**AgentInterfaces**](AgentInterfaces.md) | | [optional] **bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] **client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] **content_regex** | **str** | Content regex, this field does not require escaping. | [optional] diff --git a/thousandeyes-sdk-tests/docs/WebTransactionTestRequest.md b/thousandeyes-sdk-tests/docs/WebTransactionTestRequest.md index 067f76024..026542046 100644 --- a/thousandeyes-sdk-tests/docs/WebTransactionTestRequest.md +++ b/thousandeyes-sdk-tests/docs/WebTransactionTestRequest.md @@ -20,7 +20,6 @@ Name | Type | Description | Notes **type** | **str** | | [optional] [readonly] **links** | [**TestLinks**](TestLinks.md) | | [optional] **auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] -**agent_interfaces** | [**AgentInterfaces**](AgentInterfaces.md) | | [optional] **bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] **client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] **content_regex** | **str** | Content regex, this field does not require escaping. | [optional] @@ -78,7 +77,7 @@ Name | Type | Description | Notes **tags** | **List[str]** | Contains list of test tag IDs (get `id` from `/tags` endpoint). | [optional] **shared_with_accounts** | **List[str]** | Contains list of account group IDs. Test is shared with the listed account groups (get `aid` from `/account-groups` endpoint) | [optional] **alert_rules** | **List[str]** | List of alert rules IDs to apply to the test (get `ruleId` from `/alerts/rules` endpoint. If `alertsEnabled` is set to `true` and `alertRules` is not included on test creation or update, applicable user default alert rules will be used) | [optional] -**agents** | [**List[TestAgentRequest]**](TestAgentRequest.md) | Contains list of Agent IDs (get `agentId` from `/agents` endpoint). | +**agents** | [**List[TestAgentRequest]**](TestAgentRequest.md) | Agents assigned to the test. | **monitors** | **List[str]** | Contains list of BGP monitor IDs (get `monitorId` from `/monitors` endpoint) | [optional] **credentials** | **List[str]** | Contains a list of credential IDs (get `credentialId` from `/credentials` endpoint). | [optional] diff --git a/thousandeyes-sdk-tests/docs/WebTransactionTestResponse.md b/thousandeyes-sdk-tests/docs/WebTransactionTestResponse.md index ee81de945..ee8ff8568 100644 --- a/thousandeyes-sdk-tests/docs/WebTransactionTestResponse.md +++ b/thousandeyes-sdk-tests/docs/WebTransactionTestResponse.md @@ -24,7 +24,6 @@ Name | Type | Description | Notes **tags** | [**List[TestTag]**](TestTag.md) | Tags assigned to the test. Returned only when `expand=tag` is specified. This field is not returned for Instant Tests. For more information, see `/tags`. | [optional] [readonly] **shared_with_accounts** | [**List[SharedWithAccount]**](SharedWithAccount.md) | | [optional] [readonly] **auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] -**agent_interfaces** | [**AgentInterfaces**](AgentInterfaces.md) | | [optional] **bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] **client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] **content_regex** | **str** | Content regex, this field does not require escaping. | [optional] diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/__init__.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/__init__.py index 970381acb..de46863d0 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/__init__.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/__init__.py @@ -33,7 +33,6 @@ # import models into sdk package from thousandeyes_sdk.tests.models.agent_base import AgentBase -from thousandeyes_sdk.tests.models.agent_interfaces import AgentInterfaces from thousandeyes_sdk.tests.models.agent_response import AgentResponse from thousandeyes_sdk.tests.models.agent_to_agent_instant_test import AgentToAgentInstantTest from thousandeyes_sdk.tests.models.agent_to_agent_properties import AgentToAgentProperties @@ -148,9 +147,11 @@ from thousandeyes_sdk.tests.models.sip_server_test_response import SipServerTestResponse from thousandeyes_sdk.tests.models.sip_server_tests import SipServerTests from thousandeyes_sdk.tests.models.sip_test_protocol import SipTestProtocol +from thousandeyes_sdk.tests.models.source_interface_test_request import SourceInterfaceTestRequest from thousandeyes_sdk.tests.models.test_agent_request import TestAgentRequest from thousandeyes_sdk.tests.models.test_agent_response import TestAgentResponse from thousandeyes_sdk.tests.models.test_agent_response_properties import TestAgentResponseProperties +from thousandeyes_sdk.tests.models.test_agent_with_source_ip_request import TestAgentWithSourceIpRequest from thousandeyes_sdk.tests.models.test_auth_type import TestAuthType from thousandeyes_sdk.tests.models.test_chromium_track import TestChromiumTrack from thousandeyes_sdk.tests.models.test_custom_headers import TestCustomHeaders diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/__init__.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/__init__.py index ce4e78c73..946877919 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/__init__.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/__init__.py @@ -14,7 +14,6 @@ # import models into model package from thousandeyes_sdk.tests.models.agent_base import AgentBase -from thousandeyes_sdk.tests.models.agent_interfaces import AgentInterfaces from thousandeyes_sdk.tests.models.agent_response import AgentResponse from thousandeyes_sdk.tests.models.agent_to_agent_instant_test import AgentToAgentInstantTest from thousandeyes_sdk.tests.models.agent_to_agent_properties import AgentToAgentProperties @@ -129,9 +128,11 @@ from thousandeyes_sdk.tests.models.sip_server_test_response import SipServerTestResponse from thousandeyes_sdk.tests.models.sip_server_tests import SipServerTests from thousandeyes_sdk.tests.models.sip_test_protocol import SipTestProtocol +from thousandeyes_sdk.tests.models.source_interface_test_request import SourceInterfaceTestRequest from thousandeyes_sdk.tests.models.test_agent_request import TestAgentRequest from thousandeyes_sdk.tests.models.test_agent_response import TestAgentResponse from thousandeyes_sdk.tests.models.test_agent_response_properties import TestAgentResponseProperties +from thousandeyes_sdk.tests.models.test_agent_with_source_ip_request import TestAgentWithSourceIpRequest from thousandeyes_sdk.tests.models.test_auth_type import TestAuthType from thousandeyes_sdk.tests.models.test_chromium_track import TestChromiumTrack from thousandeyes_sdk.tests.models.test_custom_headers import TestCustomHeaders diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_to_agent_test_request.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_to_agent_test_request.py index 3b2eba1c8..49bebdffe 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_to_agent_test_request.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_to_agent_test_request.py @@ -21,7 +21,7 @@ from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated from thousandeyes_sdk.tests.models.agent_to_agent_test_protocol import AgentToAgentTestProtocol -from thousandeyes_sdk.tests.models.test_agent_request import TestAgentRequest +from thousandeyes_sdk.tests.models.test_agent_with_source_ip_request import TestAgentWithSourceIpRequest from thousandeyes_sdk.tests.models.test_direction import TestDirection from thousandeyes_sdk.tests.models.test_dscp_id import TestDscpId from thousandeyes_sdk.tests.models.test_interval import TestInterval @@ -68,7 +68,7 @@ class AgentToAgentTestRequest(BaseModel): tags: Optional[List[StrictStr]] = Field(default=None, description="Contains list of test tag IDs (get `id` from `/tags` endpoint).") shared_with_accounts: Optional[List[StrictStr]] = Field(default=None, description="Contains list of account group IDs. Test is shared with the listed account groups (get `aid` from `/account-groups` endpoint)", alias="sharedWithAccounts") alert_rules: Optional[List[StrictStr]] = Field(default=None, description="List of alert rules IDs to apply to the test (get `ruleId` from `/alerts/rules` endpoint. If `alertsEnabled` is set to `true` and `alertRules` is not included on test creation or update, applicable user default alert rules will be used)", alias="alertRules") - agents: List[TestAgentRequest] = Field(description="Contains list of Agent IDs (get `agentId` from `/agents` endpoint).") + agents: List[TestAgentWithSourceIpRequest] = Field(description="Agents assigned to the test. To select a source interface, set `sourceIpAddress` on the same object as its `agentId`.") monitors: Optional[List[StrictStr]] = Field(default=None, description="Contains list of BGP monitor IDs (get `monitorId` from `/monitors` endpoint)") __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "direction", "dscp", "dscpId", "mss", "numPathTraces", "pathTraceMode", "port", "protocol", "randomizedStartTime", "targetAgentId", "throughputMeasurements", "throughputDuration", "throughputRate", "fixedPacketRate", "bgpMeasurements", "usePublicBgp", "labels", "tags", "sharedWithAccounts", "alertRules", "agents", "monitors"] @@ -186,7 +186,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "tags": obj.get("tags"), "sharedWithAccounts": obj.get("sharedWithAccounts"), "alertRules": obj.get("alertRules"), - "agents": [TestAgentRequest.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None, + "agents": [TestAgentWithSourceIpRequest.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None, "monitors": obj.get("monitors") }) return _obj diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_to_server_test_request.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_to_server_test_request.py index d8bd7f936..3ebbb514f 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_to_server_test_request.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_to_server_test_request.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from thousandeyes_sdk.tests.models.test_agent_request import TestAgentRequest +from thousandeyes_sdk.tests.models.test_agent_with_source_ip_request import TestAgentWithSourceIpRequest from thousandeyes_sdk.tests.models.test_dscp_id import TestDscpId from thousandeyes_sdk.tests.models.test_interval import TestInterval from thousandeyes_sdk.tests.models.test_ipv6_policy import TestIpv6Policy @@ -70,7 +70,7 @@ class AgentToServerTestRequest(BaseModel): tags: Optional[List[StrictStr]] = Field(default=None, description="Contains list of test tag IDs (get `id` from `/tags` endpoint).") shared_with_accounts: Optional[List[StrictStr]] = Field(default=None, description="Contains list of account group IDs. Test is shared with the listed account groups (get `aid` from `/account-groups` endpoint)", alias="sharedWithAccounts") alert_rules: Optional[List[StrictStr]] = Field(default=None, description="List of alert rules IDs to apply to the test (get `ruleId` from `/alerts/rules` endpoint. If `alertsEnabled` is set to `true` and `alertRules` is not included on test creation or update, applicable user default alert rules will be used)", alias="alertRules") - agents: List[TestAgentRequest] = Field(description="Contains list of Agent IDs (get `agentId` from `/agents` endpoint).") + agents: List[TestAgentWithSourceIpRequest] = Field(description="Agents assigned to the test. To select a source interface, set `sourceIpAddress` on the same object as its `agentId`.") monitors: Optional[List[StrictStr]] = Field(default=None, description="Contains list of BGP monitor IDs (get `monitorId` from `/monitors` endpoint)") port: Optional[StrictInt] = Field(default=None, description="Port number to use for the test. The default port is 80.") __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "bandwidthMeasurements", "continuousMode", "fixedPacketRate", "mtuMeasurements", "numPathTraces", "pathTraceMode", "probeMode", "protocol", "randomizedStartTime", "server", "dscp", "dscpId", "ipv6Policy", "pingPayloadSize", "networkMeasurements", "bgpMeasurements", "usePublicBgp", "labels", "tags", "sharedWithAccounts", "alertRules", "agents", "monitors", "port"] @@ -190,7 +190,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "tags": obj.get("tags"), "sharedWithAccounts": obj.get("sharedWithAccounts"), "alertRules": obj.get("alertRules"), - "agents": [TestAgentRequest.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None, + "agents": [TestAgentWithSourceIpRequest.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None, "monitors": obj.get("monitors"), "port": obj.get("port") }) diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_test_request.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_test_request.py index e5e81c8b2..28d5bf834 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_test_request.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_test_request.py @@ -77,7 +77,7 @@ class ApiTestRequest(BaseModel): tags: Optional[List[StrictStr]] = Field(default=None, description="Contains list of test tag IDs (get `id` from `/tags` endpoint).") shared_with_accounts: Optional[List[StrictStr]] = Field(default=None, description="Contains list of account group IDs. Test is shared with the listed account groups (get `aid` from `/account-groups` endpoint)", alias="sharedWithAccounts") alert_rules: Optional[List[StrictStr]] = Field(default=None, description="List of alert rules IDs to apply to the test (get `ruleId` from `/alerts/rules` endpoint. If `alertsEnabled` is set to `true` and `alertRules` is not included on test creation or update, applicable user default alert rules will be used)", alias="alertRules") - agents: List[TestAgentRequest] = Field(description="Contains list of Agent IDs (get `agentId` from `/agents` endpoint).") + agents: List[TestAgentRequest] = Field(description="Agents assigned to the test.") monitors: Optional[List[StrictStr]] = Field(default=None, description="Contains list of BGP monitor IDs (get `monitorId` from `/monitors` endpoint)") credentials: Optional[List[StrictStr]] = Field(default=None, description="Contains a list of credential IDs (get `credentialId` from `/credentials` endpoint).") vault_credentials: Optional[List[TestVaultCredential]] = Field(default=None, description="List of credential IDs that are stored in an external vault.", alias="vaultCredentials") diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_sec_test_request.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_sec_test_request.py index 710025599..c50a9d144 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_sec_test_request.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_sec_test_request.py @@ -51,7 +51,7 @@ class DnsSecTestRequest(BaseModel): tags: Optional[List[StrictStr]] = Field(default=None, description="Contains list of test tag IDs (get `id` from `/tags` endpoint).") shared_with_accounts: Optional[List[StrictStr]] = Field(default=None, description="Contains list of account group IDs. Test is shared with the listed account groups (get `aid` from `/account-groups` endpoint)", alias="sharedWithAccounts") alert_rules: Optional[List[StrictStr]] = Field(default=None, description="List of alert rules IDs to apply to the test (get `ruleId` from `/alerts/rules` endpoint. If `alertsEnabled` is set to `true` and `alertRules` is not included on test creation or update, applicable user default alert rules will be used)", alias="alertRules") - agents: List[TestAgentRequest] = Field(description="Contains list of Agent IDs (get `agentId` from `/agents` endpoint).") + agents: List[TestAgentRequest] = Field(description="Agents assigned to the test.") __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "domain", "dnsQueryClass", "randomizedStartTime", "labels", "tags", "sharedWithAccounts", "alertRules", "agents"] model_config = ConfigDict( diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_server_test_request.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_server_test_request.py index 167528967..2acc45c6f 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_server_test_request.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_server_test_request.py @@ -71,7 +71,7 @@ class DnsServerTestRequest(BaseModel): tags: Optional[List[StrictStr]] = Field(default=None, description="Contains list of test tag IDs (get `id` from `/tags` endpoint).") shared_with_accounts: Optional[List[StrictStr]] = Field(default=None, description="Contains list of account group IDs. Test is shared with the listed account groups (get `aid` from `/account-groups` endpoint)", alias="sharedWithAccounts") alert_rules: Optional[List[StrictStr]] = Field(default=None, description="List of alert rules IDs to apply to the test (get `ruleId` from `/alerts/rules` endpoint. If `alertsEnabled` is set to `true` and `alertRules` is not included on test creation or update, applicable user default alert rules will be used)", alias="alertRules") - agents: List[TestAgentRequest] = Field(description="Contains list of Agent IDs (get `agentId` from `/agents` endpoint).") + agents: List[TestAgentRequest] = Field(description="Agents assigned to the test.") monitors: Optional[List[StrictStr]] = Field(default=None, description="Contains list of BGP monitor IDs (get `monitorId` from `/monitors` endpoint)") __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "bandwidthMeasurements", "dnsServers", "dnsTransportProtocol", "domain", "mtuMeasurements", "networkMeasurements", "numPathTraces", "pathTraceMode", "probeMode", "protocol", "randomizedStartTime", "recursiveQueries", "ipv6Policy", "fixedPacketRate", "dnsQueryClass", "bgpMeasurements", "usePublicBgp", "labels", "tags", "sharedWithAccounts", "alertRules", "agents", "monitors"] diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_trace_test_request.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_trace_test_request.py index 0a25938cb..ee6f7f821 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_trace_test_request.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_trace_test_request.py @@ -53,7 +53,7 @@ class DnsTraceTestRequest(BaseModel): tags: Optional[List[StrictStr]] = Field(default=None, description="Contains list of test tag IDs (get `id` from `/tags` endpoint).") shared_with_accounts: Optional[List[StrictStr]] = Field(default=None, description="Contains list of account group IDs. Test is shared with the listed account groups (get `aid` from `/account-groups` endpoint)", alias="sharedWithAccounts") alert_rules: Optional[List[StrictStr]] = Field(default=None, description="List of alert rules IDs to apply to the test (get `ruleId` from `/alerts/rules` endpoint. If `alertsEnabled` is set to `true` and `alertRules` is not included on test creation or update, applicable user default alert rules will be used)", alias="alertRules") - agents: List[TestAgentRequest] = Field(description="Contains list of Agent IDs (get `agentId` from `/agents` endpoint).") + agents: List[TestAgentRequest] = Field(description="Agents assigned to the test.") __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "dnsTransportProtocol", "domain", "dnsQueryClass", "randomizedStartTime", "labels", "tags", "sharedWithAccounts", "alertRules", "agents"] model_config = ConfigDict( diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/ftp_server_test_request.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/ftp_server_test_request.py index 77f1c6041..8f09dd925 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/ftp_server_test_request.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/ftp_server_test_request.py @@ -21,7 +21,7 @@ from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated from thousandeyes_sdk.tests.models.ftp_server_request_type import FtpServerRequestType -from thousandeyes_sdk.tests.models.test_agent_request import TestAgentRequest +from thousandeyes_sdk.tests.models.test_agent_with_source_ip_request import TestAgentWithSourceIpRequest from thousandeyes_sdk.tests.models.test_interval import TestInterval from thousandeyes_sdk.tests.models.test_ipv6_policy import TestIpv6Policy from thousandeyes_sdk.tests.models.test_links import TestLinks @@ -74,7 +74,7 @@ class FtpServerTestRequest(BaseModel): tags: Optional[List[StrictStr]] = Field(default=None, description="Contains list of test tag IDs (get `id` from `/tags` endpoint).") shared_with_accounts: Optional[List[StrictStr]] = Field(default=None, description="Contains list of account group IDs. Test is shared with the listed account groups (get `aid` from `/account-groups` endpoint)", alias="sharedWithAccounts") alert_rules: Optional[List[StrictStr]] = Field(default=None, description="List of alert rules IDs to apply to the test (get `ruleId` from `/alerts/rules` endpoint. If `alertsEnabled` is set to `true` and `alertRules` is not included on test creation or update, applicable user default alert rules will be used)", alias="alertRules") - agents: List[TestAgentRequest] = Field(description="Contains list of Agent IDs (get `agentId` from `/agents` endpoint).") + agents: List[TestAgentWithSourceIpRequest] = Field(description="Agents assigned to the test. To select a source interface, set `sourceIpAddress` on the same object as its `agentId`.") monitors: Optional[List[StrictStr]] = Field(default=None, description="Contains list of BGP monitor IDs (get `monitorId` from `/monitors` endpoint)") __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "bandwidthMeasurements", "downloadLimit", "ftpTargetTime", "ftpTimeLimit", "mtuMeasurements", "networkMeasurements", "numPathTraces", "password", "pathTraceMode", "probeMode", "protocol", "randomizedStartTime", "requestType", "url", "useActiveFtp", "useExplicitFtps", "username", "fixedPacketRate", "ipv6Policy", "bgpMeasurements", "usePublicBgp", "labels", "tags", "sharedWithAccounts", "alertRules", "agents", "monitors"] @@ -195,7 +195,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "tags": obj.get("tags"), "sharedWithAccounts": obj.get("sharedWithAccounts"), "alertRules": obj.get("alertRules"), - "agents": [TestAgentRequest.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None, + "agents": [TestAgentWithSourceIpRequest.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None, "monitors": obj.get("monitors") }) return _obj diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/http_server_base_properties.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/http_server_base_properties.py index 0f14502a8..1e10dd8fa 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/http_server_base_properties.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/http_server_base_properties.py @@ -19,7 +19,6 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from thousandeyes_sdk.tests.models.agent_interfaces import AgentInterfaces from thousandeyes_sdk.tests.models.o_auth import OAuth from thousandeyes_sdk.tests.models.test_auth_type import TestAuthType from thousandeyes_sdk.tests.models.test_custom_headers import TestCustomHeaders @@ -36,7 +35,6 @@ class HttpServerBaseProperties(BaseModel): HttpServerBaseProperties """ # noqa: E501 auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") - agent_interfaces: Optional[AgentInterfaces] = Field(default=None, alias="agentInterfaces") bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") content_regex: Optional[StrictStr] = Field(default=None, description="Content regex, this field does not require escaping.", alias="contentRegex") @@ -71,7 +69,7 @@ class HttpServerBaseProperties(BaseModel): override_proxy_id: Optional[StrictStr] = Field(default=None, description="ID of the proxy to be used if the default proxy is overridden.", alias="overrideProxyId") collect_proxy_network_data: Optional[StrictBool] = Field(default=False, description="Indicates whether network data to the proxy should be collected.", alias="collectProxyNetworkData") vault_credentials: Optional[List[TestVaultCredential]] = Field(default=None, description="List of credential IDs that are stored in an external vault.", alias="vaultCredentials") - __properties: ClassVar[List[str]] = ["authType", "agentInterfaces", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials"] + __properties: ClassVar[List[str]] = ["authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials"] model_config = ConfigDict( populate_by_name=True, @@ -115,9 +113,6 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of agent_interfaces - if self.agent_interfaces: - _dict['agentInterfaces'] = self.agent_interfaces.to_dict() # override the default output from pydantic by calling `to_dict()` of custom_headers if self.custom_headers: _dict['customHeaders'] = self.custom_headers.to_dict() @@ -144,7 +139,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "authType": obj.get("authType"), - "agentInterfaces": AgentInterfaces.from_dict(obj["agentInterfaces"]) if obj.get("agentInterfaces") is not None else None, "bandwidthMeasurements": obj.get("bandwidthMeasurements"), "clientCertificate": obj.get("clientCertificate"), "contentRegex": obj.get("contentRegex"), diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/http_server_instant_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/http_server_instant_test.py index dd0885557..64826b681 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/http_server_instant_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/http_server_instant_test.py @@ -20,7 +20,6 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from thousandeyes_sdk.tests.models.agent_interfaces import AgentInterfaces from thousandeyes_sdk.tests.models.o_auth import OAuth from thousandeyes_sdk.tests.models.request_method import RequestMethod from thousandeyes_sdk.tests.models.shared_with_account import SharedWithAccount @@ -57,7 +56,6 @@ class HttpServerInstantTest(BaseModel): tags: Optional[List[TestTag]] = Field(default=None, description="Tags assigned to the test. Returned only when `expand=tag` is specified. This field is not returned for Instant Tests. For more information, see `/tags`.") shared_with_accounts: Optional[List[SharedWithAccount]] = Field(default=None, alias="sharedWithAccounts") auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") - agent_interfaces: Optional[AgentInterfaces] = Field(default=None, alias="agentInterfaces") bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") content_regex: Optional[StrictStr] = Field(default=None, description="Content regex, this field does not require escaping.", alias="contentRegex") @@ -97,7 +95,7 @@ class HttpServerInstantTest(BaseModel): request_method: Optional[RequestMethod] = Field(default=None, alias="requestMethod") post_body: Optional[StrictStr] = Field(default=None, description="Enter the body for the HTTP POST request in this field. No special escaping is required. If content is provided and `requestMethod` is not specified, `requestMethod` is automatically set to `post`.", alias="postBody") ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "tags", "sharedWithAccounts", "authType", "agentInterfaces", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "headers", "randomizedStartTime", "requestMethod", "postBody", "ipv6Policy"] + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "tags", "sharedWithAccounts", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "headers", "randomizedStartTime", "requestMethod", "postBody", "ipv6Policy"] model_config = ConfigDict( populate_by_name=True, @@ -187,9 +185,6 @@ def to_dict(self) -> Dict[str, Any]: if _item: _items.append(_item.to_dict()) _dict['sharedWithAccounts'] = _items - # override the default output from pydantic by calling `to_dict()` of agent_interfaces - if self.agent_interfaces: - _dict['agentInterfaces'] = self.agent_interfaces.to_dict() # override the default output from pydantic by calling `to_dict()` of custom_headers if self.custom_headers: _dict['customHeaders'] = self.custom_headers.to_dict() @@ -230,7 +225,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "tags": [TestTag.from_dict(_item) for _item in obj["tags"]] if obj.get("tags") is not None else None, "sharedWithAccounts": [SharedWithAccount.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None, "authType": obj.get("authType"), - "agentInterfaces": AgentInterfaces.from_dict(obj["agentInterfaces"]) if obj.get("agentInterfaces") is not None else None, "bandwidthMeasurements": obj.get("bandwidthMeasurements"), "clientCertificate": obj.get("clientCertificate"), "contentRegex": obj.get("contentRegex"), diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/http_server_properties.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/http_server_properties.py index 9a845e392..805f95364 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/http_server_properties.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/http_server_properties.py @@ -19,7 +19,6 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from thousandeyes_sdk.tests.models.agent_interfaces import AgentInterfaces from thousandeyes_sdk.tests.models.o_auth import OAuth from thousandeyes_sdk.tests.models.request_method import RequestMethod from thousandeyes_sdk.tests.models.test_auth_type import TestAuthType @@ -38,7 +37,6 @@ class HttpServerProperties(BaseModel): HttpServerProperties """ # noqa: E501 auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") - agent_interfaces: Optional[AgentInterfaces] = Field(default=None, alias="agentInterfaces") bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") content_regex: Optional[StrictStr] = Field(default=None, description="Content regex, this field does not require escaping.", alias="contentRegex") @@ -79,7 +77,7 @@ class HttpServerProperties(BaseModel): post_body: Optional[StrictStr] = Field(default=None, description="Enter the body for the HTTP POST request in this field. No special escaping is required. If content is provided and `requestMethod` is not specified, `requestMethod` is automatically set to `post`.", alias="postBody") ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") type: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["authType", "agentInterfaces", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "headers", "randomizedStartTime", "requestMethod", "postBody", "ipv6Policy", "type"] + __properties: ClassVar[List[str]] = ["authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "headers", "randomizedStartTime", "requestMethod", "postBody", "ipv6Policy", "type"] model_config = ConfigDict( populate_by_name=True, @@ -125,9 +123,6 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of agent_interfaces - if self.agent_interfaces: - _dict['agentInterfaces'] = self.agent_interfaces.to_dict() # override the default output from pydantic by calling `to_dict()` of custom_headers if self.custom_headers: _dict['customHeaders'] = self.custom_headers.to_dict() @@ -154,7 +149,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "authType": obj.get("authType"), - "agentInterfaces": AgentInterfaces.from_dict(obj["agentInterfaces"]) if obj.get("agentInterfaces") is not None else None, "bandwidthMeasurements": obj.get("bandwidthMeasurements"), "clientCertificate": obj.get("clientCertificate"), "contentRegex": obj.get("contentRegex"), diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/http_server_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/http_server_test.py index 56bfb704d..59092782f 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/http_server_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/http_server_test.py @@ -20,7 +20,6 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from thousandeyes_sdk.tests.models.agent_interfaces import AgentInterfaces from thousandeyes_sdk.tests.models.alert_rule import AlertRule from thousandeyes_sdk.tests.models.monitor import Monitor from thousandeyes_sdk.tests.models.o_auth import OAuth @@ -64,7 +63,6 @@ class HttpServerTest(BaseModel): tags: Optional[List[TestTag]] = Field(default=None, description="Tags assigned to the test. Returned only when `expand=tag` is specified. This field is not returned for Instant Tests. For more information, see `/tags`.") shared_with_accounts: Optional[List[SharedWithAccount]] = Field(default=None, alias="sharedWithAccounts") auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") - agent_interfaces: Optional[AgentInterfaces] = Field(default=None, alias="agentInterfaces") bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") content_regex: Optional[StrictStr] = Field(default=None, description="Content regex, this field does not require escaping.", alias="contentRegex") @@ -107,7 +105,7 @@ class HttpServerTest(BaseModel): bgp_measurements: Optional[StrictBool] = Field(default=True, description="Set to `true` to enable bgp measurements.", alias="bgpMeasurements") use_public_bgp: Optional[StrictBool] = Field(default=True, description="Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value.", alias="usePublicBgp") monitors: Optional[List[Monitor]] = Field(default=None, description="Contains list of enabled BGP monitors.") - __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "tags", "sharedWithAccounts", "authType", "agentInterfaces", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "headers", "randomizedStartTime", "requestMethod", "postBody", "ipv6Policy", "bgpMeasurements", "usePublicBgp", "monitors"] + __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "tags", "sharedWithAccounts", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "headers", "randomizedStartTime", "requestMethod", "postBody", "ipv6Policy", "bgpMeasurements", "usePublicBgp", "monitors"] model_config = ConfigDict( populate_by_name=True, @@ -206,9 +204,6 @@ def to_dict(self) -> Dict[str, Any]: if _item: _items.append(_item.to_dict()) _dict['sharedWithAccounts'] = _items - # override the default output from pydantic by calling `to_dict()` of agent_interfaces - if self.agent_interfaces: - _dict['agentInterfaces'] = self.agent_interfaces.to_dict() # override the default output from pydantic by calling `to_dict()` of custom_headers if self.custom_headers: _dict['customHeaders'] = self.custom_headers.to_dict() @@ -260,7 +255,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "tags": [TestTag.from_dict(_item) for _item in obj["tags"]] if obj.get("tags") is not None else None, "sharedWithAccounts": [SharedWithAccount.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None, "authType": obj.get("authType"), - "agentInterfaces": AgentInterfaces.from_dict(obj["agentInterfaces"]) if obj.get("agentInterfaces") is not None else None, "bandwidthMeasurements": obj.get("bandwidthMeasurements"), "clientCertificate": obj.get("clientCertificate"), "contentRegex": obj.get("contentRegex"), diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/http_server_test_request.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/http_server_test_request.py index 64591715b..52e95229b 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/http_server_test_request.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/http_server_test_request.py @@ -20,10 +20,9 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from thousandeyes_sdk.tests.models.agent_interfaces import AgentInterfaces from thousandeyes_sdk.tests.models.o_auth import OAuth from thousandeyes_sdk.tests.models.request_method import RequestMethod -from thousandeyes_sdk.tests.models.test_agent_request import TestAgentRequest +from thousandeyes_sdk.tests.models.test_agent_with_source_ip_request import TestAgentWithSourceIpRequest from thousandeyes_sdk.tests.models.test_auth_type import TestAuthType from thousandeyes_sdk.tests.models.test_custom_headers import TestCustomHeaders from thousandeyes_sdk.tests.models.test_interval import TestInterval @@ -56,7 +55,6 @@ class HttpServerTestRequest(BaseModel): type: Optional[StrictStr] = None links: Optional[TestLinks] = Field(default=None, alias="_links") auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") - agent_interfaces: Optional[AgentInterfaces] = Field(default=None, alias="agentInterfaces") bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") content_regex: Optional[StrictStr] = Field(default=None, description="Content regex, this field does not require escaping.", alias="contentRegex") @@ -102,9 +100,9 @@ class HttpServerTestRequest(BaseModel): tags: Optional[List[StrictStr]] = Field(default=None, description="Contains list of test tag IDs (get `id` from `/tags` endpoint).") shared_with_accounts: Optional[List[StrictStr]] = Field(default=None, description="Contains list of account group IDs. Test is shared with the listed account groups (get `aid` from `/account-groups` endpoint)", alias="sharedWithAccounts") alert_rules: Optional[List[StrictStr]] = Field(default=None, description="List of alert rules IDs to apply to the test (get `ruleId` from `/alerts/rules` endpoint. If `alertsEnabled` is set to `true` and `alertRules` is not included on test creation or update, applicable user default alert rules will be used)", alias="alertRules") - agents: List[TestAgentRequest] = Field(description="Contains list of Agent IDs (get `agentId` from `/agents` endpoint).") + agents: List[TestAgentWithSourceIpRequest] = Field(description="Agents assigned to the test. To select a source interface, set `sourceIpAddress` on the same object as its `agentId`.") monitors: Optional[List[StrictStr]] = Field(default=None, description="Contains list of BGP monitor IDs (get `monitorId` from `/monitors` endpoint)") - __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "authType", "agentInterfaces", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "headers", "randomizedStartTime", "requestMethod", "postBody", "ipv6Policy", "bgpMeasurements", "usePublicBgp", "labels", "tags", "sharedWithAccounts", "alertRules", "agents", "monitors"] + __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "headers", "randomizedStartTime", "requestMethod", "postBody", "ipv6Policy", "bgpMeasurements", "usePublicBgp", "labels", "tags", "sharedWithAccounts", "alertRules", "agents", "monitors"] model_config = ConfigDict( populate_by_name=True, @@ -167,9 +165,6 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of links if self.links: _dict['_links'] = self.links.to_dict() - # override the default output from pydantic by calling `to_dict()` of agent_interfaces - if self.agent_interfaces: - _dict['agentInterfaces'] = self.agent_interfaces.to_dict() # override the default output from pydantic by calling `to_dict()` of custom_headers if self.custom_headers: _dict['customHeaders'] = self.custom_headers.to_dict() @@ -217,7 +212,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "type": obj.get("type"), "_links": TestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, "authType": obj.get("authType"), - "agentInterfaces": AgentInterfaces.from_dict(obj["agentInterfaces"]) if obj.get("agentInterfaces") is not None else None, "bandwidthMeasurements": obj.get("bandwidthMeasurements"), "clientCertificate": obj.get("clientCertificate"), "contentRegex": obj.get("contentRegex"), @@ -263,7 +257,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "tags": obj.get("tags"), "sharedWithAccounts": obj.get("sharedWithAccounts"), "alertRules": obj.get("alertRules"), - "agents": [TestAgentRequest.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None, + "agents": [TestAgentWithSourceIpRequest.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None, "monitors": obj.get("monitors") }) return _obj diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/http_server_test_response.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/http_server_test_response.py index 2967d9393..aa212d025 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/http_server_test_response.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/http_server_test_response.py @@ -20,7 +20,6 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from thousandeyes_sdk.tests.models.agent_interfaces import AgentInterfaces from thousandeyes_sdk.tests.models.alert_rule import AlertRule from thousandeyes_sdk.tests.models.monitor import Monitor from thousandeyes_sdk.tests.models.o_auth import OAuth @@ -65,7 +64,6 @@ class HttpServerTestResponse(BaseModel): tags: Optional[List[TestTag]] = Field(default=None, description="Tags assigned to the test. Returned only when `expand=tag` is specified. This field is not returned for Instant Tests. For more information, see `/tags`.") shared_with_accounts: Optional[List[SharedWithAccount]] = Field(default=None, alias="sharedWithAccounts") auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") - agent_interfaces: Optional[AgentInterfaces] = Field(default=None, alias="agentInterfaces") bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") content_regex: Optional[StrictStr] = Field(default=None, description="Content regex, this field does not require escaping.", alias="contentRegex") @@ -109,7 +107,7 @@ class HttpServerTestResponse(BaseModel): use_public_bgp: Optional[StrictBool] = Field(default=True, description="Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value.", alias="usePublicBgp") monitors: Optional[List[Monitor]] = Field(default=None, description="Contains list of enabled BGP monitors.") agents: Optional[List[TestAgentResponse]] = Field(default=None, description="Contains list of agents.") - __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "tags", "sharedWithAccounts", "authType", "agentInterfaces", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "headers", "randomizedStartTime", "requestMethod", "postBody", "ipv6Policy", "bgpMeasurements", "usePublicBgp", "monitors", "agents"] + __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "tags", "sharedWithAccounts", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "headers", "randomizedStartTime", "requestMethod", "postBody", "ipv6Policy", "bgpMeasurements", "usePublicBgp", "monitors", "agents"] model_config = ConfigDict( populate_by_name=True, @@ -208,9 +206,6 @@ def to_dict(self) -> Dict[str, Any]: if _item: _items.append(_item.to_dict()) _dict['sharedWithAccounts'] = _items - # override the default output from pydantic by calling `to_dict()` of agent_interfaces - if self.agent_interfaces: - _dict['agentInterfaces'] = self.agent_interfaces.to_dict() # override the default output from pydantic by calling `to_dict()` of custom_headers if self.custom_headers: _dict['customHeaders'] = self.custom_headers.to_dict() @@ -269,7 +264,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "tags": [TestTag.from_dict(_item) for _item in obj["tags"]] if obj.get("tags") is not None else None, "sharedWithAccounts": [SharedWithAccount.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None, "authType": obj.get("authType"), - "agentInterfaces": AgentInterfaces.from_dict(obj["agentInterfaces"]) if obj.get("agentInterfaces") is not None else None, "bandwidthMeasurements": obj.get("bandwidthMeasurements"), "clientCertificate": obj.get("clientCertificate"), "contentRegex": obj.get("contentRegex"), diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/page_load_instant_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/page_load_instant_test.py index 9d6e5fbf2..4728360de 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/page_load_instant_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/page_load_instant_test.py @@ -20,7 +20,6 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from thousandeyes_sdk.tests.models.agent_interfaces import AgentInterfaces from thousandeyes_sdk.tests.models.o_auth import OAuth from thousandeyes_sdk.tests.models.shared_with_account import SharedWithAccount from thousandeyes_sdk.tests.models.test_auth_type import TestAuthType @@ -57,7 +56,6 @@ class PageLoadInstantTest(BaseModel): tags: Optional[List[TestTag]] = Field(default=None, description="Tags assigned to the test. Returned only when `expand=tag` is specified. This field is not returned for Instant Tests. For more information, see `/tags`.") shared_with_accounts: Optional[List[SharedWithAccount]] = Field(default=None, alias="sharedWithAccounts") auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") - agent_interfaces: Optional[AgentInterfaces] = Field(default=None, alias="agentInterfaces") bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") content_regex: Optional[StrictStr] = Field(default=None, description="Content regex, this field does not require escaping.", alias="contentRegex") @@ -106,7 +104,7 @@ class PageLoadInstantTest(BaseModel): page_loading_strategy: Optional[TestPageLoadingStrategy] = Field(default=None, alias="pageLoadingStrategy") randomized_start_time: Optional[StrictBool] = Field(default=False, description="Indicates whether agents should randomize the start time in each test round.", alias="randomizedStartTime") identify_agent_traffic_with_user_agent: Optional[StrictBool] = Field(default=False, description="Determines how agent traffic is identified: * `false`: Adds the `x-thousandeyes-agent: yes` header. * `true`: Appends `(ThousandEyes Agent)` to the `user-agent` header. For more information, see [Notes on Agent ID Strategy](https://docs.thousandeyes.com/product-documentation/browser-synthetics/test-settings-page-load-transaction#notes-on-agent-id-strategy). ", alias="identifyAgentTrafficWithUserAgent") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "tags", "sharedWithAccounts", "authType", "agentInterfaces", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "emulatedDeviceId", "pageLoadTargetTime", "pageLoadTimeLimit", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "chromeOptions", "chromePolicies", "chromiumTrack", "pageLoadingStrategy", "randomizedStartTime", "identifyAgentTrafficWithUserAgent"] + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "tags", "sharedWithAccounts", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "emulatedDeviceId", "pageLoadTargetTime", "pageLoadTimeLimit", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "chromeOptions", "chromePolicies", "chromiumTrack", "pageLoadingStrategy", "randomizedStartTime", "identifyAgentTrafficWithUserAgent"] model_config = ConfigDict( populate_by_name=True, @@ -196,9 +194,6 @@ def to_dict(self) -> Dict[str, Any]: if _item: _items.append(_item.to_dict()) _dict['sharedWithAccounts'] = _items - # override the default output from pydantic by calling `to_dict()` of agent_interfaces - if self.agent_interfaces: - _dict['agentInterfaces'] = self.agent_interfaces.to_dict() # override the default output from pydantic by calling `to_dict()` of custom_headers if self.custom_headers: _dict['customHeaders'] = self.custom_headers.to_dict() @@ -239,7 +234,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "tags": [TestTag.from_dict(_item) for _item in obj["tags"]] if obj.get("tags") is not None else None, "sharedWithAccounts": [SharedWithAccount.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None, "authType": obj.get("authType"), - "agentInterfaces": AgentInterfaces.from_dict(obj["agentInterfaces"]) if obj.get("agentInterfaces") is not None else None, "bandwidthMeasurements": obj.get("bandwidthMeasurements"), "clientCertificate": obj.get("clientCertificate"), "contentRegex": obj.get("contentRegex"), diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/page_load_properties.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/page_load_properties.py index a8456426b..f8c3bb3e8 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/page_load_properties.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/page_load_properties.py @@ -19,7 +19,6 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from thousandeyes_sdk.tests.models.agent_interfaces import AgentInterfaces from thousandeyes_sdk.tests.models.o_auth import OAuth from thousandeyes_sdk.tests.models.test_auth_type import TestAuthType from thousandeyes_sdk.tests.models.test_chromium_track import TestChromiumTrack @@ -38,7 +37,6 @@ class PageLoadProperties(BaseModel): PageLoadProperties """ # noqa: E501 auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") - agent_interfaces: Optional[AgentInterfaces] = Field(default=None, alias="agentInterfaces") bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") content_regex: Optional[StrictStr] = Field(default=None, description="Content regex, this field does not require escaping.", alias="contentRegex") @@ -88,7 +86,7 @@ class PageLoadProperties(BaseModel): randomized_start_time: Optional[StrictBool] = Field(default=False, description="Indicates whether agents should randomize the start time in each test round.", alias="randomizedStartTime") type: Optional[StrictStr] = None identify_agent_traffic_with_user_agent: Optional[StrictBool] = Field(default=False, description="Determines how agent traffic is identified: * `false`: Adds the `x-thousandeyes-agent: yes` header. * `true`: Appends `(ThousandEyes Agent)` to the `user-agent` header. For more information, see [Notes on Agent ID Strategy](https://docs.thousandeyes.com/product-documentation/browser-synthetics/test-settings-page-load-transaction#notes-on-agent-id-strategy). ", alias="identifyAgentTrafficWithUserAgent") - __properties: ClassVar[List[str]] = ["authType", "agentInterfaces", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "emulatedDeviceId", "pageLoadTargetTime", "pageLoadTimeLimit", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "chromeOptions", "chromePolicies", "chromiumTrack", "pageLoadingStrategy", "randomizedStartTime", "type", "identifyAgentTrafficWithUserAgent"] + __properties: ClassVar[List[str]] = ["authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "emulatedDeviceId", "pageLoadTargetTime", "pageLoadTimeLimit", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "chromeOptions", "chromePolicies", "chromiumTrack", "pageLoadingStrategy", "randomizedStartTime", "type", "identifyAgentTrafficWithUserAgent"] model_config = ConfigDict( populate_by_name=True, @@ -134,9 +132,6 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of agent_interfaces - if self.agent_interfaces: - _dict['agentInterfaces'] = self.agent_interfaces.to_dict() # override the default output from pydantic by calling `to_dict()` of custom_headers if self.custom_headers: _dict['customHeaders'] = self.custom_headers.to_dict() @@ -163,7 +158,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "authType": obj.get("authType"), - "agentInterfaces": AgentInterfaces.from_dict(obj["agentInterfaces"]) if obj.get("agentInterfaces") is not None else None, "bandwidthMeasurements": obj.get("bandwidthMeasurements"), "clientCertificate": obj.get("clientCertificate"), "contentRegex": obj.get("contentRegex"), diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/page_load_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/page_load_test.py index 2ce31fcf2..fe05cac3e 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/page_load_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/page_load_test.py @@ -20,7 +20,6 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from thousandeyes_sdk.tests.models.agent_interfaces import AgentInterfaces from thousandeyes_sdk.tests.models.alert_rule import AlertRule from thousandeyes_sdk.tests.models.monitor import Monitor from thousandeyes_sdk.tests.models.o_auth import OAuth @@ -66,7 +65,6 @@ class PageLoadTest(BaseModel): tags: Optional[List[TestTag]] = Field(default=None, description="Tags assigned to the test. Returned only when `expand=tag` is specified. This field is not returned for Instant Tests. For more information, see `/tags`.") shared_with_accounts: Optional[List[SharedWithAccount]] = Field(default=None, alias="sharedWithAccounts") auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") - agent_interfaces: Optional[AgentInterfaces] = Field(default=None, alias="agentInterfaces") bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") content_regex: Optional[StrictStr] = Field(default=None, description="Content regex, this field does not require escaping.", alias="contentRegex") @@ -120,7 +118,7 @@ class PageLoadTest(BaseModel): monitors: Optional[List[Monitor]] = Field(default=None, description="Contains list of enabled BGP monitors.") http_interval: Optional[TestHttpInterval] = Field(default=None, alias="httpInterval") subinterval: Optional[TestSubInterval] = None - __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "tags", "sharedWithAccounts", "authType", "agentInterfaces", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "emulatedDeviceId", "pageLoadTargetTime", "pageLoadTimeLimit", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "chromeOptions", "chromePolicies", "chromiumTrack", "pageLoadingStrategy", "randomizedStartTime", "identifyAgentTrafficWithUserAgent", "bgpMeasurements", "usePublicBgp", "monitors", "httpInterval", "subinterval"] + __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "tags", "sharedWithAccounts", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "emulatedDeviceId", "pageLoadTargetTime", "pageLoadTimeLimit", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "chromeOptions", "chromePolicies", "chromiumTrack", "pageLoadingStrategy", "randomizedStartTime", "identifyAgentTrafficWithUserAgent", "bgpMeasurements", "usePublicBgp", "monitors", "httpInterval", "subinterval"] model_config = ConfigDict( populate_by_name=True, @@ -219,9 +217,6 @@ def to_dict(self) -> Dict[str, Any]: if _item: _items.append(_item.to_dict()) _dict['sharedWithAccounts'] = _items - # override the default output from pydantic by calling `to_dict()` of agent_interfaces - if self.agent_interfaces: - _dict['agentInterfaces'] = self.agent_interfaces.to_dict() # override the default output from pydantic by calling `to_dict()` of custom_headers if self.custom_headers: _dict['customHeaders'] = self.custom_headers.to_dict() @@ -273,7 +268,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "tags": [TestTag.from_dict(_item) for _item in obj["tags"]] if obj.get("tags") is not None else None, "sharedWithAccounts": [SharedWithAccount.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None, "authType": obj.get("authType"), - "agentInterfaces": AgentInterfaces.from_dict(obj["agentInterfaces"]) if obj.get("agentInterfaces") is not None else None, "bandwidthMeasurements": obj.get("bandwidthMeasurements"), "clientCertificate": obj.get("clientCertificate"), "contentRegex": obj.get("contentRegex"), diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/page_load_test_request.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/page_load_test_request.py index 5aaf2b54a..fc0ab8fb6 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/page_load_test_request.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/page_load_test_request.py @@ -20,7 +20,6 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from thousandeyes_sdk.tests.models.agent_interfaces import AgentInterfaces from thousandeyes_sdk.tests.models.o_auth import OAuth from thousandeyes_sdk.tests.models.test_agent_request import TestAgentRequest from thousandeyes_sdk.tests.models.test_auth_type import TestAuthType @@ -58,7 +57,6 @@ class PageLoadTestRequest(BaseModel): type: Optional[StrictStr] = None links: Optional[TestLinks] = Field(default=None, alias="_links") auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") - agent_interfaces: Optional[AgentInterfaces] = Field(default=None, alias="agentInterfaces") bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") content_regex: Optional[StrictStr] = Field(default=None, description="Content regex, this field does not require escaping.", alias="contentRegex") @@ -115,9 +113,9 @@ class PageLoadTestRequest(BaseModel): tags: Optional[List[StrictStr]] = Field(default=None, description="Contains list of test tag IDs (get `id` from `/tags` endpoint).") shared_with_accounts: Optional[List[StrictStr]] = Field(default=None, description="Contains list of account group IDs. Test is shared with the listed account groups (get `aid` from `/account-groups` endpoint)", alias="sharedWithAccounts") alert_rules: Optional[List[StrictStr]] = Field(default=None, description="List of alert rules IDs to apply to the test (get `ruleId` from `/alerts/rules` endpoint. If `alertsEnabled` is set to `true` and `alertRules` is not included on test creation or update, applicable user default alert rules will be used)", alias="alertRules") - agents: List[TestAgentRequest] = Field(description="Contains list of Agent IDs (get `agentId` from `/agents` endpoint).") + agents: List[TestAgentRequest] = Field(description="Agents assigned to the test.") monitors: Optional[List[StrictStr]] = Field(default=None, description="Contains list of BGP monitor IDs (get `monitorId` from `/monitors` endpoint)") - __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "authType", "agentInterfaces", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "emulatedDeviceId", "pageLoadTargetTime", "pageLoadTimeLimit", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "chromeOptions", "chromePolicies", "chromiumTrack", "pageLoadingStrategy", "randomizedStartTime", "identifyAgentTrafficWithUserAgent", "httpInterval", "subinterval", "bgpMeasurements", "usePublicBgp", "labels", "tags", "sharedWithAccounts", "alertRules", "agents", "monitors"] + __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "emulatedDeviceId", "pageLoadTargetTime", "pageLoadTimeLimit", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "chromeOptions", "chromePolicies", "chromiumTrack", "pageLoadingStrategy", "randomizedStartTime", "identifyAgentTrafficWithUserAgent", "httpInterval", "subinterval", "bgpMeasurements", "usePublicBgp", "labels", "tags", "sharedWithAccounts", "alertRules", "agents", "monitors"] model_config = ConfigDict( populate_by_name=True, @@ -180,9 +178,6 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of links if self.links: _dict['_links'] = self.links.to_dict() - # override the default output from pydantic by calling `to_dict()` of agent_interfaces - if self.agent_interfaces: - _dict['agentInterfaces'] = self.agent_interfaces.to_dict() # override the default output from pydantic by calling `to_dict()` of custom_headers if self.custom_headers: _dict['customHeaders'] = self.custom_headers.to_dict() @@ -230,7 +225,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "type": obj.get("type"), "_links": TestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, "authType": obj.get("authType"), - "agentInterfaces": AgentInterfaces.from_dict(obj["agentInterfaces"]) if obj.get("agentInterfaces") is not None else None, "bandwidthMeasurements": obj.get("bandwidthMeasurements"), "clientCertificate": obj.get("clientCertificate"), "contentRegex": obj.get("contentRegex"), diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/page_load_test_response.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/page_load_test_response.py index 78dd5ddc7..f794b08a2 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/page_load_test_response.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/page_load_test_response.py @@ -20,7 +20,6 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from thousandeyes_sdk.tests.models.agent_interfaces import AgentInterfaces from thousandeyes_sdk.tests.models.alert_rule import AlertRule from thousandeyes_sdk.tests.models.monitor import Monitor from thousandeyes_sdk.tests.models.o_auth import OAuth @@ -67,7 +66,6 @@ class PageLoadTestResponse(BaseModel): tags: Optional[List[TestTag]] = Field(default=None, description="Tags assigned to the test. Returned only when `expand=tag` is specified. This field is not returned for Instant Tests. For more information, see `/tags`.") shared_with_accounts: Optional[List[SharedWithAccount]] = Field(default=None, alias="sharedWithAccounts") auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") - agent_interfaces: Optional[AgentInterfaces] = Field(default=None, alias="agentInterfaces") bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") content_regex: Optional[StrictStr] = Field(default=None, description="Content regex, this field does not require escaping.", alias="contentRegex") @@ -122,7 +120,7 @@ class PageLoadTestResponse(BaseModel): http_interval: Optional[TestHttpInterval] = Field(default=None, alias="httpInterval") subinterval: Optional[TestSubInterval] = None agents: Optional[List[TestAgentResponse]] = Field(default=None, description="Contains list of agents.") - __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "tags", "sharedWithAccounts", "authType", "agentInterfaces", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "emulatedDeviceId", "pageLoadTargetTime", "pageLoadTimeLimit", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "chromeOptions", "chromePolicies", "chromiumTrack", "pageLoadingStrategy", "randomizedStartTime", "identifyAgentTrafficWithUserAgent", "bgpMeasurements", "usePublicBgp", "monitors", "httpInterval", "subinterval", "agents"] + __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "tags", "sharedWithAccounts", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "emulatedDeviceId", "pageLoadTargetTime", "pageLoadTimeLimit", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "chromeOptions", "chromePolicies", "chromiumTrack", "pageLoadingStrategy", "randomizedStartTime", "identifyAgentTrafficWithUserAgent", "bgpMeasurements", "usePublicBgp", "monitors", "httpInterval", "subinterval", "agents"] model_config = ConfigDict( populate_by_name=True, @@ -221,9 +219,6 @@ def to_dict(self) -> Dict[str, Any]: if _item: _items.append(_item.to_dict()) _dict['sharedWithAccounts'] = _items - # override the default output from pydantic by calling `to_dict()` of agent_interfaces - if self.agent_interfaces: - _dict['agentInterfaces'] = self.agent_interfaces.to_dict() # override the default output from pydantic by calling `to_dict()` of custom_headers if self.custom_headers: _dict['customHeaders'] = self.custom_headers.to_dict() @@ -282,7 +277,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "tags": [TestTag.from_dict(_item) for _item in obj["tags"]] if obj.get("tags") is not None else None, "sharedWithAccounts": [SharedWithAccount.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None, "authType": obj.get("authType"), - "agentInterfaces": AgentInterfaces.from_dict(obj["agentInterfaces"]) if obj.get("agentInterfaces") is not None else None, "bandwidthMeasurements": obj.get("bandwidthMeasurements"), "clientCertificate": obj.get("clientCertificate"), "contentRegex": obj.get("contentRegex"), diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/sip_server_test_request.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/sip_server_test_request.py index 7e6f4602b..bedef9191 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/sip_server_test_request.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/sip_server_test_request.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from thousandeyes_sdk.tests.models.test_agent_request import TestAgentRequest +from thousandeyes_sdk.tests.models.test_agent_with_source_ip_request import TestAgentWithSourceIpRequest from thousandeyes_sdk.tests.models.test_interval import TestInterval from thousandeyes_sdk.tests.models.test_ipv6_policy import TestIpv6Policy from thousandeyes_sdk.tests.models.test_links import TestLinks @@ -64,7 +64,7 @@ class SipServerTestRequest(BaseModel): tags: Optional[List[StrictStr]] = Field(default=None, description="Contains list of test tag IDs (get `id` from `/tags` endpoint).") shared_with_accounts: Optional[List[StrictStr]] = Field(default=None, description="Contains list of account group IDs. Test is shared with the listed account groups (get `aid` from `/account-groups` endpoint)", alias="sharedWithAccounts") alert_rules: Optional[List[StrictStr]] = Field(default=None, description="List of alert rules IDs to apply to the test (get `ruleId` from `/alerts/rules` endpoint. If `alertsEnabled` is set to `true` and `alertRules` is not included on test creation or update, applicable user default alert rules will be used)", alias="alertRules") - agents: List[TestAgentRequest] = Field(description="Contains list of Agent IDs (get `agentId` from `/agents` endpoint).") + agents: List[TestAgentWithSourceIpRequest] = Field(description="Agents assigned to the test. To select a source interface, set `sourceIpAddress` on the same object as its `agentId`.") monitors: Optional[List[StrictStr]] = Field(default=None, description="Contains list of BGP monitor IDs (get `monitorId` from `/monitors` endpoint)") target_sip_credentials: TestSipCredentials = Field(alias="targetSipCredentials") bgp_measurements: Optional[StrictBool] = Field(default=True, description="Set to `true` to enable bgp measurements.", alias="bgpMeasurements") @@ -182,7 +182,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "tags": obj.get("tags"), "sharedWithAccounts": obj.get("sharedWithAccounts"), "alertRules": obj.get("alertRules"), - "agents": [TestAgentRequest.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None, + "agents": [TestAgentWithSourceIpRequest.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None, "monitors": obj.get("monitors"), "targetSipCredentials": TestSipCredentials.from_dict(obj["targetSipCredentials"]) if obj.get("targetSipCredentials") is not None else None, "bgpMeasurements": obj.get("bgpMeasurements") if obj.get("bgpMeasurements") is not None else True, diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/source_interface_test_request.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/source_interface_test_request.py new file mode 100644 index 000000000..f5d25d6ea --- /dev/null +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/source_interface_test_request.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Tests API + + **Note:** The Page Load Tests, API Tests, and Web Transaction Tests APIs are not available for ThousandEyes for Government instance. This API allows you to list, create, edit, and delete Network and Application Synthetics tests. + + 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.tests.models.test_agent_with_source_ip_request import TestAgentWithSourceIpRequest +from typing import Optional, Set +from typing_extensions import Self + +class SourceInterfaceTestRequest(BaseModel): + """ + SourceInterfaceTestRequest + """ # noqa: E501 + labels: Optional[List[StrictStr]] = Field(default=None, description="Contains list of test label IDs (get `labelId` from `/labels` endpoint)") + tags: Optional[List[StrictStr]] = Field(default=None, description="Contains list of test tag IDs (get `id` from `/tags` endpoint).") + shared_with_accounts: Optional[List[StrictStr]] = Field(default=None, description="Contains list of account group IDs. Test is shared with the listed account groups (get `aid` from `/account-groups` endpoint)", alias="sharedWithAccounts") + alert_rules: Optional[List[StrictStr]] = Field(default=None, description="List of alert rules IDs to apply to the test (get `ruleId` from `/alerts/rules` endpoint. If `alertsEnabled` is set to `true` and `alertRules` is not included on test creation or update, applicable user default alert rules will be used)", alias="alertRules") + agents: List[TestAgentWithSourceIpRequest] = Field(description="Agents assigned to the test. To select a source interface, set `sourceIpAddress` on the same object as its `agentId`.") + __properties: ClassVar[List[str]] = ["labels", "tags", "sharedWithAccounts", "alertRules", "agents"] + + 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 SourceInterfaceTestRequest 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 agents (list) + _items = [] + if self.agents: + for _item in self.agents: + if _item: + _items.append(_item.to_dict()) + _dict['agents'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SourceInterfaceTestRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "labels": obj.get("labels"), + "tags": obj.get("tags"), + "sharedWithAccounts": obj.get("sharedWithAccounts"), + "alertRules": obj.get("alertRules"), + "agents": [TestAgentWithSourceIpRequest.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + }) + return _obj + + diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_agent_request.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_agent_request.py index a7ba7eb26..c5eee5d2e 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_agent_request.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_agent_request.py @@ -17,7 +17,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List from typing import Optional, Set from typing_extensions import Self @@ -26,8 +26,7 @@ class TestAgentRequest(BaseModel): TestAgentRequest """ # noqa: E501 agent_id: StrictStr = Field(description="The agent ID. Get `agentId` from `/agents` endpoint.", alias="agentId") - source_ip_address: Optional[StrictStr] = Field(default=None, description="The IP address from the `ipAddresses` field in agent details, used for interface selection. Get `ipAddresses` from the `/agents` endpoint.", alias="sourceIpAddress") - __properties: ClassVar[List[str]] = ["agentId", "sourceIpAddress"] + __properties: ClassVar[List[str]] = ["agentId"] model_config = ConfigDict( populate_by_name=True, @@ -81,8 +80,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "agentId": obj.get("agentId"), - "sourceIpAddress": obj.get("sourceIpAddress") + "agentId": obj.get("agentId") }) return _obj diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_interfaces.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_agent_with_source_ip_request.py similarity index 72% rename from thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_interfaces.py rename to thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_agent_with_source_ip_request.py index 0271e0a98..bfd80f4cd 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_interfaces.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_agent_with_source_ip_request.py @@ -21,13 +21,13 @@ from typing import Optional, Set from typing_extensions import Self -class AgentInterfaces(BaseModel): +class TestAgentWithSourceIpRequest(BaseModel): """ - AgentInterfaces + TestAgentWithSourceIpRequest """ # noqa: E501 - ip_address: Optional[StrictStr] = Field(default=None, description="IP address of the agent interface.", alias="ipAddress") - agent_id: Optional[StrictStr] = Field(default=None, description="The agent ID of the enterprise agent for the test.", alias="agentId") - __properties: ClassVar[List[str]] = ["ipAddress", "agentId"] + agent_id: StrictStr = Field(description="The agent ID. Get `agentId` from `/agents` endpoint.", alias="agentId") + source_ip_address: Optional[StrictStr] = Field(default=None, description="The Enterprise Agent interface IP address to use as the source for the test. The address must be listed in the agent's `ipAddresses` field, available from the `/agents` endpoint. It is not supported for Cloud Agents or Enterprise Agent clusters.", alias="sourceIpAddress") + __properties: ClassVar[List[str]] = ["agentId", "sourceIpAddress"] model_config = ConfigDict( populate_by_name=True, @@ -48,7 +48,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of AgentInterfaces from a JSON string""" + """Create an instance of TestAgentWithSourceIpRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -73,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of AgentInterfaces from a dict""" + """Create an instance of TestAgentWithSourceIpRequest from a dict""" if obj is None: return None @@ -81,8 +81,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "ipAddress": obj.get("ipAddress"), - "agentId": obj.get("agentId") + "agentId": obj.get("agentId"), + "sourceIpAddress": obj.get("sourceIpAddress") }) return _obj diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_request.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_request.py index 30be87607..01f4b0858 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_request.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_request.py @@ -30,7 +30,7 @@ class TestRequest(BaseModel): tags: Optional[List[StrictStr]] = Field(default=None, description="Contains list of test tag IDs (get `id` from `/tags` endpoint).") shared_with_accounts: Optional[List[StrictStr]] = Field(default=None, description="Contains list of account group IDs. Test is shared with the listed account groups (get `aid` from `/account-groups` endpoint)", alias="sharedWithAccounts") alert_rules: Optional[List[StrictStr]] = Field(default=None, description="List of alert rules IDs to apply to the test (get `ruleId` from `/alerts/rules` endpoint. If `alertsEnabled` is set to `true` and `alertRules` is not included on test creation or update, applicable user default alert rules will be used)", alias="alertRules") - agents: List[TestAgentRequest] = Field(description="Contains list of Agent IDs (get `agentId` from `/agents` endpoint).") + agents: List[TestAgentRequest] = Field(description="Agents assigned to the test.") __properties: ClassVar[List[str]] = ["labels", "tags", "sharedWithAccounts", "alertRules", "agents"] model_config = ConfigDict( diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_http_server_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_http_server_test.py index a106204b9..f12cb6e75 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_http_server_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_http_server_test.py @@ -20,7 +20,6 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from thousandeyes_sdk.tests.models.agent_interfaces import AgentInterfaces from thousandeyes_sdk.tests.models.o_auth import OAuth from thousandeyes_sdk.tests.models.request_method import RequestMethod from thousandeyes_sdk.tests.models.test_auth_type import TestAuthType @@ -55,7 +54,6 @@ class UnexpandedHttpServerTest(BaseModel): type: Optional[StrictStr] = None links: Optional[TestLinks] = Field(default=None, alias="_links") auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") - agent_interfaces: Optional[AgentInterfaces] = Field(default=None, alias="agentInterfaces") bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") content_regex: Optional[StrictStr] = Field(default=None, description="Content regex, this field does not require escaping.", alias="contentRegex") @@ -97,7 +95,7 @@ class UnexpandedHttpServerTest(BaseModel): ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") bgp_measurements: Optional[StrictBool] = Field(default=True, description="Set to `true` to enable bgp measurements.", alias="bgpMeasurements") use_public_bgp: Optional[StrictBool] = Field(default=True, description="Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value.", alias="usePublicBgp") - __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "authType", "agentInterfaces", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "headers", "randomizedStartTime", "requestMethod", "postBody", "ipv6Policy", "bgpMeasurements", "usePublicBgp"] + __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "headers", "randomizedStartTime", "requestMethod", "postBody", "ipv6Policy", "bgpMeasurements", "usePublicBgp"] model_config = ConfigDict( populate_by_name=True, @@ -160,9 +158,6 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of links if self.links: _dict['_links'] = self.links.to_dict() - # override the default output from pydantic by calling `to_dict()` of agent_interfaces - if self.agent_interfaces: - _dict['agentInterfaces'] = self.agent_interfaces.to_dict() # override the default output from pydantic by calling `to_dict()` of custom_headers if self.custom_headers: _dict['customHeaders'] = self.custom_headers.to_dict() @@ -203,7 +198,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "type": obj.get("type"), "_links": TestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, "authType": obj.get("authType"), - "agentInterfaces": AgentInterfaces.from_dict(obj["agentInterfaces"]) if obj.get("agentInterfaces") is not None else None, "bandwidthMeasurements": obj.get("bandwidthMeasurements"), "clientCertificate": obj.get("clientCertificate"), "contentRegex": obj.get("contentRegex"), diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_page_load_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_page_load_test.py index 0be8cb8c9..3f61ef9bb 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_page_load_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_page_load_test.py @@ -20,7 +20,6 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from thousandeyes_sdk.tests.models.agent_interfaces import AgentInterfaces from thousandeyes_sdk.tests.models.o_auth import OAuth from thousandeyes_sdk.tests.models.test_auth_type import TestAuthType from thousandeyes_sdk.tests.models.test_chromium_track import TestChromiumTrack @@ -57,7 +56,6 @@ class UnexpandedPageLoadTest(BaseModel): type: Optional[StrictStr] = None links: Optional[TestLinks] = Field(default=None, alias="_links") auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") - agent_interfaces: Optional[AgentInterfaces] = Field(default=None, alias="agentInterfaces") bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") content_regex: Optional[StrictStr] = Field(default=None, description="Content regex, this field does not require escaping.", alias="contentRegex") @@ -110,7 +108,7 @@ class UnexpandedPageLoadTest(BaseModel): subinterval: Optional[TestSubInterval] = None bgp_measurements: Optional[StrictBool] = Field(default=True, description="Set to `true` to enable bgp measurements.", alias="bgpMeasurements") use_public_bgp: Optional[StrictBool] = Field(default=True, description="Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value.", alias="usePublicBgp") - __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "authType", "agentInterfaces", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "emulatedDeviceId", "pageLoadTargetTime", "pageLoadTimeLimit", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "chromeOptions", "chromePolicies", "chromiumTrack", "pageLoadingStrategy", "randomizedStartTime", "identifyAgentTrafficWithUserAgent", "httpInterval", "subinterval", "bgpMeasurements", "usePublicBgp"] + __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "emulatedDeviceId", "pageLoadTargetTime", "pageLoadTimeLimit", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "chromeOptions", "chromePolicies", "chromiumTrack", "pageLoadingStrategy", "randomizedStartTime", "identifyAgentTrafficWithUserAgent", "httpInterval", "subinterval", "bgpMeasurements", "usePublicBgp"] model_config = ConfigDict( populate_by_name=True, @@ -173,9 +171,6 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of links if self.links: _dict['_links'] = self.links.to_dict() - # override the default output from pydantic by calling `to_dict()` of agent_interfaces - if self.agent_interfaces: - _dict['agentInterfaces'] = self.agent_interfaces.to_dict() # override the default output from pydantic by calling `to_dict()` of custom_headers if self.custom_headers: _dict['customHeaders'] = self.custom_headers.to_dict() @@ -216,7 +211,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "type": obj.get("type"), "_links": TestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, "authType": obj.get("authType"), - "agentInterfaces": AgentInterfaces.from_dict(obj["agentInterfaces"]) if obj.get("agentInterfaces") is not None else None, "bandwidthMeasurements": obj.get("bandwidthMeasurements"), "clientCertificate": obj.get("clientCertificate"), "contentRegex": obj.get("contentRegex"), diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_web_transaction_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_web_transaction_test.py index 5ab97ee86..06083fcaf 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_web_transaction_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_web_transaction_test.py @@ -20,7 +20,6 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from thousandeyes_sdk.tests.models.agent_interfaces import AgentInterfaces from thousandeyes_sdk.tests.models.o_auth import OAuth from thousandeyes_sdk.tests.models.test_auth_type import TestAuthType from thousandeyes_sdk.tests.models.test_chromium_track import TestChromiumTrack @@ -56,7 +55,6 @@ class UnexpandedWebTransactionTest(BaseModel): type: Optional[StrictStr] = None links: Optional[TestLinks] = Field(default=None, alias="_links") auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") - agent_interfaces: Optional[AgentInterfaces] = Field(default=None, alias="agentInterfaces") bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") content_regex: Optional[StrictStr] = Field(default=None, description="Content regex, this field does not require escaping.", alias="contentRegex") @@ -110,7 +108,7 @@ class UnexpandedWebTransactionTest(BaseModel): subinterval: Optional[TestSubInterval] = None bgp_measurements: Optional[StrictBool] = Field(default=True, description="Set to `true` to enable bgp measurements.", alias="bgpMeasurements") use_public_bgp: Optional[StrictBool] = Field(default=True, description="Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value.", alias="usePublicBgp") - __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "authType", "agentInterfaces", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "emulatedDeviceId", "targetTime", "timeLimit", "transactionScript", "flagCollectConsoleLogs", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "chromeOptions", "chromePolicies", "chromiumTrack", "pageLoadingStrategy", "randomizedStartTime", "identifyAgentTrafficWithUserAgent", "subinterval", "bgpMeasurements", "usePublicBgp"] + __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "emulatedDeviceId", "targetTime", "timeLimit", "transactionScript", "flagCollectConsoleLogs", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "chromeOptions", "chromePolicies", "chromiumTrack", "pageLoadingStrategy", "randomizedStartTime", "identifyAgentTrafficWithUserAgent", "subinterval", "bgpMeasurements", "usePublicBgp"] model_config = ConfigDict( populate_by_name=True, @@ -173,9 +171,6 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of links if self.links: _dict['_links'] = self.links.to_dict() - # override the default output from pydantic by calling `to_dict()` of agent_interfaces - if self.agent_interfaces: - _dict['agentInterfaces'] = self.agent_interfaces.to_dict() # override the default output from pydantic by calling `to_dict()` of custom_headers if self.custom_headers: _dict['customHeaders'] = self.custom_headers.to_dict() @@ -216,7 +211,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "type": obj.get("type"), "_links": TestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, "authType": obj.get("authType"), - "agentInterfaces": AgentInterfaces.from_dict(obj["agentInterfaces"]) if obj.get("agentInterfaces") is not None else None, "bandwidthMeasurements": obj.get("bandwidthMeasurements"), "clientCertificate": obj.get("clientCertificate"), "contentRegex": obj.get("contentRegex"), diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_agent_to_server_test_request.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_agent_to_server_test_request.py index 320191f10..3612c1717 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_agent_to_server_test_request.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_agent_to_server_test_request.py @@ -19,7 +19,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from thousandeyes_sdk.tests.models.test_agent_request import TestAgentRequest +from thousandeyes_sdk.tests.models.test_agent_with_source_ip_request import TestAgentWithSourceIpRequest from thousandeyes_sdk.tests.models.test_dscp_id import TestDscpId from thousandeyes_sdk.tests.models.test_interval import TestInterval from thousandeyes_sdk.tests.models.test_ipv6_policy import TestIpv6Policy @@ -53,7 +53,7 @@ class UpdateAgentToServerTestRequest(BaseModel): ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") ping_payload_size: Optional[Annotated[int, Field(le=1400, strict=True, ge=0)]] = Field(default=None, description="Payload size (not total packet size) for the end-to-end metric's probes, ping payload size allows values from 0 to 1400 bytes. When set to null, payload sizes are 0 bytes for ICMP-based tests and 1 byte for TCP-based tests.", alias="pingPayloadSize") network_measurements: Optional[StrictBool] = Field(default=False, description="View packet loss in 1-second intervals. This is only available for 1-minute interval tests. Set to `true` to enable network measurements.", alias="networkMeasurements") - agents: Optional[List[TestAgentRequest]] = Field(default=None, description="Contains list of Agent IDs (get `agentId` from `/agents` endpoint).") + agents: Optional[List[TestAgentWithSourceIpRequest]] = Field(default=None, description="Agents assigned to the test. To select a source interface, set `sourceIpAddress` on the same object as its `agentId`.") interval: Optional[TestInterval] = None alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.") @@ -145,7 +145,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "ipv6Policy": obj.get("ipv6Policy"), "pingPayloadSize": obj.get("pingPayloadSize"), "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else False, - "agents": [TestAgentRequest.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None, + "agents": [TestAgentWithSourceIpRequest.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None, "interval": obj.get("interval"), "alertsEnabled": obj.get("alertsEnabled"), "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/voice_test_request.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/voice_test_request.py index 81b3cf735..2fee9cf0f 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/voice_test_request.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/voice_test_request.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from thousandeyes_sdk.tests.models.test_agent_request import TestAgentRequest +from thousandeyes_sdk.tests.models.test_agent_with_source_ip_request import TestAgentWithSourceIpRequest from thousandeyes_sdk.tests.models.test_dscp_id import TestDscpId from thousandeyes_sdk.tests.models.test_interval import TestInterval from thousandeyes_sdk.tests.models.test_links import TestLinks @@ -61,7 +61,7 @@ class VoiceTestRequest(BaseModel): tags: Optional[List[StrictStr]] = Field(default=None, description="Contains list of test tag IDs (get `id` from `/tags` endpoint).") shared_with_accounts: Optional[List[StrictStr]] = Field(default=None, description="Contains list of account group IDs. Test is shared with the listed account groups (get `aid` from `/account-groups` endpoint)", alias="sharedWithAccounts") alert_rules: Optional[List[StrictStr]] = Field(default=None, description="List of alert rules IDs to apply to the test (get `ruleId` from `/alerts/rules` endpoint. If `alertsEnabled` is set to `true` and `alertRules` is not included on test creation or update, applicable user default alert rules will be used)", alias="alertRules") - agents: List[TestAgentRequest] = Field(description="Contains list of Agent IDs (get `agentId` from `/agents` endpoint).") + agents: List[TestAgentWithSourceIpRequest] = Field(description="Agents assigned to the test. To select a source interface, set `sourceIpAddress` on the same object as its `agentId`.") monitors: Optional[List[StrictStr]] = Field(default=None, description="Contains list of BGP monitor IDs (get `monitorId` from `/monitors` endpoint)") __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "codec", "codecId", "dscp", "dscpId", "duration", "jitterBuffer", "numPathTraces", "port", "randomizedStartTime", "targetAgentId", "bgpMeasurements", "usePublicBgp", "labels", "tags", "sharedWithAccounts", "alertRules", "agents", "monitors"] @@ -177,7 +177,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "tags": obj.get("tags"), "sharedWithAccounts": obj.get("sharedWithAccounts"), "alertRules": obj.get("alertRules"), - "agents": [TestAgentRequest.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None, + "agents": [TestAgentWithSourceIpRequest.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None, "monitors": obj.get("monitors") }) return _obj diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/web_transaction_instant_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/web_transaction_instant_test.py index 3f101ba13..8f776abaf 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/web_transaction_instant_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/web_transaction_instant_test.py @@ -20,7 +20,6 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from thousandeyes_sdk.tests.models.agent_interfaces import AgentInterfaces from thousandeyes_sdk.tests.models.o_auth import OAuth from thousandeyes_sdk.tests.models.shared_with_account import SharedWithAccount from thousandeyes_sdk.tests.models.test_auth_type import TestAuthType @@ -57,7 +56,6 @@ class WebTransactionInstantTest(BaseModel): tags: Optional[List[TestTag]] = Field(default=None, description="Tags assigned to the test. Returned only when `expand=tag` is specified. This field is not returned for Instant Tests. For more information, see `/tags`.") shared_with_accounts: Optional[List[SharedWithAccount]] = Field(default=None, alias="sharedWithAccounts") auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") - agent_interfaces: Optional[AgentInterfaces] = Field(default=None, alias="agentInterfaces") bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") content_regex: Optional[StrictStr] = Field(default=None, description="Content regex, this field does not require escaping.", alias="contentRegex") @@ -109,7 +107,7 @@ class WebTransactionInstantTest(BaseModel): randomized_start_time: Optional[StrictBool] = Field(default=False, description="Indicates whether agents should randomize the start time in each test round.", alias="randomizedStartTime") identify_agent_traffic_with_user_agent: Optional[StrictBool] = Field(default=False, description="Determines how agent traffic is identified: * `false`: Adds the `x-thousandeyes-agent: yes` header. * `true`: Appends `(ThousandEyes Agent)` to the `user-agent` header. For more information, see [Notes on Agent ID Strategy](https://docs.thousandeyes.com/product-documentation/browser-synthetics/test-settings-page-load-transaction#notes-on-agent-id-strategy). ", alias="identifyAgentTrafficWithUserAgent") credentials: Optional[List[StrictStr]] = Field(default=None, description="Contains a list of credential IDs (get `credentialId` from `/credentials` endpoint).") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "tags", "sharedWithAccounts", "authType", "agentInterfaces", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "emulatedDeviceId", "targetTime", "timeLimit", "transactionScript", "flagCollectConsoleLogs", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "chromeOptions", "chromePolicies", "chromiumTrack", "pageLoadingStrategy", "randomizedStartTime", "identifyAgentTrafficWithUserAgent", "credentials"] + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "tags", "sharedWithAccounts", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "emulatedDeviceId", "targetTime", "timeLimit", "transactionScript", "flagCollectConsoleLogs", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "chromeOptions", "chromePolicies", "chromiumTrack", "pageLoadingStrategy", "randomizedStartTime", "identifyAgentTrafficWithUserAgent", "credentials"] model_config = ConfigDict( populate_by_name=True, @@ -199,9 +197,6 @@ def to_dict(self) -> Dict[str, Any]: if _item: _items.append(_item.to_dict()) _dict['sharedWithAccounts'] = _items - # override the default output from pydantic by calling `to_dict()` of agent_interfaces - if self.agent_interfaces: - _dict['agentInterfaces'] = self.agent_interfaces.to_dict() # override the default output from pydantic by calling `to_dict()` of custom_headers if self.custom_headers: _dict['customHeaders'] = self.custom_headers.to_dict() @@ -242,7 +237,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "tags": [TestTag.from_dict(_item) for _item in obj["tags"]] if obj.get("tags") is not None else None, "sharedWithAccounts": [SharedWithAccount.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None, "authType": obj.get("authType"), - "agentInterfaces": AgentInterfaces.from_dict(obj["agentInterfaces"]) if obj.get("agentInterfaces") is not None else None, "bandwidthMeasurements": obj.get("bandwidthMeasurements"), "clientCertificate": obj.get("clientCertificate"), "contentRegex": obj.get("contentRegex"), diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/web_transaction_properties.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/web_transaction_properties.py index eace4618c..06f8e0c20 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/web_transaction_properties.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/web_transaction_properties.py @@ -19,7 +19,6 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from thousandeyes_sdk.tests.models.agent_interfaces import AgentInterfaces from thousandeyes_sdk.tests.models.o_auth import OAuth from thousandeyes_sdk.tests.models.test_auth_type import TestAuthType from thousandeyes_sdk.tests.models.test_chromium_track import TestChromiumTrack @@ -38,7 +37,6 @@ class WebTransactionProperties(BaseModel): WebTransactionProperties """ # noqa: E501 auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") - agent_interfaces: Optional[AgentInterfaces] = Field(default=None, alias="agentInterfaces") bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") content_regex: Optional[StrictStr] = Field(default=None, description="Content regex, this field does not require escaping.", alias="contentRegex") @@ -90,7 +88,7 @@ class WebTransactionProperties(BaseModel): randomized_start_time: Optional[StrictBool] = Field(default=False, description="Indicates whether agents should randomize the start time in each test round.", alias="randomizedStartTime") type: Optional[StrictStr] = None identify_agent_traffic_with_user_agent: Optional[StrictBool] = Field(default=False, description="Determines how agent traffic is identified: * `false`: Adds the `x-thousandeyes-agent: yes` header. * `true`: Appends `(ThousandEyes Agent)` to the `user-agent` header. For more information, see [Notes on Agent ID Strategy](https://docs.thousandeyes.com/product-documentation/browser-synthetics/test-settings-page-load-transaction#notes-on-agent-id-strategy). ", alias="identifyAgentTrafficWithUserAgent") - __properties: ClassVar[List[str]] = ["authType", "agentInterfaces", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "emulatedDeviceId", "targetTime", "timeLimit", "transactionScript", "flagCollectConsoleLogs", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "chromeOptions", "chromePolicies", "chromiumTrack", "pageLoadingStrategy", "randomizedStartTime", "type", "identifyAgentTrafficWithUserAgent"] + __properties: ClassVar[List[str]] = ["authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "emulatedDeviceId", "targetTime", "timeLimit", "transactionScript", "flagCollectConsoleLogs", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "chromeOptions", "chromePolicies", "chromiumTrack", "pageLoadingStrategy", "randomizedStartTime", "type", "identifyAgentTrafficWithUserAgent"] model_config = ConfigDict( populate_by_name=True, @@ -136,9 +134,6 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of agent_interfaces - if self.agent_interfaces: - _dict['agentInterfaces'] = self.agent_interfaces.to_dict() # override the default output from pydantic by calling `to_dict()` of custom_headers if self.custom_headers: _dict['customHeaders'] = self.custom_headers.to_dict() @@ -165,7 +160,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "authType": obj.get("authType"), - "agentInterfaces": AgentInterfaces.from_dict(obj["agentInterfaces"]) if obj.get("agentInterfaces") is not None else None, "bandwidthMeasurements": obj.get("bandwidthMeasurements"), "clientCertificate": obj.get("clientCertificate"), "contentRegex": obj.get("contentRegex"), diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/web_transaction_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/web_transaction_test.py index a81c8b4e6..c5f201c57 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/web_transaction_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/web_transaction_test.py @@ -20,7 +20,6 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from thousandeyes_sdk.tests.models.agent_interfaces import AgentInterfaces from thousandeyes_sdk.tests.models.alert_rule import AlertRule from thousandeyes_sdk.tests.models.monitor import Monitor from thousandeyes_sdk.tests.models.o_auth import OAuth @@ -65,7 +64,6 @@ class WebTransactionTest(BaseModel): tags: Optional[List[TestTag]] = Field(default=None, description="Tags assigned to the test. Returned only when `expand=tag` is specified. This field is not returned for Instant Tests. For more information, see `/tags`.") shared_with_accounts: Optional[List[SharedWithAccount]] = Field(default=None, alias="sharedWithAccounts") auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") - agent_interfaces: Optional[AgentInterfaces] = Field(default=None, alias="agentInterfaces") bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") content_regex: Optional[StrictStr] = Field(default=None, description="Content regex, this field does not require escaping.", alias="contentRegex") @@ -121,7 +119,7 @@ class WebTransactionTest(BaseModel): use_public_bgp: Optional[StrictBool] = Field(default=True, description="Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value.", alias="usePublicBgp") monitors: Optional[List[Monitor]] = Field(default=None, description="Contains list of enabled BGP monitors.") subinterval: Optional[TestSubInterval] = None - __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "tags", "sharedWithAccounts", "authType", "agentInterfaces", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "emulatedDeviceId", "targetTime", "timeLimit", "transactionScript", "flagCollectConsoleLogs", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "chromeOptions", "chromePolicies", "chromiumTrack", "pageLoadingStrategy", "randomizedStartTime", "identifyAgentTrafficWithUserAgent", "credentials", "bgpMeasurements", "usePublicBgp", "monitors", "subinterval"] + __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "tags", "sharedWithAccounts", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "emulatedDeviceId", "targetTime", "timeLimit", "transactionScript", "flagCollectConsoleLogs", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "chromeOptions", "chromePolicies", "chromiumTrack", "pageLoadingStrategy", "randomizedStartTime", "identifyAgentTrafficWithUserAgent", "credentials", "bgpMeasurements", "usePublicBgp", "monitors", "subinterval"] model_config = ConfigDict( populate_by_name=True, @@ -220,9 +218,6 @@ def to_dict(self) -> Dict[str, Any]: if _item: _items.append(_item.to_dict()) _dict['sharedWithAccounts'] = _items - # override the default output from pydantic by calling `to_dict()` of agent_interfaces - if self.agent_interfaces: - _dict['agentInterfaces'] = self.agent_interfaces.to_dict() # override the default output from pydantic by calling `to_dict()` of custom_headers if self.custom_headers: _dict['customHeaders'] = self.custom_headers.to_dict() @@ -274,7 +269,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "tags": [TestTag.from_dict(_item) for _item in obj["tags"]] if obj.get("tags") is not None else None, "sharedWithAccounts": [SharedWithAccount.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None, "authType": obj.get("authType"), - "agentInterfaces": AgentInterfaces.from_dict(obj["agentInterfaces"]) if obj.get("agentInterfaces") is not None else None, "bandwidthMeasurements": obj.get("bandwidthMeasurements"), "clientCertificate": obj.get("clientCertificate"), "contentRegex": obj.get("contentRegex"), diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/web_transaction_test_request.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/web_transaction_test_request.py index 0b23175e1..8a12e98bb 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/web_transaction_test_request.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/web_transaction_test_request.py @@ -20,7 +20,6 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from thousandeyes_sdk.tests.models.agent_interfaces import AgentInterfaces from thousandeyes_sdk.tests.models.o_auth import OAuth from thousandeyes_sdk.tests.models.test_agent_request import TestAgentRequest from thousandeyes_sdk.tests.models.test_auth_type import TestAuthType @@ -57,7 +56,6 @@ class WebTransactionTestRequest(BaseModel): type: Optional[StrictStr] = None links: Optional[TestLinks] = Field(default=None, alias="_links") auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") - agent_interfaces: Optional[AgentInterfaces] = Field(default=None, alias="agentInterfaces") bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") content_regex: Optional[StrictStr] = Field(default=None, description="Content regex, this field does not require escaping.", alias="contentRegex") @@ -115,10 +113,10 @@ class WebTransactionTestRequest(BaseModel): tags: Optional[List[StrictStr]] = Field(default=None, description="Contains list of test tag IDs (get `id` from `/tags` endpoint).") shared_with_accounts: Optional[List[StrictStr]] = Field(default=None, description="Contains list of account group IDs. Test is shared with the listed account groups (get `aid` from `/account-groups` endpoint)", alias="sharedWithAccounts") alert_rules: Optional[List[StrictStr]] = Field(default=None, description="List of alert rules IDs to apply to the test (get `ruleId` from `/alerts/rules` endpoint. If `alertsEnabled` is set to `true` and `alertRules` is not included on test creation or update, applicable user default alert rules will be used)", alias="alertRules") - agents: List[TestAgentRequest] = Field(description="Contains list of Agent IDs (get `agentId` from `/agents` endpoint).") + agents: List[TestAgentRequest] = Field(description="Agents assigned to the test.") monitors: Optional[List[StrictStr]] = Field(default=None, description="Contains list of BGP monitor IDs (get `monitorId` from `/monitors` endpoint)") credentials: Optional[List[StrictStr]] = Field(default=None, description="Contains a list of credential IDs (get `credentialId` from `/credentials` endpoint).") - __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "authType", "agentInterfaces", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "emulatedDeviceId", "targetTime", "timeLimit", "transactionScript", "flagCollectConsoleLogs", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "chromeOptions", "chromePolicies", "chromiumTrack", "pageLoadingStrategy", "randomizedStartTime", "identifyAgentTrafficWithUserAgent", "subinterval", "bgpMeasurements", "usePublicBgp", "labels", "tags", "sharedWithAccounts", "alertRules", "agents", "monitors", "credentials"] + __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "emulatedDeviceId", "targetTime", "timeLimit", "transactionScript", "flagCollectConsoleLogs", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "chromeOptions", "chromePolicies", "chromiumTrack", "pageLoadingStrategy", "randomizedStartTime", "identifyAgentTrafficWithUserAgent", "subinterval", "bgpMeasurements", "usePublicBgp", "labels", "tags", "sharedWithAccounts", "alertRules", "agents", "monitors", "credentials"] model_config = ConfigDict( populate_by_name=True, @@ -181,9 +179,6 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of links if self.links: _dict['_links'] = self.links.to_dict() - # override the default output from pydantic by calling `to_dict()` of agent_interfaces - if self.agent_interfaces: - _dict['agentInterfaces'] = self.agent_interfaces.to_dict() # override the default output from pydantic by calling `to_dict()` of custom_headers if self.custom_headers: _dict['customHeaders'] = self.custom_headers.to_dict() @@ -231,7 +226,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "type": obj.get("type"), "_links": TestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, "authType": obj.get("authType"), - "agentInterfaces": AgentInterfaces.from_dict(obj["agentInterfaces"]) if obj.get("agentInterfaces") is not None else None, "bandwidthMeasurements": obj.get("bandwidthMeasurements"), "clientCertificate": obj.get("clientCertificate"), "contentRegex": obj.get("contentRegex"), diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/web_transaction_test_response.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/web_transaction_test_response.py index e5d3a7313..1d12fd078 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/web_transaction_test_response.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/web_transaction_test_response.py @@ -20,7 +20,6 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from thousandeyes_sdk.tests.models.agent_interfaces import AgentInterfaces from thousandeyes_sdk.tests.models.alert_rule import AlertRule from thousandeyes_sdk.tests.models.monitor import Monitor from thousandeyes_sdk.tests.models.o_auth import OAuth @@ -66,7 +65,6 @@ class WebTransactionTestResponse(BaseModel): tags: Optional[List[TestTag]] = Field(default=None, description="Tags assigned to the test. Returned only when `expand=tag` is specified. This field is not returned for Instant Tests. For more information, see `/tags`.") shared_with_accounts: Optional[List[SharedWithAccount]] = Field(default=None, alias="sharedWithAccounts") auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") - agent_interfaces: Optional[AgentInterfaces] = Field(default=None, alias="agentInterfaces") bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") content_regex: Optional[StrictStr] = Field(default=None, description="Content regex, this field does not require escaping.", alias="contentRegex") @@ -123,7 +121,7 @@ class WebTransactionTestResponse(BaseModel): monitors: Optional[List[Monitor]] = Field(default=None, description="Contains list of enabled BGP monitors.") subinterval: Optional[TestSubInterval] = None agents: Optional[List[TestAgentResponse]] = Field(default=None, description="Contains list of agents.") - __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "tags", "sharedWithAccounts", "authType", "agentInterfaces", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "emulatedDeviceId", "targetTime", "timeLimit", "transactionScript", "flagCollectConsoleLogs", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "chromeOptions", "chromePolicies", "chromiumTrack", "pageLoadingStrategy", "randomizedStartTime", "identifyAgentTrafficWithUserAgent", "credentials", "bgpMeasurements", "usePublicBgp", "monitors", "subinterval", "agents"] + __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "tags", "sharedWithAccounts", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "emulatedDeviceId", "targetTime", "timeLimit", "transactionScript", "flagCollectConsoleLogs", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "chromeOptions", "chromePolicies", "chromiumTrack", "pageLoadingStrategy", "randomizedStartTime", "identifyAgentTrafficWithUserAgent", "credentials", "bgpMeasurements", "usePublicBgp", "monitors", "subinterval", "agents"] model_config = ConfigDict( populate_by_name=True, @@ -222,9 +220,6 @@ def to_dict(self) -> Dict[str, Any]: if _item: _items.append(_item.to_dict()) _dict['sharedWithAccounts'] = _items - # override the default output from pydantic by calling `to_dict()` of agent_interfaces - if self.agent_interfaces: - _dict['agentInterfaces'] = self.agent_interfaces.to_dict() # override the default output from pydantic by calling `to_dict()` of custom_headers if self.custom_headers: _dict['customHeaders'] = self.custom_headers.to_dict() @@ -283,7 +278,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "tags": [TestTag.from_dict(_item) for _item in obj["tags"]] if obj.get("tags") is not None else None, "sharedWithAccounts": [SharedWithAccount.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None, "authType": obj.get("authType"), - "agentInterfaces": AgentInterfaces.from_dict(obj["agentInterfaces"]) if obj.get("agentInterfaces") is not None else None, "bandwidthMeasurements": obj.get("bandwidthMeasurements"), "clientCertificate": obj.get("clientCertificate"), "contentRegex": obj.get("contentRegex"), diff --git a/thousandeyes-sdk-tests/test/mock_manifest.py b/thousandeyes-sdk-tests/test/mock_manifest.py index 39d9740ca..50e2c7b33 100644 --- a/thousandeyes-sdk-tests/test/mock_manifest.py +++ b/thousandeyes-sdk-tests/test/mock_manifest.py @@ -436,11 +436,7 @@ "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 19, "createdDate" : "2022-07-17T22:00:54Z", @@ -1816,11 +1812,7 @@ "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 19, "createdDate" : "2022-07-17T22:00:54Z", @@ -2162,9 +2154,6 @@ "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -3058,9 +3047,6 @@ "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -3402,9 +3388,6 @@ "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -4283,9 +4266,6 @@ "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "randomizedStartTime" : false, "port" : 443, @@ -5567,11 +5547,7 @@ "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -6367,11 +6343,7 @@ "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -6719,11 +6691,7 @@ "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -7644,11 +7612,7 @@ "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -7944,11 +7908,7 @@ "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -8749,11 +8709,7 @@ "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -9103,9 +9059,6 @@ "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -10011,9 +9964,6 @@ "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -10182,10 +10132,6 @@ "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ { "labelId" : "961", "name" : "Artem label", @@ -10407,10 +10353,6 @@ "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "randomizedStartTime" : false, @@ -10468,9 +10410,6 @@ "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "postBody" : "{ \\"example\\" : \\"value\\"}", @@ -10728,10 +10667,6 @@ "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ { "labelId" : "961", "name" : "Artem label", @@ -11042,10 +10977,6 @@ "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "randomizedStartTime" : false, "modifiedDate" : "2022-07-17T22:00:54Z", "interval" : 60, @@ -11145,10 +11076,6 @@ "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "randomizedStartTime" : false, "modifiedDate" : "2022-07-17T22:00:54Z", "interval" : 60, @@ -11358,10 +11285,6 @@ "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ { "labelId" : "961", "name" : "Artem label", @@ -11583,10 +11506,6 @@ "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "randomizedStartTime" : false, @@ -11644,9 +11563,6 @@ "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "postBody" : "{ \\"example\\" : \\"value\\"}", @@ -11816,10 +11732,6 @@ "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ { "labelId" : "961", "name" : "Artem label", @@ -12052,10 +11964,6 @@ "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "httpInterval" : 120, @@ -12116,11 +12024,7 @@ "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "disableScreenshot" : false, @@ -12384,10 +12288,6 @@ "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ { "labelId" : "961", "name" : "Artem label", @@ -12709,10 +12609,6 @@ "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "httpInterval" : 120, "randomizedStartTime" : false, "modifiedDate" : "2022-07-17T22:00:54Z", @@ -12823,10 +12719,6 @@ "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "httpInterval" : 120, "randomizedStartTime" : false, "modifiedDate" : "2022-07-17T22:00:54Z", @@ -13047,10 +12939,6 @@ "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ { "labelId" : "961", "name" : "Artem label", @@ -13283,10 +13171,6 @@ "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "httpInterval" : 120, @@ -13347,11 +13231,7 @@ "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "disableScreenshot" : false, @@ -14184,9 +14064,6 @@ "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -15089,9 +14966,6 @@ "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -15687,9 +15561,6 @@ "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "codec" : "G.711 @ 64 Kbps", "codecId" : "0", @@ -16563,9 +16434,6 @@ "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "codec" : "G.711 @ 64 Kbps", "codecId" : "0", @@ -16739,10 +16607,6 @@ "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ { "labelId" : "961", "name" : "Artem label", @@ -16977,10 +16841,6 @@ "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "randomizedStartTime" : false, @@ -17040,11 +16900,7 @@ "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 30, "createdDate" : "2022-07-17T22:00:54Z", @@ -17311,10 +17167,6 @@ "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ { "labelId" : "961", "name" : "Artem label", @@ -17638,10 +17490,6 @@ "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "randomizedStartTime" : false, "modifiedDate" : "2022-07-17T22:00:54Z", "interval" : 60, @@ -17753,10 +17601,6 @@ "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "randomizedStartTime" : false, "modifiedDate" : "2022-07-17T22:00:54Z", "interval" : 60, @@ -17978,10 +17822,6 @@ "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ { "labelId" : "961", "name" : "Artem label", @@ -18216,10 +18056,6 @@ "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "randomizedStartTime" : false, @@ -18279,11 +18115,7 @@ "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 30, "createdDate" : "2022-07-17T22:00:54Z", diff --git a/thousandeyes-sdk-tests/test/test_agent_to_agent_tests_api.py b/thousandeyes-sdk-tests/test/test_agent_to_agent_tests_api.py index df599277a..ac509cb74 100644 --- a/thousandeyes-sdk-tests/test/test_agent_to_agent_tests_api.py +++ b/thousandeyes-sdk-tests/test/test_agent_to_agent_tests_api.py @@ -76,9 +76,6 @@ def test_create_agent_to_agent_test_models_validation(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -97,6 +94,7 @@ def test_create_agent_to_agent_test_models_validation(self) -> None: request_from_json = thousandeyes_sdk.tests.models.AgentToAgentTestRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "_links" : { @@ -264,14 +262,17 @@ def test_create_agent_to_agent_test_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.AgentToAgentTestResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_delete_agent_to_agent_test_models_validation(self) -> None: """Test case for delete_agent_to_agent_test request and response models""" + def test_get_agent_to_agent_test_models_validation(self) -> None: """Test case for get_agent_to_agent_test request and response models""" + response_body_json = """ { "_links" : { @@ -439,10 +440,12 @@ def test_get_agent_to_agent_test_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.AgentToAgentTestResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_agent_to_agent_tests_models_validation(self) -> None: """Test case for get_agent_to_agent_tests request and response models""" + response_body_json = """ { "tests" : [ { @@ -557,6 +560,7 @@ def test_get_agent_to_agent_tests_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.AgentToAgentTests.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_update_agent_to_agent_test_models_validation(self) -> None: """Test case for update_agent_to_agent_test request and response models""" @@ -606,9 +610,6 @@ def test_update_agent_to_agent_test_models_validation(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -627,6 +628,7 @@ def test_update_agent_to_agent_test_models_validation(self) -> None: request_from_json = thousandeyes_sdk.tests.models.AgentToAgentTestRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "_links" : { @@ -794,6 +796,7 @@ def test_update_agent_to_agent_test_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.AgentToAgentTestResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-tests/test/test_agent_to_agent_tests_api_integration.py b/thousandeyes-sdk-tests/test/test_agent_to_agent_tests_api_integration.py index 4fa32e417..471b18100 100644 --- a/thousandeyes-sdk-tests/test/test_agent_to_agent_tests_api_integration.py +++ b/thousandeyes-sdk-tests/test/test_agent_to_agent_tests_api_integration.py @@ -78,9 +78,6 @@ def test_create_agent_to_agent_test_happy_path(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -325,9 +322,6 @@ def test_create_agent_to_agent_test_error_400(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -429,9 +423,6 @@ def test_create_agent_to_agent_test_error_401(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -521,9 +512,6 @@ def test_create_agent_to_agent_test_error_403(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -616,9 +604,6 @@ def test_create_agent_to_agent_test_error_404(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -711,9 +696,6 @@ def test_create_agent_to_agent_test_error_429(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -806,9 +788,6 @@ def test_create_agent_to_agent_test_error_500(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -901,9 +880,6 @@ def test_create_agent_to_agent_test_error_502(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -1843,9 +1819,6 @@ def test_update_agent_to_agent_test_happy_path(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -2093,9 +2066,6 @@ def test_update_agent_to_agent_test_error_400(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -2200,9 +2170,6 @@ def test_update_agent_to_agent_test_error_401(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -2295,9 +2262,6 @@ def test_update_agent_to_agent_test_error_403(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -2393,9 +2357,6 @@ def test_update_agent_to_agent_test_error_404(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -2491,9 +2452,6 @@ def test_update_agent_to_agent_test_error_429(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -2589,9 +2547,6 @@ def test_update_agent_to_agent_test_error_500(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -2687,9 +2642,6 @@ def test_update_agent_to_agent_test_error_502(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", diff --git a/thousandeyes-sdk-tests/test/test_agent_to_server_tests_api.py b/thousandeyes-sdk-tests/test/test_agent_to_server_tests_api.py index f3a919a98..67bd3f4c5 100644 --- a/thousandeyes-sdk-tests/test/test_agent_to_server_tests_api.py +++ b/thousandeyes-sdk-tests/test/test_agent_to_server_tests_api.py @@ -77,9 +77,6 @@ def test_create_agent_to_server_test_models_validation(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -99,6 +96,7 @@ def test_create_agent_to_server_test_models_validation(self) -> None: request_from_json = thousandeyes_sdk.tests.models.AgentToServerTestRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "server" : "www.thousandeyes.com:80", @@ -267,14 +265,17 @@ def test_create_agent_to_server_test_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.AgentToServerTestResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_delete_agent_to_server_test_models_validation(self) -> None: """Test case for delete_agent_to_server_test request and response models""" + def test_get_agent_to_server_test_models_validation(self) -> None: """Test case for get_agent_to_server_test request and response models""" + response_body_json = """ { "server" : "www.thousandeyes.com:80", @@ -443,10 +444,12 @@ def test_get_agent_to_server_test_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.AgentToServerTestResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_agent_to_server_tests_models_validation(self) -> None: """Test case for get_agent_to_server_tests request and response models""" + response_body_json = """ { "tests" : [ { @@ -563,6 +566,7 @@ def test_get_agent_to_server_tests_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.AgentToServerTests.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_update_agent_to_server_test_models_validation(self) -> None: """Test case for update_agent_to_server_test request and response models""" @@ -592,9 +596,6 @@ def test_update_agent_to_server_test_models_validation(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "randomizedStartTime" : false, "port" : 443, @@ -610,6 +611,7 @@ def test_update_agent_to_server_test_models_validation(self) -> None: request_from_json = thousandeyes_sdk.tests.models.UpdateAgentToServerTestRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "server" : "www.thousandeyes.com:80", @@ -778,6 +780,7 @@ def test_update_agent_to_server_test_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.AgentToServerTestResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-tests/test/test_agent_to_server_tests_api_integration.py b/thousandeyes-sdk-tests/test/test_agent_to_server_tests_api_integration.py index 8391a2cea..203b11e04 100644 --- a/thousandeyes-sdk-tests/test/test_agent_to_server_tests_api_integration.py +++ b/thousandeyes-sdk-tests/test/test_agent_to_server_tests_api_integration.py @@ -79,9 +79,6 @@ def test_create_agent_to_server_test_happy_path(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -329,9 +326,6 @@ def test_create_agent_to_server_test_error_400(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -435,9 +429,6 @@ def test_create_agent_to_server_test_error_401(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -529,9 +520,6 @@ def test_create_agent_to_server_test_error_403(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -626,9 +614,6 @@ def test_create_agent_to_server_test_error_404(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -723,9 +708,6 @@ def test_create_agent_to_server_test_error_429(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -820,9 +802,6 @@ def test_create_agent_to_server_test_error_500(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -917,9 +896,6 @@ def test_create_agent_to_server_test_error_502(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -1843,9 +1819,6 @@ def test_update_agent_to_server_test_happy_path(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "randomizedStartTime" : false, "port" : 443, @@ -2071,9 +2044,6 @@ def test_update_agent_to_server_test_error_400(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "randomizedStartTime" : false, "port" : 443, @@ -2155,9 +2125,6 @@ def test_update_agent_to_server_test_error_401(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "randomizedStartTime" : false, "port" : 443, @@ -2227,9 +2194,6 @@ def test_update_agent_to_server_test_error_403(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "randomizedStartTime" : false, "port" : 443, @@ -2302,9 +2266,6 @@ def test_update_agent_to_server_test_error_404(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "randomizedStartTime" : false, "port" : 443, @@ -2377,9 +2338,6 @@ def test_update_agent_to_server_test_error_429(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "randomizedStartTime" : false, "port" : 443, @@ -2452,9 +2410,6 @@ def test_update_agent_to_server_test_error_500(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "randomizedStartTime" : false, "port" : 443, @@ -2527,9 +2482,6 @@ def test_update_agent_to_server_test_error_502(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "randomizedStartTime" : false, "port" : 443, diff --git a/thousandeyes-sdk-tests/test/test_api_tests_api.py b/thousandeyes-sdk-tests/test/test_api_tests_api.py index e08df00cd..dc63c459e 100644 --- a/thousandeyes-sdk-tests/test/test_api_tests_api.py +++ b/thousandeyes-sdk-tests/test/test_api_tests_api.py @@ -172,11 +172,7 @@ def test_create_api_test_models_validation(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 19, "createdDate" : "2022-07-17T22:00:54Z", @@ -197,6 +193,7 @@ def test_create_api_test_models_validation(self) -> None: request_from_json = thousandeyes_sdk.tests.models.ApiTestRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "clientCertificate" : "-----BEGIN PRIVATE KEY-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END PRIVATE KEY-----\\n-----BEGIN CERTIFICATE-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END CERTIFICATE-----\\n", @@ -464,14 +461,17 @@ def test_create_api_test_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.ApiTestResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_delete_api_test_models_validation(self) -> None: """Test case for delete_api_test request and response models""" + def test_get_api_test_models_validation(self) -> None: """Test case for get_api_test request and response models""" + response_body_json = """ { "clientCertificate" : "-----BEGIN PRIVATE KEY-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END PRIVATE KEY-----\\n-----BEGIN CERTIFICATE-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END CERTIFICATE-----\\n", @@ -739,10 +739,12 @@ def test_get_api_test_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.ApiTestResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_api_tests_models_validation(self) -> None: """Test case for get_api_tests request and response models""" + response_body_json = """ { "tests" : [ { @@ -1041,6 +1043,7 @@ def test_get_api_tests_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.ApiTests.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_update_api_test_models_validation(self) -> None: """Test case for update_api_test request and response models""" @@ -1186,11 +1189,7 @@ def test_update_api_test_models_validation(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 19, "createdDate" : "2022-07-17T22:00:54Z", @@ -1211,6 +1210,7 @@ def test_update_api_test_models_validation(self) -> None: request_from_json = thousandeyes_sdk.tests.models.ApiTestRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "clientCertificate" : "-----BEGIN PRIVATE KEY-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END PRIVATE KEY-----\\n-----BEGIN CERTIFICATE-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END CERTIFICATE-----\\n", @@ -1478,6 +1478,7 @@ def test_update_api_test_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.ApiTestResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-tests/test/test_api_tests_api_integration.py b/thousandeyes-sdk-tests/test/test_api_tests_api_integration.py index e92d8a3c4..8c700cb0a 100644 --- a/thousandeyes-sdk-tests/test/test_api_tests_api_integration.py +++ b/thousandeyes-sdk-tests/test/test_api_tests_api_integration.py @@ -174,11 +174,7 @@ def test_create_api_test_happy_path(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 19, "createdDate" : "2022-07-17T22:00:54Z", @@ -621,11 +617,7 @@ def test_create_api_test_error_400(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 19, "createdDate" : "2022-07-17T22:00:54Z", @@ -825,11 +817,7 @@ def test_create_api_test_error_401(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 19, "createdDate" : "2022-07-17T22:00:54Z", @@ -1017,11 +1005,7 @@ def test_create_api_test_error_403(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 19, "createdDate" : "2022-07-17T22:00:54Z", @@ -1212,11 +1196,7 @@ def test_create_api_test_error_404(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 19, "createdDate" : "2022-07-17T22:00:54Z", @@ -1407,11 +1387,7 @@ def test_create_api_test_error_429(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 19, "createdDate" : "2022-07-17T22:00:54Z", @@ -1602,11 +1578,7 @@ def test_create_api_test_error_500(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 19, "createdDate" : "2022-07-17T22:00:54Z", @@ -1797,11 +1769,7 @@ def test_create_api_test_error_502(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 19, "createdDate" : "2022-07-17T22:00:54Z", @@ -3123,11 +3091,7 @@ def test_update_api_test_happy_path(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 19, "createdDate" : "2022-07-17T22:00:54Z", @@ -3573,11 +3537,7 @@ def test_update_api_test_error_400(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 19, "createdDate" : "2022-07-17T22:00:54Z", @@ -3780,11 +3740,7 @@ def test_update_api_test_error_401(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 19, "createdDate" : "2022-07-17T22:00:54Z", @@ -3975,11 +3931,7 @@ def test_update_api_test_error_403(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 19, "createdDate" : "2022-07-17T22:00:54Z", @@ -4173,11 +4125,7 @@ def test_update_api_test_error_404(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 19, "createdDate" : "2022-07-17T22:00:54Z", @@ -4371,11 +4319,7 @@ def test_update_api_test_error_429(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 19, "createdDate" : "2022-07-17T22:00:54Z", @@ -4569,11 +4513,7 @@ def test_update_api_test_error_500(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 19, "createdDate" : "2022-07-17T22:00:54Z", @@ -4767,11 +4707,7 @@ def test_update_api_test_error_502(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 19, "createdDate" : "2022-07-17T22:00:54Z", diff --git a/thousandeyes-sdk-tests/test/test_bgp_tests_api.py b/thousandeyes-sdk-tests/test/test_bgp_tests_api.py index c715cfbe6..7e9450348 100644 --- a/thousandeyes-sdk-tests/test/test_bgp_tests_api.py +++ b/thousandeyes-sdk-tests/test/test_bgp_tests_api.py @@ -76,6 +76,7 @@ def test_create_bgp_test_models_validation(self) -> None: request_from_json = thousandeyes_sdk.tests.models.BgpTestRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "_links" : { @@ -184,14 +185,17 @@ def test_create_bgp_test_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.BgpTestResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_delete_bgp_test_models_validation(self) -> None: """Test case for delete_bgp_test request and response models""" + def test_get_bgp_test_models_validation(self) -> None: """Test case for get_bgp_test request and response models""" + response_body_json = """ { "_links" : { @@ -300,10 +304,12 @@ def test_get_bgp_test_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.BgpTestResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_bgp_tests_models_validation(self) -> None: """Test case for get_bgp_tests request and response models""" + response_body_json = """ { "tests" : [ { @@ -390,6 +396,7 @@ def test_get_bgp_tests_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.BgpTests.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_update_bgp_test_models_validation(self) -> None: """Test case for update_bgp_test request and response models""" @@ -438,6 +445,7 @@ def test_update_bgp_test_models_validation(self) -> None: request_from_json = thousandeyes_sdk.tests.models.UpdateBgpTestRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "_links" : { @@ -546,6 +554,7 @@ def test_update_bgp_test_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.BgpTestResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-tests/test/test_dns_server_tests_api.py b/thousandeyes-sdk-tests/test/test_dns_server_tests_api.py index 985cdc788..af1b673dd 100644 --- a/thousandeyes-sdk-tests/test/test_dns_server_tests_api.py +++ b/thousandeyes-sdk-tests/test/test_dns_server_tests_api.py @@ -76,11 +76,7 @@ def test_create_dns_server_test_models_validation(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -98,6 +94,7 @@ def test_create_dns_server_test_models_validation(self) -> None: request_from_json = thousandeyes_sdk.tests.models.DnsServerTestRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "mtuMeasurements" : false, @@ -272,14 +269,17 @@ def test_create_dns_server_test_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.DnsServerTestResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_delete_dns_server_test_models_validation(self) -> None: """Test case for delete_dns_server_test request and response models""" + def test_get_dns_server_test_models_validation(self) -> None: """Test case for get_dns_server_test request and response models""" + response_body_json = """ { "mtuMeasurements" : false, @@ -454,10 +454,12 @@ def test_get_dns_server_test_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.DnsServerTestResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_dns_server_tests_models_validation(self) -> None: """Test case for get_dns_server_tests request and response models""" + response_body_json = """ { "tests" : [ { @@ -586,6 +588,7 @@ def test_get_dns_server_tests_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.DnsServerTests.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_update_dns_server_test_models_validation(self) -> None: """Test case for update_dns_server_test request and response models""" @@ -635,11 +638,7 @@ def test_update_dns_server_test_models_validation(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -657,6 +656,7 @@ def test_update_dns_server_test_models_validation(self) -> None: request_from_json = thousandeyes_sdk.tests.models.DnsServerTestRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "mtuMeasurements" : false, @@ -831,6 +831,7 @@ def test_update_dns_server_test_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.DnsServerTestResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-tests/test/test_dns_server_tests_api_integration.py b/thousandeyes-sdk-tests/test/test_dns_server_tests_api_integration.py index cd940febb..43c83216d 100644 --- a/thousandeyes-sdk-tests/test/test_dns_server_tests_api_integration.py +++ b/thousandeyes-sdk-tests/test/test_dns_server_tests_api_integration.py @@ -78,11 +78,7 @@ def test_create_dns_server_test_happy_path(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -333,11 +329,7 @@ def test_create_dns_server_test_error_400(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -438,11 +430,7 @@ def test_create_dns_server_test_error_401(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -531,11 +519,7 @@ def test_create_dns_server_test_error_403(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -627,11 +611,7 @@ def test_create_dns_server_test_error_404(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -723,11 +703,7 @@ def test_create_dns_server_test_error_429(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -819,11 +795,7 @@ def test_create_dns_server_test_error_500(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -915,11 +887,7 @@ def test_create_dns_server_test_error_502(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -1879,11 +1847,7 @@ def test_update_dns_server_test_happy_path(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -2137,11 +2101,7 @@ def test_update_dns_server_test_error_400(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -2245,11 +2205,7 @@ def test_update_dns_server_test_error_401(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -2341,11 +2297,7 @@ def test_update_dns_server_test_error_403(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -2440,11 +2392,7 @@ def test_update_dns_server_test_error_404(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -2539,11 +2487,7 @@ def test_update_dns_server_test_error_429(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -2638,11 +2582,7 @@ def test_update_dns_server_test_error_500(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -2737,11 +2677,7 @@ def test_update_dns_server_test_error_502(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", diff --git a/thousandeyes-sdk-tests/test/test_dns_trace_tests_api.py b/thousandeyes-sdk-tests/test/test_dns_trace_tests_api.py index 009e9fe96..4847e9887 100644 --- a/thousandeyes-sdk-tests/test/test_dns_trace_tests_api.py +++ b/thousandeyes-sdk-tests/test/test_dns_trace_tests_api.py @@ -60,11 +60,7 @@ def test_create_dns_trace_test_models_validation(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -84,6 +80,7 @@ def test_create_dns_trace_test_models_validation(self) -> None: request_from_json = thousandeyes_sdk.tests.models.DnsTraceTestRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "dnsQueryClass" : "in", @@ -224,14 +221,17 @@ def test_create_dns_trace_test_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.DnsTraceTestResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_delete_dns_trace_test_models_validation(self) -> None: """Test case for delete_dns_trace_test request and response models""" + def test_get_dns_trace_test_models_validation(self) -> None: """Test case for get_dns_trace_test request and response models""" + response_body_json = """ { "dnsQueryClass" : "in", @@ -372,10 +372,12 @@ def test_get_dns_trace_test_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.DnsTraceTestResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_dns_trace_tests_models_validation(self) -> None: """Test case for get_dns_trace_tests request and response models""" + response_body_json = """ { "tests" : [ { @@ -466,6 +468,7 @@ def test_get_dns_trace_tests_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.DnsTraceTests.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_update_dns_trace_test_models_validation(self) -> None: """Test case for update_dns_trace_test request and response models""" @@ -499,11 +502,7 @@ def test_update_dns_trace_test_models_validation(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -523,6 +522,7 @@ def test_update_dns_trace_test_models_validation(self) -> None: request_from_json = thousandeyes_sdk.tests.models.DnsTraceTestRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "dnsQueryClass" : "in", @@ -663,6 +663,7 @@ def test_update_dns_trace_test_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.DnsTraceTestResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-tests/test/test_dns_trace_tests_api_integration.py b/thousandeyes-sdk-tests/test/test_dns_trace_tests_api_integration.py index 77eff5f6d..36da974b0 100644 --- a/thousandeyes-sdk-tests/test/test_dns_trace_tests_api_integration.py +++ b/thousandeyes-sdk-tests/test/test_dns_trace_tests_api_integration.py @@ -62,11 +62,7 @@ def test_create_dns_trace_test_happy_path(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -269,11 +265,7 @@ def test_create_dns_trace_test_error_400(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -360,11 +352,7 @@ def test_create_dns_trace_test_error_401(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -439,11 +427,7 @@ def test_create_dns_trace_test_error_403(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -521,11 +505,7 @@ def test_create_dns_trace_test_error_404(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -603,11 +583,7 @@ def test_create_dns_trace_test_error_429(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -685,11 +661,7 @@ def test_create_dns_trace_test_error_500(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -767,11 +739,7 @@ def test_create_dns_trace_test_error_502(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -1645,11 +1613,7 @@ def test_update_dns_trace_test_happy_path(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -1855,11 +1819,7 @@ def test_update_dns_trace_test_error_400(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -1949,11 +1909,7 @@ def test_update_dns_trace_test_error_401(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -2031,11 +1987,7 @@ def test_update_dns_trace_test_error_403(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -2116,11 +2068,7 @@ def test_update_dns_trace_test_error_404(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -2201,11 +2149,7 @@ def test_update_dns_trace_test_error_429(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -2286,11 +2230,7 @@ def test_update_dns_trace_test_error_500(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -2371,11 +2311,7 @@ def test_update_dns_trace_test_error_502(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", diff --git a/thousandeyes-sdk-tests/test/test_dnssec_tests_api.py b/thousandeyes-sdk-tests/test/test_dnssec_tests_api.py index 60b907bb3..33707c26b 100644 --- a/thousandeyes-sdk-tests/test/test_dnssec_tests_api.py +++ b/thousandeyes-sdk-tests/test/test_dnssec_tests_api.py @@ -59,11 +59,7 @@ def test_create_dns_sec_test_models_validation(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -83,6 +79,7 @@ def test_create_dns_sec_test_models_validation(self) -> None: request_from_json = thousandeyes_sdk.tests.models.DnsSecTestRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "dnsQueryClass" : "in", @@ -222,14 +219,17 @@ def test_create_dns_sec_test_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.DnsSecTestResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_delete_dns_sec_test_models_validation(self) -> None: """Test case for delete_dns_sec_test request and response models""" + def test_get_dns_sec_test_models_validation(self) -> None: """Test case for get_dns_sec_test request and response models""" + response_body_json = """ { "dnsQueryClass" : "in", @@ -369,10 +369,12 @@ def test_get_dns_sec_test_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.DnsSecTestResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_dns_sec_tests_models_validation(self) -> None: """Test case for get_dns_sec_tests request and response models""" + response_body_json = """ { "tests" : [ { @@ -461,6 +463,7 @@ def test_get_dns_sec_tests_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.DnsSecTests.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_update_dns_sec_test_models_validation(self) -> None: """Test case for update_dns_sec_test request and response models""" @@ -493,11 +496,7 @@ def test_update_dns_sec_test_models_validation(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -517,6 +516,7 @@ def test_update_dns_sec_test_models_validation(self) -> None: request_from_json = thousandeyes_sdk.tests.models.DnsSecTestRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "dnsQueryClass" : "in", @@ -656,6 +656,7 @@ def test_update_dns_sec_test_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.DnsSecTestResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-tests/test/test_dnssec_tests_api_integration.py b/thousandeyes-sdk-tests/test/test_dnssec_tests_api_integration.py index 550853dc6..02c833e39 100644 --- a/thousandeyes-sdk-tests/test/test_dnssec_tests_api_integration.py +++ b/thousandeyes-sdk-tests/test/test_dnssec_tests_api_integration.py @@ -61,11 +61,7 @@ def test_create_dns_sec_test_happy_path(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -266,11 +262,7 @@ def test_create_dns_sec_test_error_400(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -356,11 +348,7 @@ def test_create_dns_sec_test_error_401(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -434,11 +422,7 @@ def test_create_dns_sec_test_error_403(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -515,11 +499,7 @@ def test_create_dns_sec_test_error_404(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -596,11 +576,7 @@ def test_create_dns_sec_test_error_429(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -677,11 +653,7 @@ def test_create_dns_sec_test_error_500(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -758,11 +730,7 @@ def test_create_dns_sec_test_error_502(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -1632,11 +1600,7 @@ def test_update_dns_sec_test_happy_path(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -1840,11 +1804,7 @@ def test_update_dns_sec_test_error_400(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -1933,11 +1893,7 @@ def test_update_dns_sec_test_error_401(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -2014,11 +1970,7 @@ def test_update_dns_sec_test_error_403(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -2098,11 +2050,7 @@ def test_update_dns_sec_test_error_404(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -2182,11 +2130,7 @@ def test_update_dns_sec_test_error_429(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -2266,11 +2210,7 @@ def test_update_dns_sec_test_error_500(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -2350,11 +2290,7 @@ def test_update_dns_sec_test_error_502(self) -> None: "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", diff --git a/thousandeyes-sdk-tests/test/test_ftp_server_tests_api.py b/thousandeyes-sdk-tests/test/test_ftp_server_tests_api.py index 5cdf89a02..4d5736ea5 100644 --- a/thousandeyes-sdk-tests/test/test_ftp_server_tests_api.py +++ b/thousandeyes-sdk-tests/test/test_ftp_server_tests_api.py @@ -80,9 +80,6 @@ def test_create_ftp_server_test_models_validation(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -102,6 +99,7 @@ def test_create_ftp_server_test_models_validation(self) -> None: request_from_json = thousandeyes_sdk.tests.models.FtpServerTestRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "mtuMeasurements" : false, @@ -274,14 +272,17 @@ def test_create_ftp_server_test_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.FtpServerTestResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_delete_ftp_server_test_models_validation(self) -> None: """Test case for delete_ftp_server_test request and response models""" + def test_get_ftp_server_test_models_validation(self) -> None: """Test case for get_ftp_server_test request and response models""" + response_body_json = """ { "mtuMeasurements" : false, @@ -454,10 +455,12 @@ def test_get_ftp_server_test_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.FtpServerTestResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_ftp_server_tests_models_validation(self) -> None: """Test case for get_ftp_server_tests request and response models""" + response_body_json = """ { "tests" : [ { @@ -582,6 +585,7 @@ def test_get_ftp_server_tests_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.FtpServerTests.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_update_ftp_server_test_models_validation(self) -> None: """Test case for update_ftp_server_test request and response models""" @@ -635,9 +639,6 @@ def test_update_ftp_server_test_models_validation(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -657,6 +658,7 @@ def test_update_ftp_server_test_models_validation(self) -> None: request_from_json = thousandeyes_sdk.tests.models.FtpServerTestRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "mtuMeasurements" : false, @@ -829,6 +831,7 @@ def test_update_ftp_server_test_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.FtpServerTestResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-tests/test/test_ftp_server_tests_api_integration.py b/thousandeyes-sdk-tests/test/test_ftp_server_tests_api_integration.py index 2345ffe85..c0c5dd655 100644 --- a/thousandeyes-sdk-tests/test/test_ftp_server_tests_api_integration.py +++ b/thousandeyes-sdk-tests/test/test_ftp_server_tests_api_integration.py @@ -82,9 +82,6 @@ def test_create_ftp_server_test_happy_path(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -339,9 +336,6 @@ def test_create_ftp_server_test_error_400(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -448,9 +442,6 @@ def test_create_ftp_server_test_error_401(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -545,9 +536,6 @@ def test_create_ftp_server_test_error_403(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -645,9 +633,6 @@ def test_create_ftp_server_test_error_404(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -745,9 +730,6 @@ def test_create_ftp_server_test_error_429(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -845,9 +827,6 @@ def test_create_ftp_server_test_error_500(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -945,9 +924,6 @@ def test_create_ftp_server_test_error_502(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -1879,9 +1855,6 @@ def test_update_ftp_server_test_happy_path(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -2139,9 +2112,6 @@ def test_update_ftp_server_test_error_400(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -2251,9 +2221,6 @@ def test_update_ftp_server_test_error_401(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -2351,9 +2318,6 @@ def test_update_ftp_server_test_error_403(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -2454,9 +2418,6 @@ def test_update_ftp_server_test_error_404(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -2557,9 +2518,6 @@ def test_update_ftp_server_test_error_429(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -2660,9 +2618,6 @@ def test_update_ftp_server_test_error_500(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -2763,9 +2718,6 @@ def test_update_ftp_server_test_error_502(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", diff --git a/thousandeyes-sdk-tests/test/test_http_server_tests_api.py b/thousandeyes-sdk-tests/test/test_http_server_tests_api.py index 8a098faec..ba919767e 100644 --- a/thousandeyes-sdk-tests/test/test_http_server_tests_api.py +++ b/thousandeyes-sdk-tests/test/test_http_server_tests_api.py @@ -73,10 +73,6 @@ def test_create_http_server_test_models_validation(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "randomizedStartTime" : false, @@ -134,9 +130,6 @@ def test_create_http_server_test_models_validation(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "postBody" : "{ \\"example\\" : \\"value\\"}", @@ -153,6 +146,7 @@ def test_create_http_server_test_models_validation(self) -> None: request_from_json = thousandeyes_sdk.tests.models.HttpServerTestRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "clientCertificate" : "-----BEGIN PRIVATE KEY-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END PRIVATE KEY-----\\n-----BEGIN CERTIFICATE-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END CERTIFICATE-----\\n", @@ -196,10 +190,6 @@ def test_create_http_server_test_models_validation(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ { "labelId" : "961", "name" : "Artem label", @@ -376,14 +366,17 @@ def test_create_http_server_test_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.HttpServerTestResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_delete_http_server_test_models_validation(self) -> None: """Test case for delete_http_server_test request and response models""" + def test_get_http_server_test_models_validation(self) -> None: """Test case for get_http_server_test request and response models""" + response_body_json = """ { "clientCertificate" : "-----BEGIN PRIVATE KEY-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END PRIVATE KEY-----\\n-----BEGIN CERTIFICATE-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END CERTIFICATE-----\\n", @@ -427,10 +420,6 @@ def test_get_http_server_test_models_validation(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ { "labelId" : "961", "name" : "Artem label", @@ -607,10 +596,12 @@ def test_get_http_server_test_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.HttpServerTestResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_http_server_tests_models_validation(self) -> None: """Test case for get_http_server_tests request and response models""" + response_body_json = """ { "tests" : [ { @@ -655,10 +646,6 @@ def test_get_http_server_tests_models_validation(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "randomizedStartTime" : false, "modifiedDate" : "2022-07-17T22:00:54Z", "interval" : 60, @@ -758,10 +745,6 @@ def test_get_http_server_tests_models_validation(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "randomizedStartTime" : false, "modifiedDate" : "2022-07-17T22:00:54Z", "interval" : 60, @@ -837,6 +820,7 @@ def test_get_http_server_tests_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.HttpServerTests.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_update_http_server_test_models_validation(self) -> None: """Test case for update_http_server_test request and response models""" @@ -883,10 +867,6 @@ def test_update_http_server_test_models_validation(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "randomizedStartTime" : false, @@ -944,9 +924,6 @@ def test_update_http_server_test_models_validation(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "postBody" : "{ \\"example\\" : \\"value\\"}", @@ -963,6 +940,7 @@ def test_update_http_server_test_models_validation(self) -> None: request_from_json = thousandeyes_sdk.tests.models.HttpServerTestRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "clientCertificate" : "-----BEGIN PRIVATE KEY-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END PRIVATE KEY-----\\n-----BEGIN CERTIFICATE-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END CERTIFICATE-----\\n", @@ -1006,10 +984,6 @@ def test_update_http_server_test_models_validation(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ { "labelId" : "961", "name" : "Artem label", @@ -1186,6 +1160,7 @@ def test_update_http_server_test_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.HttpServerTestResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-tests/test/test_http_server_tests_api_integration.py b/thousandeyes-sdk-tests/test/test_http_server_tests_api_integration.py index 85f47509e..6082f44fd 100644 --- a/thousandeyes-sdk-tests/test/test_http_server_tests_api_integration.py +++ b/thousandeyes-sdk-tests/test/test_http_server_tests_api_integration.py @@ -75,10 +75,6 @@ def test_create_http_server_test_happy_path(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "randomizedStartTime" : false, @@ -136,9 +132,6 @@ def test_create_http_server_test_happy_path(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "postBody" : "{ \\"example\\" : \\"value\\"}", @@ -197,10 +190,6 @@ def test_create_http_server_test_happy_path(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ { "labelId" : "961", "name" : "Artem label", @@ -434,10 +423,6 @@ def test_create_http_server_test_error_400(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "randomizedStartTime" : false, @@ -495,9 +480,6 @@ def test_create_http_server_test_error_400(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "postBody" : "{ \\"example\\" : \\"value\\"}", @@ -594,10 +576,6 @@ def test_create_http_server_test_error_401(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "randomizedStartTime" : false, @@ -655,9 +633,6 @@ def test_create_http_server_test_error_401(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "postBody" : "{ \\"example\\" : \\"value\\"}", @@ -742,10 +717,6 @@ def test_create_http_server_test_error_403(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "randomizedStartTime" : false, @@ -803,9 +774,6 @@ def test_create_http_server_test_error_403(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "postBody" : "{ \\"example\\" : \\"value\\"}", @@ -893,10 +861,6 @@ def test_create_http_server_test_error_404(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "randomizedStartTime" : false, @@ -954,9 +918,6 @@ def test_create_http_server_test_error_404(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "postBody" : "{ \\"example\\" : \\"value\\"}", @@ -1044,10 +1005,6 @@ def test_create_http_server_test_error_429(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "randomizedStartTime" : false, @@ -1105,9 +1062,6 @@ def test_create_http_server_test_error_429(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "postBody" : "{ \\"example\\" : \\"value\\"}", @@ -1195,10 +1149,6 @@ def test_create_http_server_test_error_500(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "randomizedStartTime" : false, @@ -1256,9 +1206,6 @@ def test_create_http_server_test_error_500(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "postBody" : "{ \\"example\\" : \\"value\\"}", @@ -1346,10 +1293,6 @@ def test_create_http_server_test_error_502(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "randomizedStartTime" : false, @@ -1407,9 +1350,6 @@ def test_create_http_server_test_error_502(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "postBody" : "{ \\"example\\" : \\"value\\"}", @@ -1685,10 +1625,6 @@ def test_get_http_server_test_happy_path(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ { "labelId" : "961", "name" : "Artem label", @@ -2128,10 +2064,6 @@ def test_get_http_server_tests_happy_path(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "randomizedStartTime" : false, "modifiedDate" : "2022-07-17T22:00:54Z", "interval" : 60, @@ -2231,10 +2163,6 @@ def test_get_http_server_tests_happy_path(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "randomizedStartTime" : false, "modifiedDate" : "2022-07-17T22:00:54Z", "interval" : 60, @@ -2512,10 +2440,6 @@ def test_update_http_server_test_happy_path(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "randomizedStartTime" : false, @@ -2573,9 +2497,6 @@ def test_update_http_server_test_happy_path(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "postBody" : "{ \\"example\\" : \\"value\\"}", @@ -2635,10 +2556,6 @@ def test_update_http_server_test_happy_path(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ { "labelId" : "961", "name" : "Artem label", @@ -2874,10 +2791,6 @@ def test_update_http_server_test_error_400(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "randomizedStartTime" : false, @@ -2935,9 +2848,6 @@ def test_update_http_server_test_error_400(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "postBody" : "{ \\"example\\" : \\"value\\"}", @@ -3037,10 +2947,6 @@ def test_update_http_server_test_error_401(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "randomizedStartTime" : false, @@ -3098,9 +3004,6 @@ def test_update_http_server_test_error_401(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "postBody" : "{ \\"example\\" : \\"value\\"}", @@ -3188,10 +3091,6 @@ def test_update_http_server_test_error_403(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "randomizedStartTime" : false, @@ -3249,9 +3148,6 @@ def test_update_http_server_test_error_403(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "postBody" : "{ \\"example\\" : \\"value\\"}", @@ -3342,10 +3238,6 @@ def test_update_http_server_test_error_404(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "randomizedStartTime" : false, @@ -3403,9 +3295,6 @@ def test_update_http_server_test_error_404(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "postBody" : "{ \\"example\\" : \\"value\\"}", @@ -3496,10 +3385,6 @@ def test_update_http_server_test_error_429(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "randomizedStartTime" : false, @@ -3557,9 +3442,6 @@ def test_update_http_server_test_error_429(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "postBody" : "{ \\"example\\" : \\"value\\"}", @@ -3650,10 +3532,6 @@ def test_update_http_server_test_error_500(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "randomizedStartTime" : false, @@ -3711,9 +3589,6 @@ def test_update_http_server_test_error_500(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "postBody" : "{ \\"example\\" : \\"value\\"}", @@ -3804,10 +3679,6 @@ def test_update_http_server_test_error_502(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "randomizedStartTime" : false, @@ -3865,9 +3736,6 @@ def test_update_http_server_test_error_502(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "postBody" : "{ \\"example\\" : \\"value\\"}", diff --git a/thousandeyes-sdk-tests/test/test_page_load_tests_api.py b/thousandeyes-sdk-tests/test/test_page_load_tests_api.py index e12d68165..bda417220 100644 --- a/thousandeyes-sdk-tests/test/test_page_load_tests_api.py +++ b/thousandeyes-sdk-tests/test/test_page_load_tests_api.py @@ -77,10 +77,6 @@ def test_create_page_load_test_models_validation(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "httpInterval" : 120, @@ -141,11 +137,7 @@ def test_create_page_load_test_models_validation(self) -> None: "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "disableScreenshot" : false, @@ -164,6 +156,7 @@ def test_create_page_load_test_models_validation(self) -> None: request_from_json = thousandeyes_sdk.tests.models.PageLoadTestRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "clientCertificate" : "-----BEGIN PRIVATE KEY-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END PRIVATE KEY-----\\n-----BEGIN CERTIFICATE-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END CERTIFICATE-----\\n", @@ -211,10 +204,6 @@ def test_create_page_load_test_models_validation(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ { "labelId" : "961", "name" : "Artem label", @@ -398,14 +387,17 @@ def test_create_page_load_test_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.PageLoadTestResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_delete_page_load_test_models_validation(self) -> None: """Test case for delete_page_load_test request and response models""" + def test_get_page_load_test_models_validation(self) -> None: """Test case for get_page_load_test request and response models""" + response_body_json = """ { "clientCertificate" : "-----BEGIN PRIVATE KEY-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END PRIVATE KEY-----\\n-----BEGIN CERTIFICATE-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END CERTIFICATE-----\\n", @@ -453,10 +445,6 @@ def test_get_page_load_test_models_validation(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ { "labelId" : "961", "name" : "Artem label", @@ -640,10 +628,12 @@ def test_get_page_load_test_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.PageLoadTestResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_page_load_tests_models_validation(self) -> None: """Test case for get_page_load_tests request and response models""" + response_body_json = """ { "tests" : [ { @@ -692,10 +682,6 @@ def test_get_page_load_tests_models_validation(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "httpInterval" : 120, "randomizedStartTime" : false, "modifiedDate" : "2022-07-17T22:00:54Z", @@ -806,10 +792,6 @@ def test_get_page_load_tests_models_validation(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "httpInterval" : 120, "randomizedStartTime" : false, "modifiedDate" : "2022-07-17T22:00:54Z", @@ -892,6 +874,7 @@ def test_get_page_load_tests_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.PageLoadTests.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_update_page_load_test_models_validation(self) -> None: """Test case for update_page_load_test request and response models""" @@ -942,10 +925,6 @@ def test_update_page_load_test_models_validation(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "httpInterval" : 120, @@ -1006,11 +985,7 @@ def test_update_page_load_test_models_validation(self) -> None: "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "disableScreenshot" : false, @@ -1029,6 +1004,7 @@ def test_update_page_load_test_models_validation(self) -> None: request_from_json = thousandeyes_sdk.tests.models.PageLoadTestRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "clientCertificate" : "-----BEGIN PRIVATE KEY-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END PRIVATE KEY-----\\n-----BEGIN CERTIFICATE-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END CERTIFICATE-----\\n", @@ -1076,10 +1052,6 @@ def test_update_page_load_test_models_validation(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ { "labelId" : "961", "name" : "Artem label", @@ -1263,6 +1235,7 @@ def test_update_page_load_test_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.PageLoadTestResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-tests/test/test_page_load_tests_api_integration.py b/thousandeyes-sdk-tests/test/test_page_load_tests_api_integration.py index 389d6121d..e1fb22cf0 100644 --- a/thousandeyes-sdk-tests/test/test_page_load_tests_api_integration.py +++ b/thousandeyes-sdk-tests/test/test_page_load_tests_api_integration.py @@ -79,10 +79,6 @@ def test_create_page_load_test_happy_path(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "httpInterval" : 120, @@ -143,11 +139,7 @@ def test_create_page_load_test_happy_path(self) -> None: "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "disableScreenshot" : false, @@ -212,10 +204,6 @@ def test_create_page_load_test_happy_path(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ { "labelId" : "961", "name" : "Artem label", @@ -460,10 +448,6 @@ def test_create_page_load_test_error_400(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "httpInterval" : 120, @@ -524,11 +508,7 @@ def test_create_page_load_test_error_400(self) -> None: "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "disableScreenshot" : false, @@ -631,10 +611,6 @@ def test_create_page_load_test_error_401(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "httpInterval" : 120, @@ -695,11 +671,7 @@ def test_create_page_load_test_error_401(self) -> None: "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "disableScreenshot" : false, @@ -790,10 +762,6 @@ def test_create_page_load_test_error_403(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "httpInterval" : 120, @@ -854,11 +822,7 @@ def test_create_page_load_test_error_403(self) -> None: "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "disableScreenshot" : false, @@ -952,10 +916,6 @@ def test_create_page_load_test_error_404(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "httpInterval" : 120, @@ -1016,11 +976,7 @@ def test_create_page_load_test_error_404(self) -> None: "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "disableScreenshot" : false, @@ -1114,10 +1070,6 @@ def test_create_page_load_test_error_429(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "httpInterval" : 120, @@ -1178,11 +1130,7 @@ def test_create_page_load_test_error_429(self) -> None: "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "disableScreenshot" : false, @@ -1276,10 +1224,6 @@ def test_create_page_load_test_error_500(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "httpInterval" : 120, @@ -1340,11 +1284,7 @@ def test_create_page_load_test_error_500(self) -> None: "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "disableScreenshot" : false, @@ -1438,10 +1378,6 @@ def test_create_page_load_test_error_502(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "httpInterval" : 120, @@ -1502,11 +1438,7 @@ def test_create_page_load_test_error_502(self) -> None: "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "disableScreenshot" : false, @@ -1788,10 +1720,6 @@ def test_get_page_load_test_happy_path(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ { "labelId" : "961", "name" : "Artem label", @@ -2242,10 +2170,6 @@ def test_get_page_load_tests_happy_path(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "httpInterval" : 120, "randomizedStartTime" : false, "modifiedDate" : "2022-07-17T22:00:54Z", @@ -2356,10 +2280,6 @@ def test_get_page_load_tests_happy_path(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "httpInterval" : 120, "randomizedStartTime" : false, "modifiedDate" : "2022-07-17T22:00:54Z", @@ -2648,10 +2568,6 @@ def test_update_page_load_test_happy_path(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "httpInterval" : 120, @@ -2712,11 +2628,7 @@ def test_update_page_load_test_happy_path(self) -> None: "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "disableScreenshot" : false, @@ -2782,10 +2694,6 @@ def test_update_page_load_test_happy_path(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ { "labelId" : "961", "name" : "Artem label", @@ -3032,10 +2940,6 @@ def test_update_page_load_test_error_400(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "httpInterval" : 120, @@ -3096,11 +3000,7 @@ def test_update_page_load_test_error_400(self) -> None: "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "disableScreenshot" : false, @@ -3206,10 +3106,6 @@ def test_update_page_load_test_error_401(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "httpInterval" : 120, @@ -3270,11 +3166,7 @@ def test_update_page_load_test_error_401(self) -> None: "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "disableScreenshot" : false, @@ -3368,10 +3260,6 @@ def test_update_page_load_test_error_403(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "httpInterval" : 120, @@ -3432,11 +3320,7 @@ def test_update_page_load_test_error_403(self) -> None: "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "disableScreenshot" : false, @@ -3533,10 +3417,6 @@ def test_update_page_load_test_error_404(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "httpInterval" : 120, @@ -3597,11 +3477,7 @@ def test_update_page_load_test_error_404(self) -> None: "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "disableScreenshot" : false, @@ -3698,10 +3574,6 @@ def test_update_page_load_test_error_429(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "httpInterval" : 120, @@ -3762,11 +3634,7 @@ def test_update_page_load_test_error_429(self) -> None: "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "disableScreenshot" : false, @@ -3863,10 +3731,6 @@ def test_update_page_load_test_error_500(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "httpInterval" : 120, @@ -3927,11 +3791,7 @@ def test_update_page_load_test_error_500(self) -> None: "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "disableScreenshot" : false, @@ -4028,10 +3888,6 @@ def test_update_page_load_test_error_502(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "httpInterval" : 120, @@ -4092,11 +3948,7 @@ def test_update_page_load_test_error_502(self) -> None: "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "createdDate" : "2022-07-17T22:00:54Z", "disableScreenshot" : false, diff --git a/thousandeyes-sdk-tests/test/test_path_visualization_interface_groups_api.py b/thousandeyes-sdk-tests/test/test_path_visualization_interface_groups_api.py index 13b35f164..5ad286732 100644 --- a/thousandeyes-sdk-tests/test/test_path_visualization_interface_groups_api.py +++ b/thousandeyes-sdk-tests/test/test_path_visualization_interface_groups_api.py @@ -44,6 +44,7 @@ def test_create_path_vis_interface_groups_models_validation(self) -> None: request_from_json = thousandeyes_sdk.tests.models.InterfaceGroup.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "groupName" : "PathVis Interface Group", @@ -56,14 +57,17 @@ def test_create_path_vis_interface_groups_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.InterfaceGroup.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_delete_path_vis_interface_group_models_validation(self) -> None: """Test case for delete_path_vis_interface_group request and response models""" + def test_get_path_vis_interface_groups_models_validation(self) -> None: """Test case for get_path_vis_interface_groups request and response models""" + response_body_json = """ { "pathVisInterfaceGroups" : [ { @@ -96,6 +100,7 @@ def test_get_path_vis_interface_groups_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.InterfaceGroups.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_update_path_vis_interface_group_models_validation(self) -> None: """Test case for update_path_vis_interface_group request and response models""" @@ -113,6 +118,7 @@ def test_update_path_vis_interface_group_models_validation(self) -> None: request_from_json = thousandeyes_sdk.tests.models.InterfaceGroup.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "groupName" : "PathVis Interface Group", @@ -125,6 +131,7 @@ def test_update_path_vis_interface_group_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.InterfaceGroup.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-tests/test/test_sip_server_tests_api.py b/thousandeyes-sdk-tests/test/test_sip_server_tests_api.py index 265ed03d5..a26383216 100644 --- a/thousandeyes-sdk-tests/test/test_sip_server_tests_api.py +++ b/thousandeyes-sdk-tests/test/test_sip_server_tests_api.py @@ -83,9 +83,6 @@ def test_create_sip_server_test_models_validation(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -103,6 +100,7 @@ def test_create_sip_server_test_models_validation(self) -> None: request_from_json = thousandeyes_sdk.tests.models.SipServerTestRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "mtuMeasurements" : false, @@ -274,14 +272,17 @@ def test_create_sip_server_test_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.SipServerTestResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_delete_sip_server_test_models_validation(self) -> None: """Test case for delete_sip_server_test request and response models""" + def test_get_sip_server_test_models_validation(self) -> None: """Test case for get_sip_server_test request and response models""" + response_body_json = """ { "mtuMeasurements" : false, @@ -453,10 +454,12 @@ def test_get_sip_server_test_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.SipServerTestResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_sip_server_tests_models_validation(self) -> None: """Test case for get_sip_server_tests request and response models""" + response_body_json = """ { "tests" : [ { @@ -579,6 +582,7 @@ def test_get_sip_server_tests_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.SipServerTests.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_update_sip_server_test_models_validation(self) -> None: """Test case for update_sip_server_test request and response models""" @@ -635,9 +639,6 @@ def test_update_sip_server_test_models_validation(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -655,6 +656,7 @@ def test_update_sip_server_test_models_validation(self) -> None: request_from_json = thousandeyes_sdk.tests.models.SipServerTestRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "mtuMeasurements" : false, @@ -826,6 +828,7 @@ def test_update_sip_server_test_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.SipServerTestResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-tests/test/test_sip_server_tests_api_integration.py b/thousandeyes-sdk-tests/test/test_sip_server_tests_api_integration.py index b56eb67af..d4ddb9a44 100644 --- a/thousandeyes-sdk-tests/test/test_sip_server_tests_api_integration.py +++ b/thousandeyes-sdk-tests/test/test_sip_server_tests_api_integration.py @@ -85,9 +85,6 @@ def test_create_sip_server_test_happy_path(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -342,9 +339,6 @@ def test_create_sip_server_test_error_400(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -452,9 +446,6 @@ def test_create_sip_server_test_error_401(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -550,9 +541,6 @@ def test_create_sip_server_test_error_403(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -651,9 +639,6 @@ def test_create_sip_server_test_error_404(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -752,9 +737,6 @@ def test_create_sip_server_test_error_429(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -853,9 +835,6 @@ def test_create_sip_server_test_error_500(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -954,9 +933,6 @@ def test_create_sip_server_test_error_502(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -1886,9 +1862,6 @@ def test_update_sip_server_test_happy_path(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -2146,9 +2119,6 @@ def test_update_sip_server_test_error_400(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -2259,9 +2229,6 @@ def test_update_sip_server_test_error_401(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -2360,9 +2327,6 @@ def test_update_sip_server_test_error_403(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -2464,9 +2428,6 @@ def test_update_sip_server_test_error_404(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -2568,9 +2529,6 @@ def test_update_sip_server_test_error_429(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -2672,9 +2630,6 @@ def test_update_sip_server_test_error_500(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", @@ -2776,9 +2731,6 @@ def test_update_sip_server_test_error_502(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", diff --git a/thousandeyes-sdk-tests/test/test_tests_api.py b/thousandeyes-sdk-tests/test/test_tests_api.py index b235926d3..8a34c4200 100644 --- a/thousandeyes-sdk-tests/test/test_tests_api.py +++ b/thousandeyes-sdk-tests/test/test_tests_api.py @@ -31,6 +31,7 @@ def tearDown(self) -> None: def test_get_test_version_history_models_validation(self) -> None: """Test case for get_test_version_history request and response models""" + response_body_json = """ { "_links" : { @@ -61,10 +62,12 @@ def test_get_test_version_history_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.TestVersionHistoryResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_tests_models_validation(self) -> None: """Test case for get_tests request and response models""" + response_body_json = """ { "tests" : [ { @@ -147,6 +150,7 @@ def test_get_tests_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.Tests.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-tests/test/test_voice_tests_api.py b/thousandeyes-sdk-tests/test/test_voice_tests_api.py index 925329c02..dd5e62036 100644 --- a/thousandeyes-sdk-tests/test/test_voice_tests_api.py +++ b/thousandeyes-sdk-tests/test/test_voice_tests_api.py @@ -70,9 +70,6 @@ def test_create_voice_test_models_validation(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "codec" : "G.711 @ 64 Kbps", "codecId" : "0", @@ -93,6 +90,7 @@ def test_create_voice_test_models_validation(self) -> None: request_from_json = thousandeyes_sdk.tests.models.VoiceTestRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "_links" : { @@ -256,14 +254,17 @@ def test_create_voice_test_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.VoiceTestResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_delete_voice_test_models_validation(self) -> None: """Test case for delete_voice_test request and response models""" + def test_get_voice_test_models_validation(self) -> None: """Test case for get_voice_test request and response models""" + response_body_json = """ { "_links" : { @@ -427,10 +428,12 @@ def test_get_voice_test_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.VoiceTestResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_voice_tests_models_validation(self) -> None: """Test case for get_voice_tests request and response models""" + response_body_json = """ { "tests" : [ { @@ -537,6 +540,7 @@ def test_get_voice_tests_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.VoiceTests.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_update_voice_test_models_validation(self) -> None: """Test case for update_voice_test request and response models""" @@ -580,9 +584,6 @@ def test_update_voice_test_models_validation(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "codec" : "G.711 @ 64 Kbps", "codecId" : "0", @@ -603,6 +604,7 @@ def test_update_voice_test_models_validation(self) -> None: request_from_json = thousandeyes_sdk.tests.models.VoiceTestRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "_links" : { @@ -766,6 +768,7 @@ def test_update_voice_test_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.VoiceTestResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-tests/test/test_voice_tests_api_integration.py b/thousandeyes-sdk-tests/test/test_voice_tests_api_integration.py index 322ab114f..2533bfdef 100644 --- a/thousandeyes-sdk-tests/test/test_voice_tests_api_integration.py +++ b/thousandeyes-sdk-tests/test/test_voice_tests_api_integration.py @@ -72,9 +72,6 @@ def test_create_voice_test_happy_path(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "codec" : "G.711 @ 64 Kbps", "codecId" : "0", @@ -311,9 +308,6 @@ def test_create_voice_test_error_400(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "codec" : "G.711 @ 64 Kbps", "codecId" : "0", @@ -411,9 +405,6 @@ def test_create_voice_test_error_401(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "codec" : "G.711 @ 64 Kbps", "codecId" : "0", @@ -499,9 +490,6 @@ def test_create_voice_test_error_403(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "codec" : "G.711 @ 64 Kbps", "codecId" : "0", @@ -590,9 +578,6 @@ def test_create_voice_test_error_404(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "codec" : "G.711 @ 64 Kbps", "codecId" : "0", @@ -681,9 +666,6 @@ def test_create_voice_test_error_429(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "codec" : "G.711 @ 64 Kbps", "codecId" : "0", @@ -772,9 +754,6 @@ def test_create_voice_test_error_500(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "codec" : "G.711 @ 64 Kbps", "codecId" : "0", @@ -863,9 +842,6 @@ def test_create_voice_test_error_502(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "codec" : "G.711 @ 64 Kbps", "codecId" : "0", @@ -1789,9 +1765,6 @@ def test_update_voice_test_happy_path(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "codec" : "G.711 @ 64 Kbps", "codecId" : "0", @@ -2031,9 +2004,6 @@ def test_update_voice_test_error_400(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "codec" : "G.711 @ 64 Kbps", "codecId" : "0", @@ -2134,9 +2104,6 @@ def test_update_voice_test_error_401(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "codec" : "G.711 @ 64 Kbps", "codecId" : "0", @@ -2225,9 +2192,6 @@ def test_update_voice_test_error_403(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "codec" : "G.711 @ 64 Kbps", "codecId" : "0", @@ -2319,9 +2283,6 @@ def test_update_voice_test_error_404(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "codec" : "G.711 @ 64 Kbps", "codecId" : "0", @@ -2413,9 +2374,6 @@ def test_update_voice_test_error_429(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "codec" : "G.711 @ 64 Kbps", "codecId" : "0", @@ -2507,9 +2465,6 @@ def test_update_voice_test_error_500(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "codec" : "G.711 @ 64 Kbps", "codecId" : "0", @@ -2601,9 +2556,6 @@ def test_update_voice_test_error_502(self) -> None: "agents" : [ { "agentId" : "125", "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" } ], "codec" : "G.711 @ 64 Kbps", "codecId" : "0", diff --git a/thousandeyes-sdk-tests/test/test_web_transaction_tests_api.py b/thousandeyes-sdk-tests/test/test_web_transaction_tests_api.py index 22fe8bd98..a5c18d53a 100644 --- a/thousandeyes-sdk-tests/test/test_web_transaction_tests_api.py +++ b/thousandeyes-sdk-tests/test/test_web_transaction_tests_api.py @@ -77,10 +77,6 @@ def test_create_web_transactions_test_models_validation(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "randomizedStartTime" : false, @@ -140,11 +136,7 @@ def test_create_web_transactions_test_models_validation(self) -> None: "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 30, "createdDate" : "2022-07-17T22:00:54Z", @@ -166,6 +158,7 @@ def test_create_web_transactions_test_models_validation(self) -> None: request_from_json = thousandeyes_sdk.tests.models.WebTransactionTestRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "clientCertificate" : "-----BEGIN PRIVATE KEY-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END PRIVATE KEY-----\\n-----BEGIN CERTIFICATE-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END CERTIFICATE-----\\n", @@ -213,10 +206,6 @@ def test_create_web_transactions_test_models_validation(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ { "labelId" : "961", "name" : "Artem label", @@ -402,14 +391,17 @@ def test_create_web_transactions_test_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.WebTransactionTestResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_delete_web_transactions_test_models_validation(self) -> None: """Test case for delete_web_transactions_test request and response models""" + def test_get_web_transactions_test_models_validation(self) -> None: """Test case for get_web_transactions_test request and response models""" + response_body_json = """ { "clientCertificate" : "-----BEGIN PRIVATE KEY-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END PRIVATE KEY-----\\n-----BEGIN CERTIFICATE-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END CERTIFICATE-----\\n", @@ -457,10 +449,6 @@ def test_get_web_transactions_test_models_validation(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ { "labelId" : "961", "name" : "Artem label", @@ -646,10 +634,12 @@ def test_get_web_transactions_test_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.WebTransactionTestResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_web_transactions_tests_models_validation(self) -> None: """Test case for get_web_transactions_tests request and response models""" + response_body_json = """ { "tests" : [ { @@ -698,10 +688,6 @@ def test_get_web_transactions_tests_models_validation(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "randomizedStartTime" : false, "modifiedDate" : "2022-07-17T22:00:54Z", "interval" : 60, @@ -813,10 +799,6 @@ def test_get_web_transactions_tests_models_validation(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "randomizedStartTime" : false, "modifiedDate" : "2022-07-17T22:00:54Z", "interval" : 60, @@ -900,6 +882,7 @@ def test_get_web_transactions_tests_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.WebTransactionTests.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_update_web_transactions_test_models_validation(self) -> None: """Test case for update_web_transactions_test request and response models""" @@ -950,10 +933,6 @@ def test_update_web_transactions_test_models_validation(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "randomizedStartTime" : false, @@ -1013,11 +992,7 @@ def test_update_web_transactions_test_models_validation(self) -> None: "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 30, "createdDate" : "2022-07-17T22:00:54Z", @@ -1039,6 +1014,7 @@ def test_update_web_transactions_test_models_validation(self) -> None: request_from_json = thousandeyes_sdk.tests.models.WebTransactionTestRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "clientCertificate" : "-----BEGIN PRIVATE KEY-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END PRIVATE KEY-----\\n-----BEGIN CERTIFICATE-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END CERTIFICATE-----\\n", @@ -1086,10 +1062,6 @@ def test_update_web_transactions_test_models_validation(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ { "labelId" : "961", "name" : "Artem label", @@ -1275,6 +1247,7 @@ def test_update_web_transactions_test_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.tests.models.WebTransactionTestResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-tests/test/test_web_transaction_tests_api_integration.py b/thousandeyes-sdk-tests/test/test_web_transaction_tests_api_integration.py index 84d352a90..e049d3db3 100644 --- a/thousandeyes-sdk-tests/test/test_web_transaction_tests_api_integration.py +++ b/thousandeyes-sdk-tests/test/test_web_transaction_tests_api_integration.py @@ -79,10 +79,6 @@ def test_create_web_transactions_test_happy_path(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "randomizedStartTime" : false, @@ -142,11 +138,7 @@ def test_create_web_transactions_test_happy_path(self) -> None: "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 30, "createdDate" : "2022-07-17T22:00:54Z", @@ -214,10 +206,6 @@ def test_create_web_transactions_test_happy_path(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ { "labelId" : "961", "name" : "Artem label", @@ -464,10 +452,6 @@ def test_create_web_transactions_test_error_400(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "randomizedStartTime" : false, @@ -527,11 +511,7 @@ def test_create_web_transactions_test_error_400(self) -> None: "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 30, "createdDate" : "2022-07-17T22:00:54Z", @@ -637,10 +617,6 @@ def test_create_web_transactions_test_error_401(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "randomizedStartTime" : false, @@ -700,11 +676,7 @@ def test_create_web_transactions_test_error_401(self) -> None: "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 30, "createdDate" : "2022-07-17T22:00:54Z", @@ -798,10 +770,6 @@ def test_create_web_transactions_test_error_403(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "randomizedStartTime" : false, @@ -861,11 +829,7 @@ def test_create_web_transactions_test_error_403(self) -> None: "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 30, "createdDate" : "2022-07-17T22:00:54Z", @@ -962,10 +926,6 @@ def test_create_web_transactions_test_error_404(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "randomizedStartTime" : false, @@ -1025,11 +985,7 @@ def test_create_web_transactions_test_error_404(self) -> None: "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 30, "createdDate" : "2022-07-17T22:00:54Z", @@ -1126,10 +1082,6 @@ def test_create_web_transactions_test_error_429(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "randomizedStartTime" : false, @@ -1189,11 +1141,7 @@ def test_create_web_transactions_test_error_429(self) -> None: "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 30, "createdDate" : "2022-07-17T22:00:54Z", @@ -1290,10 +1238,6 @@ def test_create_web_transactions_test_error_500(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "randomizedStartTime" : false, @@ -1353,11 +1297,7 @@ def test_create_web_transactions_test_error_500(self) -> None: "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 30, "createdDate" : "2022-07-17T22:00:54Z", @@ -1454,10 +1394,6 @@ def test_create_web_transactions_test_error_502(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "randomizedStartTime" : false, @@ -1517,11 +1453,7 @@ def test_create_web_transactions_test_error_502(self) -> None: "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 30, "createdDate" : "2022-07-17T22:00:54Z", @@ -1806,10 +1738,6 @@ def test_get_web_transactions_test_happy_path(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ { "labelId" : "961", "name" : "Artem label", @@ -2262,10 +2190,6 @@ def test_get_web_transactions_tests_happy_path(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "randomizedStartTime" : false, "modifiedDate" : "2022-07-17T22:00:54Z", "interval" : 60, @@ -2377,10 +2301,6 @@ def test_get_web_transactions_tests_happy_path(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "randomizedStartTime" : false, "modifiedDate" : "2022-07-17T22:00:54Z", "interval" : 60, @@ -2670,10 +2590,6 @@ def test_update_web_transactions_test_happy_path(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "randomizedStartTime" : false, @@ -2733,11 +2649,7 @@ def test_update_web_transactions_test_happy_path(self) -> None: "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 30, "createdDate" : "2022-07-17T22:00:54Z", @@ -2806,10 +2718,6 @@ def test_update_web_transactions_test_happy_path(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ { "labelId" : "961", "name" : "Artem label", @@ -3058,10 +2966,6 @@ def test_update_web_transactions_test_error_400(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "randomizedStartTime" : false, @@ -3121,11 +3025,7 @@ def test_update_web_transactions_test_error_400(self) -> None: "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 30, "createdDate" : "2022-07-17T22:00:54Z", @@ -3234,10 +3134,6 @@ def test_update_web_transactions_test_error_401(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "randomizedStartTime" : false, @@ -3297,11 +3193,7 @@ def test_update_web_transactions_test_error_401(self) -> None: "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 30, "createdDate" : "2022-07-17T22:00:54Z", @@ -3398,10 +3290,6 @@ def test_update_web_transactions_test_error_403(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "randomizedStartTime" : false, @@ -3461,11 +3349,7 @@ def test_update_web_transactions_test_error_403(self) -> None: "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 30, "createdDate" : "2022-07-17T22:00:54Z", @@ -3565,10 +3449,6 @@ def test_update_web_transactions_test_error_404(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "randomizedStartTime" : false, @@ -3628,11 +3508,7 @@ def test_update_web_transactions_test_error_404(self) -> None: "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 30, "createdDate" : "2022-07-17T22:00:54Z", @@ -3732,10 +3608,6 @@ def test_update_web_transactions_test_error_429(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "randomizedStartTime" : false, @@ -3795,11 +3667,7 @@ def test_update_web_transactions_test_error_429(self) -> None: "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 30, "createdDate" : "2022-07-17T22:00:54Z", @@ -3899,10 +3767,6 @@ def test_update_web_transactions_test_error_500(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "randomizedStartTime" : false, @@ -3962,11 +3826,7 @@ def test_update_web_transactions_test_error_500(self) -> None: "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 30, "createdDate" : "2022-07-17T22:00:54Z", @@ -4066,10 +3926,6 @@ def test_update_web_transactions_test_error_502(self) -> None: "verifyCertificate" : false, "overrideAgentProxy" : false, "liveShare" : false, - "agentInterfaces" : { - "agentId" : "2954", - "ipAddress" : "192.1.1.0" - }, "labels" : [ "9842", "1283" ], "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ], "randomizedStartTime" : false, @@ -4129,11 +3985,7 @@ def test_update_web_transactions_test_error_502(self) -> None: "networkMeasurements" : true, "url" : "www.thousandeyes.com", "agents" : [ { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" - }, { - "agentId" : "125", - "sourceIpAddress" : "1.1.1.1" + "agentId" : "125" } ], "timeLimit" : 30, "createdDate" : "2022-07-17T22:00:54Z", diff --git a/thousandeyes-sdk-usage/README.md b/thousandeyes-sdk-usage/README.md index 128364eec..46795d8df 100644 --- a/thousandeyes-sdk-usage/README.md +++ b/thousandeyes-sdk-usage/README.md @@ -17,7 +17,7 @@ Refer to the Usage API operations for detailed usage instructions and optional p This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.103 +- API version: 7.0.104 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-usage/test/test_quotas_api.py b/thousandeyes-sdk-usage/test/test_quotas_api.py index 73b844296..bee874a8c 100644 --- a/thousandeyes-sdk-usage/test/test_quotas_api.py +++ b/thousandeyes-sdk-usage/test/test_quotas_api.py @@ -58,6 +58,7 @@ def test_assign_organizations_account_groups_quotas_models_validation(self) -> N request_from_json = thousandeyes_sdk.usage.models.OrganizationsQuotasAssign.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "organizations" : [ { @@ -84,6 +85,7 @@ def test_assign_organizations_account_groups_quotas_models_validation(self) -> N response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.usage.models.OrganizationsQuotasAssign.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_assign_organizations_quotas_models_validation(self) -> None: """Test case for assign_organizations_quotas request and response models""" @@ -102,6 +104,7 @@ def test_assign_organizations_quotas_models_validation(self) -> None: request_from_json = thousandeyes_sdk.usage.models.QuotasAssignRequest.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ { "organizations" : [ { @@ -116,10 +119,12 @@ def test_assign_organizations_quotas_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.usage.models.QuotasAssignResponse.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_quotas_models_validation(self) -> None: """Test case for get_quotas request and response models""" + response_body_json = """ { "quotas" : [ { @@ -164,6 +169,7 @@ def test_get_quotas_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.usage.models.Quotas.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_unassign_organizations_account_groups_quotas_models_validation(self) -> None: """Test case for unassign_organizations_account_groups_quotas request and response models""" @@ -183,6 +189,7 @@ def test_unassign_organizations_account_groups_quotas_models_validation(self) -> request_from_json = thousandeyes_sdk.usage.models.OrganizationsQuotasUnassign.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + def test_unassign_organizations_quotas_models_validation(self) -> None: """Test case for unassign_organizations_quotas request and response models""" @@ -196,6 +203,7 @@ def test_unassign_organizations_quotas_models_validation(self) -> None: request_from_json = thousandeyes_sdk.usage.models.QuotasUnassign.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + if __name__ == '__main__': diff --git a/thousandeyes-sdk-usage/test/test_usage_api.py b/thousandeyes-sdk-usage/test/test_usage_api.py index a663aa5e3..d00f77d78 100644 --- a/thousandeyes-sdk-usage/test/test_usage_api.py +++ b/thousandeyes-sdk-usage/test/test_usage_api.py @@ -31,6 +31,7 @@ def tearDown(self) -> None: def test_get_enterprise_agents_units_usage_models_validation(self) -> None: """Test case for get_enterprise_agents_units_usage request and response models""" + response_body_json = """ { "_links" : { @@ -85,10 +86,12 @@ def test_get_enterprise_agents_units_usage_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.usage.models.EnterpriseAgentsUsage.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_tests_units_usage_models_validation(self) -> None: """Test case for get_tests_units_usage request and response models""" + response_body_json = """ { "_links" : { @@ -149,10 +152,12 @@ def test_get_tests_units_usage_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.usage.models.TestsUsage.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_get_usage_models_validation(self) -> None: """Test case for get_usage request and response models""" + response_body_json = """ { "_links" : { @@ -273,6 +278,7 @@ def test_get_usage_models_validation(self) -> None: response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.usage.models.Usage.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__':