gcore 0.2.0__py3-none-any.whl → 0.4.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of gcore might be problematic. Click here for more details.
- gcore/__init__.py +2 -1
- gcore/_base_client.py +44 -2
- gcore/_client.py +9 -0
- gcore/_models.py +2 -0
- gcore/_types.py +2 -0
- gcore/_version.py +1 -1
- gcore/pagination.py +61 -1
- gcore/resources/__init__.py +14 -0
- gcore/resources/cloud/baremetal/flavors.py +11 -137
- gcore/resources/cloud/baremetal/images.py +10 -12
- gcore/resources/cloud/baremetal/servers.py +75 -78
- gcore/resources/cloud/billing_reservations.py +2 -2
- gcore/resources/cloud/file_shares/file_shares.py +7 -8
- gcore/resources/cloud/floating_ips.py +9 -14
- gcore/resources/cloud/gpu_baremetal_clusters/gpu_baremetal_clusters.py +39 -28
- gcore/resources/cloud/gpu_baremetal_clusters/images.py +11 -12
- gcore/resources/cloud/gpu_baremetal_clusters/interfaces.py +2 -2
- gcore/resources/cloud/gpu_baremetal_clusters/servers.py +12 -8
- gcore/resources/cloud/inference/deployments/deployments.py +16 -8
- gcore/resources/cloud/inference/registry_credentials.py +2 -2
- gcore/resources/cloud/inference/secrets.py +8 -8
- gcore/resources/cloud/instances/flavors.py +9 -233
- gcore/resources/cloud/instances/images.py +47 -37
- gcore/resources/cloud/instances/instances.py +107 -100
- gcore/resources/cloud/instances/interfaces.py +6 -6
- gcore/resources/cloud/ip_ranges.py +34 -2
- gcore/resources/cloud/load_balancers/flavors.py +2 -2
- gcore/resources/cloud/load_balancers/l7_policies/l7_policies.py +30 -22
- gcore/resources/cloud/load_balancers/listeners.py +31 -22
- gcore/resources/cloud/load_balancers/load_balancers.py +99 -43
- gcore/resources/cloud/load_balancers/metrics.py +2 -2
- gcore/resources/cloud/load_balancers/pools/health_monitors.py +2 -2
- gcore/resources/cloud/load_balancers/pools/members.py +12 -8
- gcore/resources/cloud/networks/networks.py +83 -19
- gcore/resources/cloud/networks/routers.py +18 -18
- gcore/resources/cloud/networks/subnets.py +55 -15
- gcore/resources/cloud/projects.py +38 -24
- gcore/resources/cloud/quotas/quotas.py +6 -6
- gcore/resources/cloud/quotas/requests.py +8 -8
- gcore/resources/cloud/registries/artifacts.py +4 -4
- gcore/resources/cloud/registries/registries.py +14 -20
- gcore/resources/cloud/registries/repositories.py +4 -4
- gcore/resources/cloud/registries/tags.py +2 -2
- gcore/resources/cloud/registries/users.py +25 -32
- gcore/resources/cloud/reserved_fixed_ips/reserved_fixed_ips.py +26 -26
- gcore/resources/cloud/reserved_fixed_ips/vip.py +10 -10
- gcore/resources/cloud/security_groups/rules.py +6 -6
- gcore/resources/cloud/security_groups/security_groups.py +70 -31
- gcore/resources/cloud/ssh_keys.py +2 -2
- gcore/resources/cloud/tasks.py +102 -94
- gcore/resources/cloud/users/role_assignments.py +16 -18
- gcore/resources/cloud/volumes.py +155 -65
- gcore/resources/iam/__init__.py +47 -0
- gcore/resources/iam/api_tokens.py +521 -0
- gcore/resources/iam/iam.py +199 -0
- gcore/resources/iam/users.py +642 -0
- gcore/resources/waap/__init__.py +84 -0
- gcore/resources/waap/advanced_rules.py +135 -0
- gcore/resources/waap/custom_page_sets.py +805 -0
- gcore/resources/waap/domains/__init__.py +140 -0
- gcore/resources/waap/domains/advanced_rules.py +876 -0
- gcore/resources/waap/domains/analytics/__init__.py +33 -0
- gcore/resources/waap/domains/analytics/analytics.py +676 -0
- gcore/resources/waap/domains/analytics/requests.py +378 -0
- gcore/resources/waap/domains/api_discovery/__init__.py +33 -0
- gcore/resources/waap/domains/api_discovery/api_discovery.py +530 -0
- gcore/resources/waap/domains/api_discovery/scan_results.py +352 -0
- gcore/resources/waap/domains/api_path_groups.py +163 -0
- gcore/resources/waap/domains/api_paths.py +771 -0
- gcore/resources/waap/domains/custom_rules.py +889 -0
- gcore/resources/waap/domains/domains.py +399 -0
- gcore/resources/waap/domains/firewall_rules.py +884 -0
- gcore/resources/waap/domains/insight_silences.py +689 -0
- gcore/resources/waap/domains/insights.py +425 -0
- gcore/resources/waap/domains/policies.py +173 -0
- gcore/resources/waap/domains/settings.py +5 -5
- gcore/resources/waap/ip_info.py +1017 -0
- gcore/resources/waap/organizations.py +217 -0
- gcore/resources/waap/statistics.py +225 -0
- gcore/resources/waap/tags.py +233 -0
- gcore/resources/waap/waap.py +257 -0
- gcore/types/cloud/allowed_address_pairs.py +2 -2
- gcore/types/cloud/baremetal/__init__.py +0 -1
- gcore/types/cloud/baremetal/baremetal_server.py +1 -1
- gcore/types/cloud/baremetal/image_list_params.py +1 -5
- gcore/types/cloud/baremetal/server_create_params.py +13 -17
- gcore/types/cloud/baremetal/server_list_params.py +8 -12
- gcore/types/cloud/baremetal/server_rebuild_params.py +1 -1
- gcore/types/cloud/baremetal_flavor.py +3 -3
- gcore/types/cloud/container_probe_config.py +1 -1
- gcore/types/cloud/container_probe_config_create_param.py +1 -1
- gcore/types/cloud/container_scale_triggers.py +2 -2
- gcore/types/cloud/ddos_profile.py +9 -3
- gcore/types/cloud/file_share_create_params.py +3 -5
- gcore/types/cloud/floating_ip_create_params.py +2 -4
- gcore/types/cloud/floating_ip_detailed.py +1 -1
- gcore/types/cloud/floating_ip_list_params.py +2 -6
- gcore/types/cloud/gpu_baremetal_cluster.py +1 -1
- gcore/types/cloud/gpu_baremetal_cluster_create_params.py +4 -5
- gcore/types/cloud/gpu_baremetal_cluster_delete_params.py +1 -1
- gcore/types/cloud/gpu_baremetal_cluster_rebuild_params.py +1 -1
- gcore/types/cloud/gpu_baremetal_cluster_server.py +1 -1
- gcore/types/cloud/gpu_baremetal_clusters/image_upload_params.py +3 -5
- gcore/types/cloud/gpu_baremetal_clusters/server_attach_interface_params.py +10 -10
- gcore/types/cloud/gpu_baremetal_flavor.py +3 -3
- gcore/types/cloud/health_monitor.py +6 -1
- gcore/types/cloud/image.py +1 -1
- gcore/types/cloud/inference/deployment_create_params.py +4 -4
- gcore/types/cloud/inference/deployment_update_params.py +6 -6
- gcore/types/cloud/inference/inference.py +2 -4
- gcore/types/cloud/instance.py +1 -1
- gcore/types/cloud/instance_create_params.py +15 -18
- gcore/types/cloud/instance_list_params.py +8 -12
- gcore/types/cloud/instances/__init__.py +0 -2
- gcore/types/cloud/instances/image_create_from_volume_params.py +2 -4
- gcore/types/cloud/instances/image_list_params.py +1 -5
- gcore/types/cloud/instances/image_upload_params.py +2 -4
- gcore/types/cloud/instances/instance_flavor.py +3 -3
- gcore/types/cloud/instances/interface_attach_params.py +10 -10
- gcore/types/cloud/load_balancer_create_params.py +25 -19
- gcore/types/cloud/load_balancer_flavor_detail.py +3 -3
- gcore/types/cloud/load_balancer_l7_policy.py +5 -5
- gcore/types/cloud/load_balancer_list_params.py +5 -9
- gcore/types/cloud/load_balancer_listener_detail.py +4 -4
- gcore/types/cloud/load_balancer_update_params.py +24 -0
- gcore/types/cloud/load_balancers/l7_policy_create_params.py +5 -5
- gcore/types/cloud/load_balancers/l7_policy_replace_params.py +5 -5
- gcore/types/cloud/load_balancers/listener_create_params.py +4 -4
- gcore/types/cloud/load_balancers/listener_update_params.py +3 -3
- gcore/types/cloud/load_balancers/pool_create_params.py +10 -5
- gcore/types/cloud/load_balancers/pool_update_params.py +10 -5
- gcore/types/cloud/load_balancers/pools/member_add_params.py +9 -4
- gcore/types/cloud/member.py +8 -3
- gcore/types/cloud/network.py +2 -2
- gcore/types/cloud/network_create_params.py +2 -3
- gcore/types/cloud/network_details.py +2 -2
- gcore/types/cloud/network_list_params.py +5 -6
- gcore/types/cloud/network_update_params.py +28 -2
- gcore/types/cloud/networks/router_list_params.py +2 -2
- gcore/types/cloud/networks/subnet_create_params.py +3 -4
- gcore/types/cloud/networks/subnet_list_params.py +2 -6
- gcore/types/cloud/networks/subnet_update_params.py +25 -0
- gcore/types/cloud/region.py +4 -4
- gcore/types/cloud/registries/__init__.py +1 -0
- gcore/types/cloud/registries/user_create_multiple_params.py +3 -5
- gcore/types/cloud/registries/user_create_params.py +3 -5
- gcore/types/cloud/registries/user_refresh_secret_response.py +31 -0
- gcore/types/cloud/registry_create_params.py +3 -5
- gcore/types/cloud/reserved_fixed_ip_create_params.py +2 -2
- gcore/types/cloud/reserved_fixed_ip_list_params.py +3 -3
- gcore/types/cloud/security_group_list_params.py +3 -7
- gcore/types/cloud/security_group_update_params.py +25 -0
- gcore/types/cloud/session_persistence.py +1 -1
- gcore/types/cloud/ssh_key_created.py +3 -6
- gcore/types/cloud/tag_update_map_param.py +2 -2
- gcore/types/cloud/task.py +1 -1
- gcore/types/cloud/task_list_params.py +49 -45
- gcore/types/cloud/users/role_assignment_create_params.py +1 -1
- gcore/types/cloud/users/role_assignment_update_params.py +1 -1
- gcore/types/cloud/volume_create_params.py +6 -6
- gcore/types/cloud/volume_list_params.py +3 -7
- gcore/types/cloud/volume_update_params.py +29 -3
- gcore/types/iam/__init__.py +17 -0
- gcore/types/iam/account_overview.py +488 -0
- gcore/types/iam/api_token.py +78 -0
- gcore/types/iam/api_token_create.py +15 -0
- gcore/types/iam/api_token_create_params.py +42 -0
- gcore/types/iam/api_token_list.py +81 -0
- gcore/types/iam/api_token_list_params.py +41 -0
- gcore/types/iam/user.py +86 -0
- gcore/types/iam/user_detailed.py +104 -0
- gcore/types/iam/user_invite.py +15 -0
- gcore/types/iam/user_invite_params.py +37 -0
- gcore/types/iam/user_list_params.py +15 -0
- gcore/types/iam/user_update.py +104 -0
- gcore/types/iam/user_update_params.py +52 -0
- gcore/types/waap/__init__.py +97 -2
- gcore/types/waap/custom_page_set_create_params.py +35 -0
- gcore/types/waap/custom_page_set_list_params.py +25 -0
- gcore/types/waap/custom_page_set_preview_params.py +34 -0
- gcore/types/waap/custom_page_set_update_params.py +35 -0
- gcore/types/waap/domain_list_rule_sets_response.py +10 -0
- gcore/types/waap/domains/__init__.py +42 -0
- gcore/types/waap/domains/advanced_rule_create_params.py +80 -0
- gcore/types/waap/domains/advanced_rule_list_params.py +58 -0
- gcore/types/waap/domains/advanced_rule_update_params.py +83 -0
- gcore/types/waap/domains/analytics/__init__.py +5 -0
- gcore/types/waap/domains/analytics/request_list_params.py +53 -0
- gcore/types/waap/domains/analytics_get_event_statistics_params.py +34 -0
- gcore/types/waap/domains/analytics_list_ddos_attacks_params.py +28 -0
- gcore/types/waap/domains/analytics_list_ddos_info_params.py +31 -0
- gcore/types/waap/domains/analytics_list_event_traffic_params.py +26 -0
- gcore/types/waap/domains/analytics_list_event_traffic_response.py +10 -0
- gcore/types/waap/domains/api_discovery/__init__.py +7 -0
- gcore/types/waap/domains/api_discovery/scan_result_get_response.py +29 -0
- gcore/types/waap/domains/api_discovery/scan_result_list_params.py +41 -0
- gcore/types/waap/domains/api_discovery/scan_result_list_response.py +29 -0
- gcore/types/waap/domains/api_discovery_get_settings_response.py +36 -0
- gcore/types/waap/domains/api_discovery_scan_openapi_response.py +10 -0
- gcore/types/waap/domains/api_discovery_update_settings_params.py +34 -0
- gcore/types/waap/domains/api_discovery_update_settings_response.py +36 -0
- gcore/types/waap/domains/api_discovery_upload_openapi_params.py +19 -0
- gcore/types/waap/domains/api_discovery_upload_openapi_response.py +10 -0
- gcore/types/waap/domains/api_path_create_params.py +31 -0
- gcore/types/waap/domains/api_path_create_response.py +50 -0
- gcore/types/waap/domains/api_path_get_response.py +50 -0
- gcore/types/waap/domains/api_path_group_list_response.py +12 -0
- gcore/types/waap/domains/api_path_list_params.py +62 -0
- gcore/types/waap/domains/api_path_list_response.py +50 -0
- gcore/types/waap/domains/api_path_update_params.py +29 -0
- gcore/types/waap/domains/custom_rule_create_params.py +372 -0
- gcore/types/waap/domains/custom_rule_delete_multiple_params.py +13 -0
- gcore/types/waap/domains/custom_rule_list_params.py +35 -0
- gcore/types/waap/domains/custom_rule_update_params.py +375 -0
- gcore/types/waap/domains/firewall_rule_create_params.py +75 -0
- gcore/types/waap/domains/firewall_rule_delete_multiple_params.py +13 -0
- gcore/types/waap/domains/firewall_rule_list_params.py +33 -0
- gcore/types/waap/domains/firewall_rule_update_params.py +78 -0
- gcore/types/waap/domains/insight_list_params.py +34 -0
- gcore/types/waap/domains/insight_replace_params.py +17 -0
- gcore/types/waap/domains/insight_silence_create_params.py +28 -0
- gcore/types/waap/domains/insight_silence_list_params.py +33 -0
- gcore/types/waap/domains/insight_silence_update_params.py +28 -0
- gcore/types/waap/domains/setting_update_params.py +7 -0
- gcore/types/waap/ip_info_get_attack_time_series_params.py +12 -0
- gcore/types/waap/ip_info_get_attack_time_series_response.py +10 -0
- gcore/types/waap/ip_info_get_blocked_requests_params.py +15 -0
- gcore/types/waap/ip_info_get_blocked_requests_response.py +10 -0
- gcore/types/waap/ip_info_get_counts_params.py +19 -0
- gcore/types/waap/ip_info_get_ddos_attack_series_params.py +12 -0
- gcore/types/waap/ip_info_get_params.py +12 -0
- gcore/types/waap/ip_info_get_top_sessions_params.py +15 -0
- gcore/types/waap/ip_info_get_top_sessions_response.py +10 -0
- gcore/types/waap/ip_info_get_top_urls_params.py +15 -0
- gcore/types/waap/ip_info_get_top_urls_response.py +10 -0
- gcore/types/waap/ip_info_get_top_user_agents_params.py +15 -0
- gcore/types/waap/ip_info_get_top_user_agents_response.py +10 -0
- gcore/types/waap/ip_info_list_attacked_countries_params.py +12 -0
- gcore/types/waap/ip_info_list_attacked_countries_response.py +10 -0
- gcore/types/waap/organization_list_params.py +22 -0
- gcore/types/waap/statistic_get_usage_series_params.py +25 -0
- gcore/types/waap/tag_list_params.py +28 -0
- gcore/types/waap/waap_advanced_rule.py +83 -0
- gcore/types/waap/waap_advanced_rule_descriptor.py +49 -0
- gcore/types/waap/waap_advanced_rule_descriptor_list.py +15 -0
- gcore/types/waap/waap_block_csrf_page_data.py +28 -0
- gcore/types/waap/waap_block_csrf_page_data_param.py +28 -0
- gcore/types/waap/waap_block_page_data.py +28 -0
- gcore/types/waap/waap_block_page_data_param.py +28 -0
- gcore/types/waap/waap_blocked_statistics.py +36 -0
- gcore/types/waap/waap_captcha_page_data.py +31 -0
- gcore/types/waap/waap_captcha_page_data_param.py +31 -0
- gcore/types/waap/waap_common_tag.py +16 -0
- gcore/types/waap/waap_cookie_disabled_page_data.py +18 -0
- gcore/types/waap/waap_cookie_disabled_page_data_param.py +18 -0
- gcore/types/waap/waap_count_statistics.py +36 -0
- gcore/types/waap/waap_custom_page_preview.py +10 -0
- gcore/types/waap/waap_custom_page_set.py +36 -0
- gcore/types/waap/waap_custom_rule.py +377 -0
- gcore/types/waap/waap_customer_rule_state.py +7 -0
- gcore/types/waap/waap_ddos_attack.py +16 -0
- gcore/types/waap/waap_ddos_info.py +17 -0
- gcore/types/waap/{waap_api_urls.py → waap_domain_api_settings.py} +9 -2
- gcore/types/waap/waap_domain_policy.py +29 -0
- gcore/types/waap/{waap_domain_settings.py → waap_domain_settings_model.py} +4 -4
- gcore/types/waap/waap_event_statistics.py +15 -0
- gcore/types/waap/waap_firewall_rule.py +78 -0
- gcore/types/waap/waap_get_account_overview_response.py +34 -0
- gcore/types/waap/waap_handshake_page_data.py +25 -0
- gcore/types/waap/waap_handshake_page_data_param.py +25 -0
- gcore/types/waap/waap_insight.py +38 -0
- gcore/types/waap/waap_insight_silence.py +28 -0
- gcore/types/waap/waap_insight_silence_sort_by.py +9 -0
- gcore/types/waap/waap_insight_sort_by.py +20 -0
- gcore/types/waap/waap_insight_status.py +7 -0
- gcore/types/waap/waap_ip_country_attack.py +16 -0
- gcore/types/waap/waap_ip_ddos_info_model.py +23 -0
- gcore/types/waap/waap_ip_info.py +57 -0
- gcore/types/waap/waap_ip_info_counts.py +16 -0
- gcore/types/waap/waap_javascript_disabled_page_data.py +18 -0
- gcore/types/waap/waap_javascript_disabled_page_data_param.py +18 -0
- gcore/types/waap/waap_network_details.py +17 -0
- gcore/types/waap/waap_organization.py +13 -0
- gcore/types/waap/waap_page_type.py +9 -0
- gcore/types/waap/waap_paginated_custom_page_set.py +22 -0
- gcore/types/waap/waap_paginated_ddos_attack.py +22 -0
- gcore/types/waap/waap_paginated_ddos_info.py +22 -0
- gcore/types/waap/waap_paginated_request_summary.py +22 -0
- gcore/types/waap/waap_pattern_matched_tag.py +37 -0
- gcore/types/waap/waap_policy_action.py +7 -0
- gcore/types/waap/waap_policy_mode.py +10 -0
- gcore/types/waap/waap_request_details.py +92 -0
- gcore/types/waap/waap_request_organization.py +13 -0
- gcore/types/waap/waap_request_summary.py +59 -0
- gcore/types/waap/waap_resolution.py +7 -0
- gcore/types/waap/waap_rule_action_type.py +7 -0
- gcore/types/waap/waap_rule_blocked_requests.py +16 -0
- gcore/types/waap/waap_rule_set.py +41 -0
- gcore/types/waap/waap_statistic_item.py +18 -0
- gcore/types/waap/waap_statistics_series.py +16 -0
- gcore/types/waap/waap_tag.py +16 -0
- gcore/types/waap/waap_time_series_attack.py +23 -0
- gcore/types/waap/waap_top_session.py +24 -0
- gcore/types/waap/waap_top_url.py +13 -0
- gcore/types/waap/waap_top_user_agent.py +13 -0
- gcore/types/waap/waap_traffic_metrics.py +68 -0
- gcore/types/waap/waap_traffic_type.py +28 -0
- gcore/types/waap/waap_user_agent_details.py +40 -0
- {gcore-0.2.0.dist-info → gcore-0.4.0.dist-info}/METADATA +40 -3
- {gcore-0.2.0.dist-info → gcore-0.4.0.dist-info}/RECORD +312 -149
- gcore/types/cloud/baremetal/flavor_list_suitable_params.py +0 -22
- gcore/types/cloud/instances/flavor_list_for_resize_params.py +0 -16
- gcore/types/cloud/instances/flavor_list_suitable_params.py +0 -56
- {gcore-0.2.0.dist-info → gcore-0.4.0.dist-info}/WHEEL +0 -0
- {gcore-0.2.0.dist-info → gcore-0.4.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,689 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Dict, List, Union, Optional
|
|
6
|
+
from datetime import datetime
|
|
7
|
+
|
|
8
|
+
import httpx
|
|
9
|
+
|
|
10
|
+
from ...._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
|
|
11
|
+
from ...._utils import maybe_transform, async_maybe_transform
|
|
12
|
+
from ...._compat import cached_property
|
|
13
|
+
from ...._resource import SyncAPIResource, AsyncAPIResource
|
|
14
|
+
from ...._response import (
|
|
15
|
+
to_raw_response_wrapper,
|
|
16
|
+
to_streamed_response_wrapper,
|
|
17
|
+
async_to_raw_response_wrapper,
|
|
18
|
+
async_to_streamed_response_wrapper,
|
|
19
|
+
)
|
|
20
|
+
from ....pagination import SyncOffsetPage, AsyncOffsetPage
|
|
21
|
+
from ....types.waap import WaapInsightSilenceSortBy
|
|
22
|
+
from ...._base_client import AsyncPaginator, make_request_options
|
|
23
|
+
from ....types.waap.domains import (
|
|
24
|
+
insight_silence_list_params,
|
|
25
|
+
insight_silence_create_params,
|
|
26
|
+
insight_silence_update_params,
|
|
27
|
+
)
|
|
28
|
+
from ....types.waap.waap_insight_silence import WaapInsightSilence
|
|
29
|
+
from ....types.waap.waap_insight_silence_sort_by import WaapInsightSilenceSortBy
|
|
30
|
+
|
|
31
|
+
__all__ = ["InsightSilencesResource", "AsyncInsightSilencesResource"]
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class InsightSilencesResource(SyncAPIResource):
|
|
35
|
+
@cached_property
|
|
36
|
+
def with_raw_response(self) -> InsightSilencesResourceWithRawResponse:
|
|
37
|
+
"""
|
|
38
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
39
|
+
the raw response object instead of the parsed content.
|
|
40
|
+
|
|
41
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
42
|
+
"""
|
|
43
|
+
return InsightSilencesResourceWithRawResponse(self)
|
|
44
|
+
|
|
45
|
+
@cached_property
|
|
46
|
+
def with_streaming_response(self) -> InsightSilencesResourceWithStreamingResponse:
|
|
47
|
+
"""
|
|
48
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
49
|
+
|
|
50
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
51
|
+
"""
|
|
52
|
+
return InsightSilencesResourceWithStreamingResponse(self)
|
|
53
|
+
|
|
54
|
+
def create(
|
|
55
|
+
self,
|
|
56
|
+
domain_id: int,
|
|
57
|
+
*,
|
|
58
|
+
author: str,
|
|
59
|
+
comment: str,
|
|
60
|
+
insight_type: str,
|
|
61
|
+
labels: Dict[str, str],
|
|
62
|
+
expire_at: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
|
|
63
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
64
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
65
|
+
extra_headers: Headers | None = None,
|
|
66
|
+
extra_query: Query | None = None,
|
|
67
|
+
extra_body: Body | None = None,
|
|
68
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
69
|
+
) -> WaapInsightSilence:
|
|
70
|
+
"""Create a new insight silence for a specified domain.
|
|
71
|
+
|
|
72
|
+
Insight silences help in
|
|
73
|
+
temporarily disabling certain insights based on specific criteria.
|
|
74
|
+
|
|
75
|
+
Args:
|
|
76
|
+
domain_id: The domain ID
|
|
77
|
+
|
|
78
|
+
author: The author of the silence
|
|
79
|
+
|
|
80
|
+
comment: A comment explaining the reason for the silence
|
|
81
|
+
|
|
82
|
+
insight_type: The slug of the insight type
|
|
83
|
+
|
|
84
|
+
labels: A hash table of label names and values that apply to the insight silence
|
|
85
|
+
|
|
86
|
+
expire_at: The date and time the silence expires in ISO 8601 format
|
|
87
|
+
|
|
88
|
+
extra_headers: Send extra headers
|
|
89
|
+
|
|
90
|
+
extra_query: Add additional query parameters to the request
|
|
91
|
+
|
|
92
|
+
extra_body: Add additional JSON properties to the request
|
|
93
|
+
|
|
94
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
95
|
+
"""
|
|
96
|
+
return self._post(
|
|
97
|
+
f"/waap/v1/domains/{domain_id}/insight-silences",
|
|
98
|
+
body=maybe_transform(
|
|
99
|
+
{
|
|
100
|
+
"author": author,
|
|
101
|
+
"comment": comment,
|
|
102
|
+
"insight_type": insight_type,
|
|
103
|
+
"labels": labels,
|
|
104
|
+
"expire_at": expire_at,
|
|
105
|
+
},
|
|
106
|
+
insight_silence_create_params.InsightSilenceCreateParams,
|
|
107
|
+
),
|
|
108
|
+
options=make_request_options(
|
|
109
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
110
|
+
),
|
|
111
|
+
cast_to=WaapInsightSilence,
|
|
112
|
+
)
|
|
113
|
+
|
|
114
|
+
def update(
|
|
115
|
+
self,
|
|
116
|
+
silence_id: str,
|
|
117
|
+
*,
|
|
118
|
+
domain_id: int,
|
|
119
|
+
author: str,
|
|
120
|
+
comment: str,
|
|
121
|
+
expire_at: Union[str, datetime, None],
|
|
122
|
+
labels: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
123
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
124
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
125
|
+
extra_headers: Headers | None = None,
|
|
126
|
+
extra_query: Query | None = None,
|
|
127
|
+
extra_body: Body | None = None,
|
|
128
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
129
|
+
) -> WaapInsightSilence:
|
|
130
|
+
"""
|
|
131
|
+
Update an insight silence for a specific domain.
|
|
132
|
+
|
|
133
|
+
Args:
|
|
134
|
+
domain_id: The domain ID
|
|
135
|
+
|
|
136
|
+
silence_id: A generated unique identifier for the silence
|
|
137
|
+
|
|
138
|
+
author: The author of the silence
|
|
139
|
+
|
|
140
|
+
comment: A comment explaining the reason for the silence
|
|
141
|
+
|
|
142
|
+
expire_at: The date and time the silence expires in ISO 8601 format
|
|
143
|
+
|
|
144
|
+
labels: A hash table of label names and values that apply to the insight silence
|
|
145
|
+
|
|
146
|
+
extra_headers: Send extra headers
|
|
147
|
+
|
|
148
|
+
extra_query: Add additional query parameters to the request
|
|
149
|
+
|
|
150
|
+
extra_body: Add additional JSON properties to the request
|
|
151
|
+
|
|
152
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
153
|
+
"""
|
|
154
|
+
if not silence_id:
|
|
155
|
+
raise ValueError(f"Expected a non-empty value for `silence_id` but received {silence_id!r}")
|
|
156
|
+
return self._patch(
|
|
157
|
+
f"/waap/v1/domains/{domain_id}/insight-silences/{silence_id}",
|
|
158
|
+
body=maybe_transform(
|
|
159
|
+
{
|
|
160
|
+
"author": author,
|
|
161
|
+
"comment": comment,
|
|
162
|
+
"expire_at": expire_at,
|
|
163
|
+
"labels": labels,
|
|
164
|
+
},
|
|
165
|
+
insight_silence_update_params.InsightSilenceUpdateParams,
|
|
166
|
+
),
|
|
167
|
+
options=make_request_options(
|
|
168
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
169
|
+
),
|
|
170
|
+
cast_to=WaapInsightSilence,
|
|
171
|
+
)
|
|
172
|
+
|
|
173
|
+
def list(
|
|
174
|
+
self,
|
|
175
|
+
domain_id: int,
|
|
176
|
+
*,
|
|
177
|
+
id: Optional[List[str]] | NotGiven = NOT_GIVEN,
|
|
178
|
+
author: Optional[str] | NotGiven = NOT_GIVEN,
|
|
179
|
+
comment: Optional[str] | NotGiven = NOT_GIVEN,
|
|
180
|
+
insight_type: Optional[List[str]] | NotGiven = NOT_GIVEN,
|
|
181
|
+
limit: int | NotGiven = NOT_GIVEN,
|
|
182
|
+
offset: int | NotGiven = NOT_GIVEN,
|
|
183
|
+
ordering: WaapInsightSilenceSortBy | NotGiven = NOT_GIVEN,
|
|
184
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
185
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
186
|
+
extra_headers: Headers | None = None,
|
|
187
|
+
extra_query: Query | None = None,
|
|
188
|
+
extra_body: Body | None = None,
|
|
189
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
190
|
+
) -> SyncOffsetPage[WaapInsightSilence]:
|
|
191
|
+
"""
|
|
192
|
+
Retrieve a list of insight silences for a specific domain
|
|
193
|
+
|
|
194
|
+
Args:
|
|
195
|
+
domain_id: The domain ID
|
|
196
|
+
|
|
197
|
+
id: The ID of the insight silence
|
|
198
|
+
|
|
199
|
+
author: The author of the insight silence
|
|
200
|
+
|
|
201
|
+
comment: The comment of the insight silence
|
|
202
|
+
|
|
203
|
+
insight_type: The type of the insight silence
|
|
204
|
+
|
|
205
|
+
limit: Number of items to return
|
|
206
|
+
|
|
207
|
+
offset: Number of items to skip
|
|
208
|
+
|
|
209
|
+
ordering: Sort the response by given field.
|
|
210
|
+
|
|
211
|
+
extra_headers: Send extra headers
|
|
212
|
+
|
|
213
|
+
extra_query: Add additional query parameters to the request
|
|
214
|
+
|
|
215
|
+
extra_body: Add additional JSON properties to the request
|
|
216
|
+
|
|
217
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
218
|
+
"""
|
|
219
|
+
return self._get_api_list(
|
|
220
|
+
f"/waap/v1/domains/{domain_id}/insight-silences",
|
|
221
|
+
page=SyncOffsetPage[WaapInsightSilence],
|
|
222
|
+
options=make_request_options(
|
|
223
|
+
extra_headers=extra_headers,
|
|
224
|
+
extra_query=extra_query,
|
|
225
|
+
extra_body=extra_body,
|
|
226
|
+
timeout=timeout,
|
|
227
|
+
query=maybe_transform(
|
|
228
|
+
{
|
|
229
|
+
"id": id,
|
|
230
|
+
"author": author,
|
|
231
|
+
"comment": comment,
|
|
232
|
+
"insight_type": insight_type,
|
|
233
|
+
"limit": limit,
|
|
234
|
+
"offset": offset,
|
|
235
|
+
"ordering": ordering,
|
|
236
|
+
},
|
|
237
|
+
insight_silence_list_params.InsightSilenceListParams,
|
|
238
|
+
),
|
|
239
|
+
),
|
|
240
|
+
model=WaapInsightSilence,
|
|
241
|
+
)
|
|
242
|
+
|
|
243
|
+
def delete(
|
|
244
|
+
self,
|
|
245
|
+
silence_id: str,
|
|
246
|
+
*,
|
|
247
|
+
domain_id: int,
|
|
248
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
249
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
250
|
+
extra_headers: Headers | None = None,
|
|
251
|
+
extra_query: Query | None = None,
|
|
252
|
+
extra_body: Body | None = None,
|
|
253
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
254
|
+
) -> None:
|
|
255
|
+
"""
|
|
256
|
+
Delete an insight silence for a specific domain.
|
|
257
|
+
|
|
258
|
+
Args:
|
|
259
|
+
domain_id: The domain ID
|
|
260
|
+
|
|
261
|
+
silence_id: A generated unique identifier for the silence
|
|
262
|
+
|
|
263
|
+
extra_headers: Send extra headers
|
|
264
|
+
|
|
265
|
+
extra_query: Add additional query parameters to the request
|
|
266
|
+
|
|
267
|
+
extra_body: Add additional JSON properties to the request
|
|
268
|
+
|
|
269
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
270
|
+
"""
|
|
271
|
+
if not silence_id:
|
|
272
|
+
raise ValueError(f"Expected a non-empty value for `silence_id` but received {silence_id!r}")
|
|
273
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
274
|
+
return self._delete(
|
|
275
|
+
f"/waap/v1/domains/{domain_id}/insight-silences/{silence_id}",
|
|
276
|
+
options=make_request_options(
|
|
277
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
278
|
+
),
|
|
279
|
+
cast_to=NoneType,
|
|
280
|
+
)
|
|
281
|
+
|
|
282
|
+
def get(
|
|
283
|
+
self,
|
|
284
|
+
silence_id: str,
|
|
285
|
+
*,
|
|
286
|
+
domain_id: int,
|
|
287
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
288
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
289
|
+
extra_headers: Headers | None = None,
|
|
290
|
+
extra_query: Query | None = None,
|
|
291
|
+
extra_body: Body | None = None,
|
|
292
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
293
|
+
) -> WaapInsightSilence:
|
|
294
|
+
"""
|
|
295
|
+
Retrieve a specific insight silence for a specific domain
|
|
296
|
+
|
|
297
|
+
Args:
|
|
298
|
+
domain_id: The domain ID
|
|
299
|
+
|
|
300
|
+
silence_id: A generated unique identifier for the silence
|
|
301
|
+
|
|
302
|
+
extra_headers: Send extra headers
|
|
303
|
+
|
|
304
|
+
extra_query: Add additional query parameters to the request
|
|
305
|
+
|
|
306
|
+
extra_body: Add additional JSON properties to the request
|
|
307
|
+
|
|
308
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
309
|
+
"""
|
|
310
|
+
if not silence_id:
|
|
311
|
+
raise ValueError(f"Expected a non-empty value for `silence_id` but received {silence_id!r}")
|
|
312
|
+
return self._get(
|
|
313
|
+
f"/waap/v1/domains/{domain_id}/insight-silences/{silence_id}",
|
|
314
|
+
options=make_request_options(
|
|
315
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
316
|
+
),
|
|
317
|
+
cast_to=WaapInsightSilence,
|
|
318
|
+
)
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
class AsyncInsightSilencesResource(AsyncAPIResource):
|
|
322
|
+
@cached_property
|
|
323
|
+
def with_raw_response(self) -> AsyncInsightSilencesResourceWithRawResponse:
|
|
324
|
+
"""
|
|
325
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
326
|
+
the raw response object instead of the parsed content.
|
|
327
|
+
|
|
328
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
329
|
+
"""
|
|
330
|
+
return AsyncInsightSilencesResourceWithRawResponse(self)
|
|
331
|
+
|
|
332
|
+
@cached_property
|
|
333
|
+
def with_streaming_response(self) -> AsyncInsightSilencesResourceWithStreamingResponse:
|
|
334
|
+
"""
|
|
335
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
336
|
+
|
|
337
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
338
|
+
"""
|
|
339
|
+
return AsyncInsightSilencesResourceWithStreamingResponse(self)
|
|
340
|
+
|
|
341
|
+
async def create(
|
|
342
|
+
self,
|
|
343
|
+
domain_id: int,
|
|
344
|
+
*,
|
|
345
|
+
author: str,
|
|
346
|
+
comment: str,
|
|
347
|
+
insight_type: str,
|
|
348
|
+
labels: Dict[str, str],
|
|
349
|
+
expire_at: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
|
|
350
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
351
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
352
|
+
extra_headers: Headers | None = None,
|
|
353
|
+
extra_query: Query | None = None,
|
|
354
|
+
extra_body: Body | None = None,
|
|
355
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
356
|
+
) -> WaapInsightSilence:
|
|
357
|
+
"""Create a new insight silence for a specified domain.
|
|
358
|
+
|
|
359
|
+
Insight silences help in
|
|
360
|
+
temporarily disabling certain insights based on specific criteria.
|
|
361
|
+
|
|
362
|
+
Args:
|
|
363
|
+
domain_id: The domain ID
|
|
364
|
+
|
|
365
|
+
author: The author of the silence
|
|
366
|
+
|
|
367
|
+
comment: A comment explaining the reason for the silence
|
|
368
|
+
|
|
369
|
+
insight_type: The slug of the insight type
|
|
370
|
+
|
|
371
|
+
labels: A hash table of label names and values that apply to the insight silence
|
|
372
|
+
|
|
373
|
+
expire_at: The date and time the silence expires in ISO 8601 format
|
|
374
|
+
|
|
375
|
+
extra_headers: Send extra headers
|
|
376
|
+
|
|
377
|
+
extra_query: Add additional query parameters to the request
|
|
378
|
+
|
|
379
|
+
extra_body: Add additional JSON properties to the request
|
|
380
|
+
|
|
381
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
382
|
+
"""
|
|
383
|
+
return await self._post(
|
|
384
|
+
f"/waap/v1/domains/{domain_id}/insight-silences",
|
|
385
|
+
body=await async_maybe_transform(
|
|
386
|
+
{
|
|
387
|
+
"author": author,
|
|
388
|
+
"comment": comment,
|
|
389
|
+
"insight_type": insight_type,
|
|
390
|
+
"labels": labels,
|
|
391
|
+
"expire_at": expire_at,
|
|
392
|
+
},
|
|
393
|
+
insight_silence_create_params.InsightSilenceCreateParams,
|
|
394
|
+
),
|
|
395
|
+
options=make_request_options(
|
|
396
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
397
|
+
),
|
|
398
|
+
cast_to=WaapInsightSilence,
|
|
399
|
+
)
|
|
400
|
+
|
|
401
|
+
async def update(
|
|
402
|
+
self,
|
|
403
|
+
silence_id: str,
|
|
404
|
+
*,
|
|
405
|
+
domain_id: int,
|
|
406
|
+
author: str,
|
|
407
|
+
comment: str,
|
|
408
|
+
expire_at: Union[str, datetime, None],
|
|
409
|
+
labels: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
410
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
411
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
412
|
+
extra_headers: Headers | None = None,
|
|
413
|
+
extra_query: Query | None = None,
|
|
414
|
+
extra_body: Body | None = None,
|
|
415
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
416
|
+
) -> WaapInsightSilence:
|
|
417
|
+
"""
|
|
418
|
+
Update an insight silence for a specific domain.
|
|
419
|
+
|
|
420
|
+
Args:
|
|
421
|
+
domain_id: The domain ID
|
|
422
|
+
|
|
423
|
+
silence_id: A generated unique identifier for the silence
|
|
424
|
+
|
|
425
|
+
author: The author of the silence
|
|
426
|
+
|
|
427
|
+
comment: A comment explaining the reason for the silence
|
|
428
|
+
|
|
429
|
+
expire_at: The date and time the silence expires in ISO 8601 format
|
|
430
|
+
|
|
431
|
+
labels: A hash table of label names and values that apply to the insight silence
|
|
432
|
+
|
|
433
|
+
extra_headers: Send extra headers
|
|
434
|
+
|
|
435
|
+
extra_query: Add additional query parameters to the request
|
|
436
|
+
|
|
437
|
+
extra_body: Add additional JSON properties to the request
|
|
438
|
+
|
|
439
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
440
|
+
"""
|
|
441
|
+
if not silence_id:
|
|
442
|
+
raise ValueError(f"Expected a non-empty value for `silence_id` but received {silence_id!r}")
|
|
443
|
+
return await self._patch(
|
|
444
|
+
f"/waap/v1/domains/{domain_id}/insight-silences/{silence_id}",
|
|
445
|
+
body=await async_maybe_transform(
|
|
446
|
+
{
|
|
447
|
+
"author": author,
|
|
448
|
+
"comment": comment,
|
|
449
|
+
"expire_at": expire_at,
|
|
450
|
+
"labels": labels,
|
|
451
|
+
},
|
|
452
|
+
insight_silence_update_params.InsightSilenceUpdateParams,
|
|
453
|
+
),
|
|
454
|
+
options=make_request_options(
|
|
455
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
456
|
+
),
|
|
457
|
+
cast_to=WaapInsightSilence,
|
|
458
|
+
)
|
|
459
|
+
|
|
460
|
+
def list(
|
|
461
|
+
self,
|
|
462
|
+
domain_id: int,
|
|
463
|
+
*,
|
|
464
|
+
id: Optional[List[str]] | NotGiven = NOT_GIVEN,
|
|
465
|
+
author: Optional[str] | NotGiven = NOT_GIVEN,
|
|
466
|
+
comment: Optional[str] | NotGiven = NOT_GIVEN,
|
|
467
|
+
insight_type: Optional[List[str]] | NotGiven = NOT_GIVEN,
|
|
468
|
+
limit: int | NotGiven = NOT_GIVEN,
|
|
469
|
+
offset: int | NotGiven = NOT_GIVEN,
|
|
470
|
+
ordering: WaapInsightSilenceSortBy | NotGiven = NOT_GIVEN,
|
|
471
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
472
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
473
|
+
extra_headers: Headers | None = None,
|
|
474
|
+
extra_query: Query | None = None,
|
|
475
|
+
extra_body: Body | None = None,
|
|
476
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
477
|
+
) -> AsyncPaginator[WaapInsightSilence, AsyncOffsetPage[WaapInsightSilence]]:
|
|
478
|
+
"""
|
|
479
|
+
Retrieve a list of insight silences for a specific domain
|
|
480
|
+
|
|
481
|
+
Args:
|
|
482
|
+
domain_id: The domain ID
|
|
483
|
+
|
|
484
|
+
id: The ID of the insight silence
|
|
485
|
+
|
|
486
|
+
author: The author of the insight silence
|
|
487
|
+
|
|
488
|
+
comment: The comment of the insight silence
|
|
489
|
+
|
|
490
|
+
insight_type: The type of the insight silence
|
|
491
|
+
|
|
492
|
+
limit: Number of items to return
|
|
493
|
+
|
|
494
|
+
offset: Number of items to skip
|
|
495
|
+
|
|
496
|
+
ordering: Sort the response by given field.
|
|
497
|
+
|
|
498
|
+
extra_headers: Send extra headers
|
|
499
|
+
|
|
500
|
+
extra_query: Add additional query parameters to the request
|
|
501
|
+
|
|
502
|
+
extra_body: Add additional JSON properties to the request
|
|
503
|
+
|
|
504
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
505
|
+
"""
|
|
506
|
+
return self._get_api_list(
|
|
507
|
+
f"/waap/v1/domains/{domain_id}/insight-silences",
|
|
508
|
+
page=AsyncOffsetPage[WaapInsightSilence],
|
|
509
|
+
options=make_request_options(
|
|
510
|
+
extra_headers=extra_headers,
|
|
511
|
+
extra_query=extra_query,
|
|
512
|
+
extra_body=extra_body,
|
|
513
|
+
timeout=timeout,
|
|
514
|
+
query=maybe_transform(
|
|
515
|
+
{
|
|
516
|
+
"id": id,
|
|
517
|
+
"author": author,
|
|
518
|
+
"comment": comment,
|
|
519
|
+
"insight_type": insight_type,
|
|
520
|
+
"limit": limit,
|
|
521
|
+
"offset": offset,
|
|
522
|
+
"ordering": ordering,
|
|
523
|
+
},
|
|
524
|
+
insight_silence_list_params.InsightSilenceListParams,
|
|
525
|
+
),
|
|
526
|
+
),
|
|
527
|
+
model=WaapInsightSilence,
|
|
528
|
+
)
|
|
529
|
+
|
|
530
|
+
async def delete(
|
|
531
|
+
self,
|
|
532
|
+
silence_id: str,
|
|
533
|
+
*,
|
|
534
|
+
domain_id: int,
|
|
535
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
536
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
537
|
+
extra_headers: Headers | None = None,
|
|
538
|
+
extra_query: Query | None = None,
|
|
539
|
+
extra_body: Body | None = None,
|
|
540
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
541
|
+
) -> None:
|
|
542
|
+
"""
|
|
543
|
+
Delete an insight silence for a specific domain.
|
|
544
|
+
|
|
545
|
+
Args:
|
|
546
|
+
domain_id: The domain ID
|
|
547
|
+
|
|
548
|
+
silence_id: A generated unique identifier for the silence
|
|
549
|
+
|
|
550
|
+
extra_headers: Send extra headers
|
|
551
|
+
|
|
552
|
+
extra_query: Add additional query parameters to the request
|
|
553
|
+
|
|
554
|
+
extra_body: Add additional JSON properties to the request
|
|
555
|
+
|
|
556
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
557
|
+
"""
|
|
558
|
+
if not silence_id:
|
|
559
|
+
raise ValueError(f"Expected a non-empty value for `silence_id` but received {silence_id!r}")
|
|
560
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
561
|
+
return await self._delete(
|
|
562
|
+
f"/waap/v1/domains/{domain_id}/insight-silences/{silence_id}",
|
|
563
|
+
options=make_request_options(
|
|
564
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
565
|
+
),
|
|
566
|
+
cast_to=NoneType,
|
|
567
|
+
)
|
|
568
|
+
|
|
569
|
+
async def get(
|
|
570
|
+
self,
|
|
571
|
+
silence_id: str,
|
|
572
|
+
*,
|
|
573
|
+
domain_id: int,
|
|
574
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
575
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
576
|
+
extra_headers: Headers | None = None,
|
|
577
|
+
extra_query: Query | None = None,
|
|
578
|
+
extra_body: Body | None = None,
|
|
579
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
580
|
+
) -> WaapInsightSilence:
|
|
581
|
+
"""
|
|
582
|
+
Retrieve a specific insight silence for a specific domain
|
|
583
|
+
|
|
584
|
+
Args:
|
|
585
|
+
domain_id: The domain ID
|
|
586
|
+
|
|
587
|
+
silence_id: A generated unique identifier for the silence
|
|
588
|
+
|
|
589
|
+
extra_headers: Send extra headers
|
|
590
|
+
|
|
591
|
+
extra_query: Add additional query parameters to the request
|
|
592
|
+
|
|
593
|
+
extra_body: Add additional JSON properties to the request
|
|
594
|
+
|
|
595
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
596
|
+
"""
|
|
597
|
+
if not silence_id:
|
|
598
|
+
raise ValueError(f"Expected a non-empty value for `silence_id` but received {silence_id!r}")
|
|
599
|
+
return await self._get(
|
|
600
|
+
f"/waap/v1/domains/{domain_id}/insight-silences/{silence_id}",
|
|
601
|
+
options=make_request_options(
|
|
602
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
603
|
+
),
|
|
604
|
+
cast_to=WaapInsightSilence,
|
|
605
|
+
)
|
|
606
|
+
|
|
607
|
+
|
|
608
|
+
class InsightSilencesResourceWithRawResponse:
|
|
609
|
+
def __init__(self, insight_silences: InsightSilencesResource) -> None:
|
|
610
|
+
self._insight_silences = insight_silences
|
|
611
|
+
|
|
612
|
+
self.create = to_raw_response_wrapper(
|
|
613
|
+
insight_silences.create,
|
|
614
|
+
)
|
|
615
|
+
self.update = to_raw_response_wrapper(
|
|
616
|
+
insight_silences.update,
|
|
617
|
+
)
|
|
618
|
+
self.list = to_raw_response_wrapper(
|
|
619
|
+
insight_silences.list,
|
|
620
|
+
)
|
|
621
|
+
self.delete = to_raw_response_wrapper(
|
|
622
|
+
insight_silences.delete,
|
|
623
|
+
)
|
|
624
|
+
self.get = to_raw_response_wrapper(
|
|
625
|
+
insight_silences.get,
|
|
626
|
+
)
|
|
627
|
+
|
|
628
|
+
|
|
629
|
+
class AsyncInsightSilencesResourceWithRawResponse:
|
|
630
|
+
def __init__(self, insight_silences: AsyncInsightSilencesResource) -> None:
|
|
631
|
+
self._insight_silences = insight_silences
|
|
632
|
+
|
|
633
|
+
self.create = async_to_raw_response_wrapper(
|
|
634
|
+
insight_silences.create,
|
|
635
|
+
)
|
|
636
|
+
self.update = async_to_raw_response_wrapper(
|
|
637
|
+
insight_silences.update,
|
|
638
|
+
)
|
|
639
|
+
self.list = async_to_raw_response_wrapper(
|
|
640
|
+
insight_silences.list,
|
|
641
|
+
)
|
|
642
|
+
self.delete = async_to_raw_response_wrapper(
|
|
643
|
+
insight_silences.delete,
|
|
644
|
+
)
|
|
645
|
+
self.get = async_to_raw_response_wrapper(
|
|
646
|
+
insight_silences.get,
|
|
647
|
+
)
|
|
648
|
+
|
|
649
|
+
|
|
650
|
+
class InsightSilencesResourceWithStreamingResponse:
|
|
651
|
+
def __init__(self, insight_silences: InsightSilencesResource) -> None:
|
|
652
|
+
self._insight_silences = insight_silences
|
|
653
|
+
|
|
654
|
+
self.create = to_streamed_response_wrapper(
|
|
655
|
+
insight_silences.create,
|
|
656
|
+
)
|
|
657
|
+
self.update = to_streamed_response_wrapper(
|
|
658
|
+
insight_silences.update,
|
|
659
|
+
)
|
|
660
|
+
self.list = to_streamed_response_wrapper(
|
|
661
|
+
insight_silences.list,
|
|
662
|
+
)
|
|
663
|
+
self.delete = to_streamed_response_wrapper(
|
|
664
|
+
insight_silences.delete,
|
|
665
|
+
)
|
|
666
|
+
self.get = to_streamed_response_wrapper(
|
|
667
|
+
insight_silences.get,
|
|
668
|
+
)
|
|
669
|
+
|
|
670
|
+
|
|
671
|
+
class AsyncInsightSilencesResourceWithStreamingResponse:
|
|
672
|
+
def __init__(self, insight_silences: AsyncInsightSilencesResource) -> None:
|
|
673
|
+
self._insight_silences = insight_silences
|
|
674
|
+
|
|
675
|
+
self.create = async_to_streamed_response_wrapper(
|
|
676
|
+
insight_silences.create,
|
|
677
|
+
)
|
|
678
|
+
self.update = async_to_streamed_response_wrapper(
|
|
679
|
+
insight_silences.update,
|
|
680
|
+
)
|
|
681
|
+
self.list = async_to_streamed_response_wrapper(
|
|
682
|
+
insight_silences.list,
|
|
683
|
+
)
|
|
684
|
+
self.delete = async_to_streamed_response_wrapper(
|
|
685
|
+
insight_silences.delete,
|
|
686
|
+
)
|
|
687
|
+
self.get = async_to_streamed_response_wrapper(
|
|
688
|
+
insight_silences.get,
|
|
689
|
+
)
|