gcore 0.13.0__py3-none-any.whl → 0.14.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 +3 -1
- gcore/_base_client.py +9 -9
- gcore/_client.py +25 -10
- gcore/_models.py +10 -4
- gcore/_qs.py +7 -7
- gcore/_types.py +18 -11
- gcore/_utils/_transform.py +2 -2
- gcore/_utils/_utils.py +4 -4
- gcore/_version.py +1 -1
- gcore/pagination.py +137 -0
- gcore/resources/__init__.py +14 -0
- gcore/resources/cdn/__init__.py +201 -0
- gcore/resources/cdn/audit_log.py +406 -0
- gcore/resources/cdn/cdn.py +957 -0
- gcore/resources/cdn/certificates.py +1062 -0
- gcore/resources/cdn/ip_ranges.py +224 -0
- gcore/resources/cdn/logs/__init__.py +33 -0
- gcore/resources/cdn/logs/logs.py +1424 -0
- gcore/resources/cdn/logs/settings.py +1081 -0
- gcore/resources/cdn/logs_uploader/__init__.py +61 -0
- gcore/resources/cdn/logs_uploader/configs.py +868 -0
- gcore/resources/cdn/logs_uploader/logs_uploader.py +166 -0
- gcore/resources/cdn/logs_uploader/policies.py +1060 -0
- gcore/resources/cdn/logs_uploader/targets.py +811 -0
- gcore/resources/cdn/metrics.py +419 -0
- gcore/resources/cdn/network_capacity.py +139 -0
- gcore/resources/cdn/origin_groups.py +1496 -0
- gcore/resources/cdn/resources/__init__.py +47 -0
- gcore/resources/cdn/resources/resources.py +2060 -0
- gcore/resources/cdn/resources/rules.py +1027 -0
- gcore/resources/cdn/resources/shield.py +259 -0
- gcore/resources/cdn/rule_templates.py +883 -0
- gcore/resources/cdn/shields.py +139 -0
- gcore/resources/cdn/statistics.py +1408 -0
- gcore/resources/cdn/trusted_ca_certificates.py +592 -0
- gcore/resources/cloud/audit_logs.py +33 -29
- gcore/resources/cloud/baremetal/flavors.py +21 -17
- gcore/resources/cloud/baremetal/images.py +19 -15
- gcore/resources/cloud/baremetal/servers.py +141 -119
- gcore/resources/cloud/billing_reservations.py +41 -33
- gcore/resources/cloud/cloud.py +24 -0
- gcore/resources/cloud/cost_reports.py +149 -119
- gcore/resources/cloud/file_shares/access_rules.py +25 -13
- gcore/resources/cloud/file_shares/file_shares.py +107 -71
- gcore/resources/cloud/floating_ips.py +101 -59
- gcore/resources/cloud/gpu_baremetal_clusters/flavors.py +13 -9
- gcore/resources/cloud/gpu_baremetal_clusters/gpu_baremetal_clusters.py +275 -65
- gcore/resources/cloud/gpu_baremetal_clusters/images.py +69 -53
- gcore/resources/cloud/gpu_baremetal_clusters/interfaces.py +9 -5
- gcore/resources/cloud/gpu_baremetal_clusters/servers.py +151 -127
- gcore/resources/cloud/inference/api_keys.py +51 -31
- gcore/resources/cloud/inference/applications/deployments.py +49 -31
- gcore/resources/cloud/inference/applications/templates.py +17 -9
- gcore/resources/cloud/inference/deployments/deployments.py +171 -139
- gcore/resources/cloud/inference/deployments/logs.py +17 -13
- gcore/resources/cloud/inference/flavors.py +21 -13
- gcore/resources/cloud/inference/inference.py +9 -5
- gcore/resources/cloud/inference/registry_credentials.py +45 -25
- gcore/resources/cloud/inference/secrets.py +45 -25
- gcore/resources/cloud/instances/flavors.py +17 -13
- gcore/resources/cloud/instances/images.py +153 -129
- gcore/resources/cloud/instances/instances.py +287 -213
- gcore/resources/cloud/instances/interfaces.py +165 -161
- gcore/resources/cloud/instances/metrics.py +9 -5
- gcore/resources/cloud/ip_ranges.py +25 -15
- gcore/resources/cloud/k8s/clusters/clusters.py +151 -87
- gcore/resources/cloud/k8s/clusters/nodes.py +19 -11
- gcore/resources/cloud/k8s/clusters/pools/nodes.py +19 -11
- gcore/resources/cloud/k8s/clusters/pools/pools.py +83 -59
- gcore/resources/cloud/k8s/flavors.py +13 -9
- gcore/resources/cloud/k8s/k8s.py +9 -5
- gcore/resources/cloud/load_balancers/flavors.py +11 -7
- gcore/resources/cloud/load_balancers/l7_policies/l7_policies.py +103 -83
- gcore/resources/cloud/load_balancers/l7_policies/rules.py +77 -57
- gcore/resources/cloud/load_balancers/listeners.py +125 -105
- gcore/resources/cloud/load_balancers/load_balancers.py +155 -123
- gcore/resources/cloud/load_balancers/metrics.py +9 -5
- gcore/resources/cloud/load_balancers/pools/health_monitors.py +25 -17
- gcore/resources/cloud/load_balancers/pools/members.py +31 -23
- gcore/resources/cloud/load_balancers/pools/pools.py +155 -129
- gcore/resources/cloud/load_balancers/statuses.py +17 -9
- gcore/resources/cloud/networks/networks.py +79 -55
- gcore/resources/cloud/networks/routers.py +75 -47
- gcore/resources/cloud/networks/subnets.py +105 -81
- gcore/resources/cloud/placement_groups.py +33 -17
- gcore/resources/cloud/projects.py +53 -41
- gcore/resources/cloud/quotas/quotas.py +25 -13
- gcore/resources/cloud/quotas/requests.py +41 -25
- gcore/resources/cloud/regions.py +25 -23
- gcore/resources/cloud/registries/artifacts.py +17 -9
- gcore/resources/cloud/registries/registries.py +55 -29
- gcore/resources/cloud/registries/repositories.py +17 -9
- gcore/resources/cloud/registries/tags.py +9 -5
- gcore/resources/cloud/registries/users.py +65 -35
- gcore/resources/cloud/reserved_fixed_ips/reserved_fixed_ips.py +123 -107
- gcore/resources/cloud/reserved_fixed_ips/vip.py +45 -25
- gcore/resources/cloud/secrets.py +43 -27
- gcore/resources/cloud/security_groups/rules.py +55 -43
- gcore/resources/cloud/security_groups/security_groups.py +79 -47
- gcore/resources/cloud/ssh_keys.py +51 -31
- gcore/resources/cloud/tasks.py +57 -45
- gcore/resources/cloud/usage_reports.py +27 -23
- gcore/resources/cloud/users/role_assignments.py +49 -33
- gcore/resources/cloud/volumes.py +237 -201
- gcore/resources/dns/dns.py +17 -13
- gcore/resources/dns/locations.py +29 -17
- gcore/resources/dns/metrics.py +13 -9
- gcore/resources/dns/pickers/pickers.py +5 -5
- gcore/resources/dns/pickers/presets.py +9 -5
- gcore/resources/dns/zones/dnssec.py +19 -11
- gcore/resources/dns/zones/rrsets.py +149 -91
- gcore/resources/dns/zones/zones.py +245 -187
- gcore/resources/fastedge/apps/apps.py +105 -89
- gcore/resources/fastedge/apps/logs.py +25 -21
- gcore/resources/fastedge/binaries.py +33 -17
- gcore/resources/fastedge/fastedge.py +5 -5
- gcore/resources/fastedge/kv_stores.py +43 -31
- gcore/resources/fastedge/secrets.py +69 -45
- gcore/resources/fastedge/statistics.py +25 -17
- gcore/resources/fastedge/templates.py +59 -39
- gcore/resources/iam/api_tokens.py +43 -27
- gcore/resources/iam/iam.py +5 -5
- gcore/resources/iam/users.py +97 -65
- gcore/resources/security/bgp_announces.py +27 -19
- gcore/resources/security/events.py +23 -19
- gcore/resources/security/profile_templates.py +9 -5
- gcore/resources/security/profiles.py +69 -45
- gcore/resources/storage/buckets/buckets.py +37 -25
- gcore/resources/storage/buckets/cors.py +19 -11
- gcore/resources/storage/buckets/lifecycle.py +19 -11
- gcore/resources/storage/buckets/policy.py +25 -13
- gcore/resources/storage/credentials.py +19 -15
- gcore/resources/storage/locations.py +13 -9
- gcore/resources/storage/statistics.py +39 -31
- gcore/resources/storage/storage.py +105 -69
- gcore/resources/streaming/ai_tasks.py +307 -197
- gcore/resources/streaming/broadcasts.py +63 -35
- gcore/resources/streaming/directories.py +65 -39
- gcore/resources/streaming/players.py +47 -31
- gcore/resources/streaming/playlists.py +189 -123
- gcore/resources/streaming/quality_sets.py +69 -39
- gcore/resources/streaming/restreams.py +47 -27
- gcore/resources/streaming/statistics.py +613 -407
- gcore/resources/streaming/streams/overlays.py +107 -67
- gcore/resources/streaming/streams/streams.py +403 -263
- gcore/resources/streaming/videos/subtitles.py +131 -75
- gcore/resources/streaming/videos/videos.py +429 -279
- gcore/resources/waap/advanced_rules.py +9 -5
- gcore/resources/waap/custom_page_sets.py +99 -75
- gcore/resources/waap/domains/advanced_rules.py +157 -99
- gcore/resources/waap/domains/api_discovery.py +71 -47
- gcore/resources/waap/domains/api_path_groups.py +9 -5
- gcore/resources/waap/domains/api_paths.py +79 -83
- gcore/resources/waap/domains/custom_rules.py +89 -59
- gcore/resources/waap/domains/domains.py +59 -41
- gcore/resources/waap/domains/firewall_rules.py +83 -55
- gcore/resources/waap/domains/insight_silences.py +59 -39
- gcore/resources/waap/domains/insights.py +39 -27
- gcore/resources/waap/domains/settings.py +21 -13
- gcore/resources/waap/domains/statistics.py +99 -75
- gcore/resources/waap/insights.py +23 -21
- gcore/resources/waap/ip_info/ip_info.py +65 -33
- gcore/resources/waap/ip_info/metrics.py +11 -7
- gcore/resources/waap/organizations.py +17 -13
- gcore/resources/waap/statistics.py +9 -5
- gcore/resources/waap/tags.py +17 -17
- gcore/resources/waap/waap.py +5 -5
- gcore/types/cdn/__init__.py +80 -0
- gcore/types/cdn/audit_log_list_params.py +73 -0
- gcore/types/cdn/ca_certificate.py +53 -0
- gcore/types/cdn/ca_certificate_list.py +10 -0
- gcore/types/cdn/cdn_account.py +86 -0
- gcore/types/cdn/cdn_account_limits.py +27 -0
- gcore/types/cdn/cdn_audit_log_entry.py +66 -0
- gcore/types/cdn/cdn_available_features.py +46 -0
- gcore/types/cdn/cdn_list_purge_statuses_params.py +67 -0
- gcore/types/cdn/cdn_log_entry.py +70 -0
- gcore/types/cdn/cdn_metrics.py +22 -0
- gcore/types/cdn/cdn_metrics_groups.py +13 -0
- gcore/types/cdn/cdn_metrics_values.py +19 -0
- gcore/types/cdn/cdn_resource.py +1977 -0
- gcore/types/cdn/cdn_resource_list.py +10 -0
- gcore/types/cdn/cdn_update_account_params.py +15 -0
- gcore/types/cdn/certificate_create_params.py +51 -0
- gcore/types/cdn/certificate_get_status_params.py +14 -0
- gcore/types/cdn/certificate_list_params.py +29 -0
- gcore/types/cdn/certificate_replace_params.py +39 -0
- gcore/types/cdn/log_download_params.py +279 -0
- gcore/types/cdn/log_list_params.py +273 -0
- gcore/types/cdn/logs/__init__.py +7 -0
- gcore/types/cdn/logs/log_settings.py +172 -0
- gcore/types/cdn/logs/setting_create_params.py +200 -0
- gcore/types/cdn/logs/setting_update_params.py +200 -0
- gcore/types/cdn/logs_aggregated_stats.py +23 -0
- gcore/types/cdn/logs_uploader/__init__.py +23 -0
- gcore/types/cdn/logs_uploader/config_create_params.py +32 -0
- gcore/types/cdn/logs_uploader/config_list_params.py +16 -0
- gcore/types/cdn/logs_uploader/config_replace_params.py +32 -0
- gcore/types/cdn/logs_uploader/config_update_params.py +32 -0
- gcore/types/cdn/logs_uploader/logs_uploader_config.py +51 -0
- gcore/types/cdn/logs_uploader/logs_uploader_config_list.py +10 -0
- gcore/types/cdn/logs_uploader/logs_uploader_policy.py +73 -0
- gcore/types/cdn/logs_uploader/logs_uploader_policy_list.py +10 -0
- gcore/types/cdn/logs_uploader/logs_uploader_target.py +236 -0
- gcore/types/cdn/logs_uploader/logs_uploader_target_list.py +10 -0
- gcore/types/cdn/logs_uploader/policy_create_params.py +61 -0
- gcore/types/cdn/logs_uploader/policy_list_fields_response.py +8 -0
- gcore/types/cdn/logs_uploader/policy_list_params.py +16 -0
- gcore/types/cdn/logs_uploader/policy_replace_params.py +61 -0
- gcore/types/cdn/logs_uploader/policy_update_params.py +61 -0
- gcore/types/cdn/logs_uploader/target_create_params.py +249 -0
- gcore/types/cdn/logs_uploader/target_list_params.py +16 -0
- gcore/types/cdn/logs_uploader/target_replace_params.py +249 -0
- gcore/types/cdn/logs_uploader/target_update_params.py +249 -0
- gcore/types/cdn/logs_uploader_validation.py +23 -0
- gcore/types/cdn/metric_list_params.py +168 -0
- gcore/types/cdn/network_capacity.py +22 -0
- gcore/types/cdn/origin_group_create_params.py +184 -0
- gcore/types/cdn/origin_group_list_params.py +24 -0
- gcore/types/cdn/origin_group_replace_params.py +190 -0
- gcore/types/cdn/origin_group_update_params.py +190 -0
- gcore/types/cdn/origin_groups.py +212 -0
- gcore/types/cdn/origin_groups_list.py +10 -0
- gcore/types/cdn/public_ip_list.py +15 -0
- gcore/types/cdn/public_network_list.py +15 -0
- gcore/types/cdn/purge_status.py +55 -0
- gcore/types/cdn/resource_aggregated_stats.py +80 -0
- gcore/types/cdn/resource_create_params.py +1825 -0
- gcore/types/cdn/resource_list_params.py +107 -0
- gcore/types/cdn/resource_prefetch_params.py +17 -0
- gcore/types/cdn/resource_purge_params.py +71 -0
- gcore/types/cdn/resource_replace_params.py +1803 -0
- gcore/types/cdn/resource_update_params.py +1794 -0
- gcore/types/cdn/resource_usage_stats.py +111 -0
- gcore/types/cdn/resources/__init__.py +11 -0
- gcore/types/cdn/resources/cdn_resource_rule.py +1695 -0
- gcore/types/cdn/resources/origin_shielding.py +15 -0
- gcore/types/cdn/resources/rule_create_params.py +1652 -0
- gcore/types/cdn/resources/rule_list_response.py +10 -0
- gcore/types/cdn/resources/rule_replace_params.py +1654 -0
- gcore/types/cdn/resources/rule_update_params.py +1654 -0
- gcore/types/cdn/resources/shield_replace_params.py +16 -0
- gcore/types/cdn/rule_template.py +1666 -0
- gcore/types/cdn/rule_template_create_params.py +1636 -0
- gcore/types/cdn/rule_template_list.py +10 -0
- gcore/types/cdn/rule_template_replace_params.py +1636 -0
- gcore/types/cdn/rule_template_update_params.py +1636 -0
- gcore/types/cdn/shield_aggregated_stats.py +23 -0
- gcore/types/cdn/shield_list_response.py +25 -0
- gcore/types/cdn/ssl_detail.py +62 -0
- gcore/types/cdn/ssl_detail_list.py +10 -0
- gcore/types/cdn/ssl_request_status.py +135 -0
- gcore/types/cdn/statistic_get_logs_usage_aggregated_params.py +42 -0
- gcore/types/cdn/statistic_get_logs_usage_series_params.py +35 -0
- gcore/types/cdn/statistic_get_resource_usage_aggregated_params.py +151 -0
- gcore/types/cdn/statistic_get_resource_usage_series_params.py +131 -0
- gcore/types/cdn/statistic_get_shield_usage_aggregated_params.py +42 -0
- gcore/types/cdn/statistic_get_shield_usage_series_params.py +25 -0
- gcore/types/cdn/trusted_ca_certificate_create_params.py +23 -0
- gcore/types/cdn/trusted_ca_certificate_list_params.py +29 -0
- gcore/types/cdn/trusted_ca_certificate_replace_params.py +15 -0
- gcore/types/cdn/usage_series_stats.py +31 -0
- gcore/types/cloud/__init__.py +1 -0
- gcore/types/cloud/file_share.py +4 -0
- gcore/types/cloud/file_share_create_params.py +20 -0
- gcore/types/cloud/file_share_update_params.py +40 -3
- gcore/types/cloud/floating_ip_update_params.py +3 -1
- gcore/types/cloud/gpu_baremetal_cluster_action_params.py +46 -0
- gcore/types/cloud/inference/inference_deployment.py +3 -1
- gcore/types/cloud/instance_create_params.py +3 -1
- gcore/types/cloud/k8s/cluster_create_params.py +46 -4
- gcore/types/cloud/k8s/cluster_update_params.py +60 -6
- gcore/types/cloud/k8s/clusters/pool_update_params.py +1 -1
- gcore/types/cloud/k8s/k8s_cluster.py +40 -3
- gcore/types/cloud/load_balancer_update_params.py +3 -1
- gcore/types/cloud/network_update_params.py +3 -1
- gcore/types/cloud/networks/subnet_update_params.py +3 -1
- gcore/types/cloud/registries/user_create_multiple_params.py +5 -3
- gcore/types/cloud/registries/user_create_params.py +5 -3
- gcore/types/cloud/registry_create_params.py +5 -3
- gcore/types/cloud/security_group_update_params.py +3 -1
- gcore/types/cloud/ssh_key_created.py +6 -3
- gcore/types/cloud/volume_update_params.py +3 -1
- gcore/types/dns/zone_get_statistics_params.py +12 -9
- gcore/types/dns/zone_get_statistics_response.py +3 -1
- gcore/types/dns/zone_import_params.py +21 -15
- gcore/types/dns/zones/dns_output_rrset.py +7 -3
- gcore/types/iam/account_overview.py +7 -2
- gcore/types/iam/user.py +7 -2
- gcore/types/iam/user_detailed.py +7 -2
- gcore/types/iam/user_invite_params.py +4 -1
- gcore/types/iam/user_update.py +7 -2
- gcore/types/iam/user_update_params.py +7 -2
- gcore/types/streaming/ai_contentmoderation_hardnudity.py +6 -4
- gcore/types/streaming/ai_contentmoderation_nsfw.py +6 -4
- gcore/types/streaming/ai_contentmoderation_softnudity.py +6 -4
- gcore/types/streaming/ai_contentmoderation_sport.py +6 -4
- gcore/types/streaming/ai_task.py +20 -11
- gcore/types/streaming/ai_task_create_params.py +20 -11
- gcore/types/streaming/ai_task_get_response.py +5 -4
- gcore/types/streaming/ai_task_list_params.py +11 -5
- gcore/types/streaming/clip.py +33 -22
- gcore/types/streaming/create_video_param.py +75 -43
- gcore/types/streaming/playlist.py +7 -5
- gcore/types/streaming/playlist_create_params.py +7 -5
- gcore/types/streaming/playlist_update_params.py +7 -5
- gcore/types/streaming/playlist_video.py +75 -43
- gcore/types/streaming/statistic_get_unique_viewers_cdn_params.py +7 -4
- gcore/types/streaming/stream.py +207 -136
- gcore/types/streaming/stream_create_clip_params.py +33 -22
- gcore/types/streaming/stream_create_params.py +41 -24
- gcore/types/streaming/stream_update_params.py +41 -24
- gcore/types/streaming/video.py +138 -76
- gcore/types/streaming/video_list_params.py +4 -2
- gcore/types/streaming/video_update_params.py +75 -43
- gcore/types/waap/domain_update_params.py +2 -2
- gcore/types/waap/domains/advanced_rule_create_params.py +26 -18
- gcore/types/waap/domains/advanced_rule_list_params.py +10 -7
- gcore/types/waap/domains/advanced_rule_update_params.py +22 -17
- gcore/types/waap/domains/api_path_create_params.py +0 -3
- gcore/types/waap/domains/api_path_update_params.py +1 -3
- gcore/types/waap/domains/custom_rule_create_params.py +36 -35
- gcore/types/waap/domains/custom_rule_update_params.py +31 -33
- gcore/types/waap/domains/firewall_rule_create_params.py +6 -6
- gcore/types/waap/domains/firewall_rule_update_params.py +5 -5
- gcore/types/waap/domains/waap_advanced_rule.py +17 -9
- gcore/types/waap/domains/waap_custom_rule.py +5 -2
- gcore/types/waap/domains/waap_firewall_rule.py +1 -1
- gcore/types/waap/domains/waap_insight.py +1 -1
- gcore/types/waap/insight_list_types_params.py +1 -1
- {gcore-0.13.0.dist-info → gcore-0.14.0.dist-info}/METADATA +1 -1
- {gcore-0.13.0.dist-info → gcore-0.14.0.dist-info}/RECORD +334 -214
- {gcore-0.13.0.dist-info → gcore-0.14.0.dist-info}/WHEEL +0 -0
- {gcore-0.13.0.dist-info → gcore-0.14.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,1424 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import httpx
|
|
6
|
+
|
|
7
|
+
from .settings import (
|
|
8
|
+
SettingsResource,
|
|
9
|
+
AsyncSettingsResource,
|
|
10
|
+
SettingsResourceWithRawResponse,
|
|
11
|
+
AsyncSettingsResourceWithRawResponse,
|
|
12
|
+
SettingsResourceWithStreamingResponse,
|
|
13
|
+
AsyncSettingsResourceWithStreamingResponse,
|
|
14
|
+
)
|
|
15
|
+
from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
|
|
16
|
+
from ...._utils import maybe_transform, async_maybe_transform
|
|
17
|
+
from ...._compat import cached_property
|
|
18
|
+
from ...._resource import SyncAPIResource, AsyncAPIResource
|
|
19
|
+
from ...._response import (
|
|
20
|
+
BinaryAPIResponse,
|
|
21
|
+
AsyncBinaryAPIResponse,
|
|
22
|
+
StreamedBinaryAPIResponse,
|
|
23
|
+
AsyncStreamedBinaryAPIResponse,
|
|
24
|
+
to_raw_response_wrapper,
|
|
25
|
+
to_streamed_response_wrapper,
|
|
26
|
+
async_to_raw_response_wrapper,
|
|
27
|
+
to_custom_raw_response_wrapper,
|
|
28
|
+
async_to_streamed_response_wrapper,
|
|
29
|
+
to_custom_streamed_response_wrapper,
|
|
30
|
+
async_to_custom_raw_response_wrapper,
|
|
31
|
+
async_to_custom_streamed_response_wrapper,
|
|
32
|
+
)
|
|
33
|
+
from ....types.cdn import log_list_params, log_download_params
|
|
34
|
+
from ....pagination import SyncOffsetPageCdnLogs, AsyncOffsetPageCdnLogs
|
|
35
|
+
from ...._base_client import AsyncPaginator, make_request_options
|
|
36
|
+
from ....types.cdn.cdn_log_entry import Data
|
|
37
|
+
|
|
38
|
+
__all__ = ["LogsResource", "AsyncLogsResource"]
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
class LogsResource(SyncAPIResource):
|
|
42
|
+
@cached_property
|
|
43
|
+
def settings(self) -> SettingsResource:
|
|
44
|
+
return SettingsResource(self._client)
|
|
45
|
+
|
|
46
|
+
@cached_property
|
|
47
|
+
def with_raw_response(self) -> LogsResourceWithRawResponse:
|
|
48
|
+
"""
|
|
49
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
50
|
+
the raw response object instead of the parsed content.
|
|
51
|
+
|
|
52
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
53
|
+
"""
|
|
54
|
+
return LogsResourceWithRawResponse(self)
|
|
55
|
+
|
|
56
|
+
@cached_property
|
|
57
|
+
def with_streaming_response(self) -> LogsResourceWithStreamingResponse:
|
|
58
|
+
"""
|
|
59
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
60
|
+
|
|
61
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
62
|
+
"""
|
|
63
|
+
return LogsResourceWithStreamingResponse(self)
|
|
64
|
+
|
|
65
|
+
def list(
|
|
66
|
+
self,
|
|
67
|
+
*,
|
|
68
|
+
from_: str,
|
|
69
|
+
to: str,
|
|
70
|
+
cache_status_eq: str | Omit = omit,
|
|
71
|
+
cache_status_in: str | Omit = omit,
|
|
72
|
+
cache_status_ne: str | Omit = omit,
|
|
73
|
+
cache_status_not_in: str | Omit = omit,
|
|
74
|
+
client_ip_eq: str | Omit = omit,
|
|
75
|
+
client_ip_in: str | Omit = omit,
|
|
76
|
+
client_ip_ne: str | Omit = omit,
|
|
77
|
+
client_ip_not_in: str | Omit = omit,
|
|
78
|
+
cname_contains: str | Omit = omit,
|
|
79
|
+
cname_eq: str | Omit = omit,
|
|
80
|
+
cname_in: str | Omit = omit,
|
|
81
|
+
cname_ne: str | Omit = omit,
|
|
82
|
+
cname_not_in: str | Omit = omit,
|
|
83
|
+
datacenter_eq: str | Omit = omit,
|
|
84
|
+
datacenter_in: str | Omit = omit,
|
|
85
|
+
datacenter_ne: str | Omit = omit,
|
|
86
|
+
datacenter_not_in: str | Omit = omit,
|
|
87
|
+
fields: str | Omit = omit,
|
|
88
|
+
limit: int | Omit = omit,
|
|
89
|
+
method_eq: str | Omit = omit,
|
|
90
|
+
method_in: str | Omit = omit,
|
|
91
|
+
method_ne: str | Omit = omit,
|
|
92
|
+
method_not_in: str | Omit = omit,
|
|
93
|
+
offset: int | Omit = omit,
|
|
94
|
+
ordering: str | Omit = omit,
|
|
95
|
+
resource_id_eq: int | Omit = omit,
|
|
96
|
+
resource_id_gt: int | Omit = omit,
|
|
97
|
+
resource_id_gte: int | Omit = omit,
|
|
98
|
+
resource_id_in: str | Omit = omit,
|
|
99
|
+
resource_id_lt: int | Omit = omit,
|
|
100
|
+
resource_id_lte: int | Omit = omit,
|
|
101
|
+
resource_id_ne: int | Omit = omit,
|
|
102
|
+
resource_id_not_in: str | Omit = omit,
|
|
103
|
+
size_eq: int | Omit = omit,
|
|
104
|
+
size_gt: int | Omit = omit,
|
|
105
|
+
size_gte: int | Omit = omit,
|
|
106
|
+
size_in: str | Omit = omit,
|
|
107
|
+
size_lt: int | Omit = omit,
|
|
108
|
+
size_lte: int | Omit = omit,
|
|
109
|
+
size_ne: int | Omit = omit,
|
|
110
|
+
size_not_in: str | Omit = omit,
|
|
111
|
+
status_eq: int | Omit = omit,
|
|
112
|
+
status_gt: int | Omit = omit,
|
|
113
|
+
status_gte: int | Omit = omit,
|
|
114
|
+
status_in: str | Omit = omit,
|
|
115
|
+
status_lt: int | Omit = omit,
|
|
116
|
+
status_lte: int | Omit = omit,
|
|
117
|
+
status_ne: int | Omit = omit,
|
|
118
|
+
status_not_in: str | Omit = omit,
|
|
119
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
120
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
121
|
+
extra_headers: Headers | None = None,
|
|
122
|
+
extra_query: Query | None = None,
|
|
123
|
+
extra_body: Body | None = None,
|
|
124
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
125
|
+
) -> SyncOffsetPageCdnLogs[Data]:
|
|
126
|
+
"""
|
|
127
|
+
Get CDN logs for up to 3 days starting today.
|
|
128
|
+
|
|
129
|
+
You can filter logs using query parameters by client IP, CDN resource, date,
|
|
130
|
+
path and etc.
|
|
131
|
+
|
|
132
|
+
To filter the CDN logs by 2xx status codes, use:
|
|
133
|
+
|
|
134
|
+
- &`status__gte`=200&`status__lt`=300
|
|
135
|
+
|
|
136
|
+
Args:
|
|
137
|
+
from_: Start date and time of the requested time period (ISO 8601/RFC 3339 format,
|
|
138
|
+
UTC.)
|
|
139
|
+
|
|
140
|
+
Difference between "from" and "to" cannot exceed 6 hours.
|
|
141
|
+
|
|
142
|
+
Examples:
|
|
143
|
+
|
|
144
|
+
- &from=2021-06-14T00:00:00Z
|
|
145
|
+
- &from=2021-06-14T00:00:00.000Z
|
|
146
|
+
|
|
147
|
+
to: End date and time of the requested time period (ISO 8601/RFC 3339 format, UTC.)
|
|
148
|
+
|
|
149
|
+
Difference between "from" and "to" cannot exceed 6 hours.
|
|
150
|
+
|
|
151
|
+
Examples:
|
|
152
|
+
|
|
153
|
+
- &to=2021-06-15T00:00:00Z
|
|
154
|
+
- &to=2021-06-15T00:00:00.000Z
|
|
155
|
+
|
|
156
|
+
cache_status_eq: Caching status. Possible values: 'MISS', 'BYPASS', 'EXPIRED', 'STALE',
|
|
157
|
+
'PENDING', 'UPDATING', 'REVALIDATED', 'HIT', '-'.
|
|
158
|
+
|
|
159
|
+
cache_status_in: List of caching statuses. Possible values: 'MISS', 'BYPASS', 'EXPIRED', 'STALE',
|
|
160
|
+
'PENDING', 'UPDATING', 'REVALIDATED', 'HIT', '-'. Values should be separated by
|
|
161
|
+
a comma.
|
|
162
|
+
|
|
163
|
+
cache_status_ne: Caching status not equal to the specified value. Possible values: 'MISS',
|
|
164
|
+
'BYPASS', 'EXPIRED', 'STALE', 'PENDING', 'UPDATING', 'REVALIDATED', 'HIT', '-'.
|
|
165
|
+
|
|
166
|
+
cache_status_not_in:
|
|
167
|
+
List of caching statuses not equal to the specified values. Possible values:
|
|
168
|
+
'MISS', 'BYPASS', 'EXPIRED', 'STALE', 'PENDING', 'UPDATING', 'REVALIDATED',
|
|
169
|
+
'HIT', '-'. Values should be separated by a comma.
|
|
170
|
+
|
|
171
|
+
client_ip_eq: IP address of the client who sent the request.
|
|
172
|
+
|
|
173
|
+
client_ip_in: List of IP addresses of the clients who sent the request.
|
|
174
|
+
|
|
175
|
+
client_ip_ne: IP address of the client who did not send the request.
|
|
176
|
+
|
|
177
|
+
client_ip_not_in: List of IP addresses of the clients who did not send the request.
|
|
178
|
+
|
|
179
|
+
cname_contains: Part of the custom domain of the requested CDN resource. Minimum length is 3
|
|
180
|
+
characters.
|
|
181
|
+
|
|
182
|
+
cname_eq: Custom domain of the requested CDN resource.
|
|
183
|
+
|
|
184
|
+
cname_in: List of custom domains of the requested CDN resource. Values should be separated
|
|
185
|
+
by a comma.
|
|
186
|
+
|
|
187
|
+
cname_ne: Custom domain of the requested CDN resource not equal to the specified value.
|
|
188
|
+
|
|
189
|
+
cname_not_in: List of custom domains of the requested CDN resource not equal to the specified
|
|
190
|
+
values. Values should be separated by a comma.
|
|
191
|
+
|
|
192
|
+
datacenter_eq: Data center where request was processed.
|
|
193
|
+
|
|
194
|
+
datacenter_in: List of data centers where request was processed. Values should be separated by
|
|
195
|
+
a comma.
|
|
196
|
+
|
|
197
|
+
datacenter_ne: Data center where request was not processed.
|
|
198
|
+
|
|
199
|
+
datacenter_not_in: List of data centers where request was not processed. Values should be separated
|
|
200
|
+
by a comma.
|
|
201
|
+
|
|
202
|
+
fields: A comma-separated list of returned fields.
|
|
203
|
+
|
|
204
|
+
Supported fields are presented in the responses section.
|
|
205
|
+
|
|
206
|
+
Example:
|
|
207
|
+
|
|
208
|
+
- &fields=timestamp,path,status
|
|
209
|
+
|
|
210
|
+
limit: Maximum number of log records in the response.
|
|
211
|
+
|
|
212
|
+
method_eq: Request HTTP method. Possible values: 'CONNECT', 'DELETE', 'GET', 'HEAD',
|
|
213
|
+
'OPTIONS', 'PATCH', 'POST', 'PUT', 'TRACE'.
|
|
214
|
+
|
|
215
|
+
method_in: Request HTTP method. Possible values: 'CONNECT', 'DELETE', 'GET', 'HEAD',
|
|
216
|
+
'OPTIONS', 'PATCH', 'POST', 'PUT', 'TRACE'. Values should be separated by a
|
|
217
|
+
comma.
|
|
218
|
+
|
|
219
|
+
method_ne: Request HTTP method. Possible values: 'CONNECT', 'DELETE', 'GET', 'HEAD',
|
|
220
|
+
'OPTIONS', 'PATCH', 'POST', 'PUT', 'TRACE'.
|
|
221
|
+
|
|
222
|
+
method_not_in: Request HTTP method. Possible values: 'CONNECT', 'DELETE', 'GET', 'HEAD',
|
|
223
|
+
'OPTIONS', 'PATCH', 'POST', 'PUT', 'TRACE'. Values should be separated by a
|
|
224
|
+
comma.
|
|
225
|
+
|
|
226
|
+
offset: Number of log records to skip starting from the beginning of the requested
|
|
227
|
+
period.
|
|
228
|
+
|
|
229
|
+
ordering: Sorting rules.
|
|
230
|
+
|
|
231
|
+
Possible values:
|
|
232
|
+
|
|
233
|
+
- **method** - Request HTTP method.
|
|
234
|
+
- **`client_ip`** - IP address of the client who sent the request.
|
|
235
|
+
- **status** - Status code in the response.
|
|
236
|
+
- **size** - Response size in bytes.
|
|
237
|
+
- **cname** - Custom domain of the requested resource.
|
|
238
|
+
- **`resource_id`** - ID of the requested CDN resource.
|
|
239
|
+
- **`cache_status`** - Caching status.
|
|
240
|
+
- **datacenter** - Data center where request was processed.
|
|
241
|
+
- **timestamp** - Date and time when the request was made.
|
|
242
|
+
|
|
243
|
+
Parameter may have multiple values separated by a comma.
|
|
244
|
+
|
|
245
|
+
By default, ascending sorting is applied. To sort in descending order, add '-'
|
|
246
|
+
prefix.
|
|
247
|
+
|
|
248
|
+
Example:
|
|
249
|
+
|
|
250
|
+
- &ordering=-timestamp,status
|
|
251
|
+
|
|
252
|
+
resource_id_eq: ID of the requested CDN resource equal to the specified value.
|
|
253
|
+
|
|
254
|
+
resource_id_gt: ID of the requested CDN resource greater than the specified value.
|
|
255
|
+
|
|
256
|
+
resource_id_gte: ID of the requested CDN resource greater than or equal to the specified value.
|
|
257
|
+
|
|
258
|
+
resource_id_in: List of IDs of the requested CDN resource. Values should be separated by a
|
|
259
|
+
comma.
|
|
260
|
+
|
|
261
|
+
resource_id_lt: ID of the requested CDN resource less than the specified value.
|
|
262
|
+
|
|
263
|
+
resource_id_lte: ID of the requested CDN resource less than or equal to the specified value.
|
|
264
|
+
|
|
265
|
+
resource_id_ne: ID of the requested CDN resource not equal to the specified value.
|
|
266
|
+
|
|
267
|
+
resource_id_not_in: List of IDs of the requested CDN resource not equal to the specified values.
|
|
268
|
+
Values should be separated by a comma.
|
|
269
|
+
|
|
270
|
+
size_eq: Response size in bytes equal to the specified value.
|
|
271
|
+
|
|
272
|
+
size_gt: Response size in bytes greater than the specified value.
|
|
273
|
+
|
|
274
|
+
size_gte: Response size in bytes greater than or equal to the specified value.
|
|
275
|
+
|
|
276
|
+
size_in: List of response sizes in bytes. Values should be separated by a comma.
|
|
277
|
+
|
|
278
|
+
size_lt: Response size in bytes less than the specified value.
|
|
279
|
+
|
|
280
|
+
size_lte: Response size in bytes less than or equal to the specified value.
|
|
281
|
+
|
|
282
|
+
size_ne: Response size in bytes not equal to the specified value.
|
|
283
|
+
|
|
284
|
+
size_not_in: List of response sizes in bytes not equal to the specified values. Values should
|
|
285
|
+
be separated by
|
|
286
|
+
|
|
287
|
+
status_eq: Status code in the response equal to the specified value.
|
|
288
|
+
|
|
289
|
+
status_gt: Status code in the response greater than the specified value.
|
|
290
|
+
|
|
291
|
+
status_gte: Status code in the response greater than or equal to the specified value.
|
|
292
|
+
|
|
293
|
+
status_in: List of status codes in the response. Values should be separated by a comma.
|
|
294
|
+
|
|
295
|
+
status_lt: Status code in the response less than the specified value.
|
|
296
|
+
|
|
297
|
+
status_lte: Status code in the response less than or equal to the specified value.
|
|
298
|
+
|
|
299
|
+
status_ne: Status code in the response not equal to the specified value.
|
|
300
|
+
|
|
301
|
+
status_not_in: List of status codes not in the response. Values should be separated by a comma.
|
|
302
|
+
|
|
303
|
+
extra_headers: Send extra headers
|
|
304
|
+
|
|
305
|
+
extra_query: Add additional query parameters to the request
|
|
306
|
+
|
|
307
|
+
extra_body: Add additional JSON properties to the request
|
|
308
|
+
|
|
309
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
310
|
+
"""
|
|
311
|
+
return self._get_api_list(
|
|
312
|
+
"/cdn/advanced/v1/logs"
|
|
313
|
+
if self._client._base_url_overridden
|
|
314
|
+
else "https://api.gcore.com//cdn/advanced/v1/logs",
|
|
315
|
+
page=SyncOffsetPageCdnLogs[Data],
|
|
316
|
+
options=make_request_options(
|
|
317
|
+
extra_headers=extra_headers,
|
|
318
|
+
extra_query=extra_query,
|
|
319
|
+
extra_body=extra_body,
|
|
320
|
+
timeout=timeout,
|
|
321
|
+
query=maybe_transform(
|
|
322
|
+
{
|
|
323
|
+
"from_": from_,
|
|
324
|
+
"to": to,
|
|
325
|
+
"cache_status_eq": cache_status_eq,
|
|
326
|
+
"cache_status_in": cache_status_in,
|
|
327
|
+
"cache_status_ne": cache_status_ne,
|
|
328
|
+
"cache_status_not_in": cache_status_not_in,
|
|
329
|
+
"client_ip_eq": client_ip_eq,
|
|
330
|
+
"client_ip_in": client_ip_in,
|
|
331
|
+
"client_ip_ne": client_ip_ne,
|
|
332
|
+
"client_ip_not_in": client_ip_not_in,
|
|
333
|
+
"cname_contains": cname_contains,
|
|
334
|
+
"cname_eq": cname_eq,
|
|
335
|
+
"cname_in": cname_in,
|
|
336
|
+
"cname_ne": cname_ne,
|
|
337
|
+
"cname_not_in": cname_not_in,
|
|
338
|
+
"datacenter_eq": datacenter_eq,
|
|
339
|
+
"datacenter_in": datacenter_in,
|
|
340
|
+
"datacenter_ne": datacenter_ne,
|
|
341
|
+
"datacenter_not_in": datacenter_not_in,
|
|
342
|
+
"fields": fields,
|
|
343
|
+
"limit": limit,
|
|
344
|
+
"method_eq": method_eq,
|
|
345
|
+
"method_in": method_in,
|
|
346
|
+
"method_ne": method_ne,
|
|
347
|
+
"method_not_in": method_not_in,
|
|
348
|
+
"offset": offset,
|
|
349
|
+
"ordering": ordering,
|
|
350
|
+
"resource_id_eq": resource_id_eq,
|
|
351
|
+
"resource_id_gt": resource_id_gt,
|
|
352
|
+
"resource_id_gte": resource_id_gte,
|
|
353
|
+
"resource_id_in": resource_id_in,
|
|
354
|
+
"resource_id_lt": resource_id_lt,
|
|
355
|
+
"resource_id_lte": resource_id_lte,
|
|
356
|
+
"resource_id_ne": resource_id_ne,
|
|
357
|
+
"resource_id_not_in": resource_id_not_in,
|
|
358
|
+
"size_eq": size_eq,
|
|
359
|
+
"size_gt": size_gt,
|
|
360
|
+
"size_gte": size_gte,
|
|
361
|
+
"size_in": size_in,
|
|
362
|
+
"size_lt": size_lt,
|
|
363
|
+
"size_lte": size_lte,
|
|
364
|
+
"size_ne": size_ne,
|
|
365
|
+
"size_not_in": size_not_in,
|
|
366
|
+
"status_eq": status_eq,
|
|
367
|
+
"status_gt": status_gt,
|
|
368
|
+
"status_gte": status_gte,
|
|
369
|
+
"status_in": status_in,
|
|
370
|
+
"status_lt": status_lt,
|
|
371
|
+
"status_lte": status_lte,
|
|
372
|
+
"status_ne": status_ne,
|
|
373
|
+
"status_not_in": status_not_in,
|
|
374
|
+
},
|
|
375
|
+
log_list_params.LogListParams,
|
|
376
|
+
),
|
|
377
|
+
),
|
|
378
|
+
model=Data,
|
|
379
|
+
)
|
|
380
|
+
|
|
381
|
+
def download(
|
|
382
|
+
self,
|
|
383
|
+
*,
|
|
384
|
+
format: str,
|
|
385
|
+
from_: str,
|
|
386
|
+
to: str,
|
|
387
|
+
cache_status_eq: str | Omit = omit,
|
|
388
|
+
cache_status_in: str | Omit = omit,
|
|
389
|
+
cache_status_ne: str | Omit = omit,
|
|
390
|
+
cache_status_not_in: str | Omit = omit,
|
|
391
|
+
client_ip_eq: str | Omit = omit,
|
|
392
|
+
client_ip_in: str | Omit = omit,
|
|
393
|
+
client_ip_ne: str | Omit = omit,
|
|
394
|
+
client_ip_not_in: str | Omit = omit,
|
|
395
|
+
cname_contains: str | Omit = omit,
|
|
396
|
+
cname_eq: str | Omit = omit,
|
|
397
|
+
cname_in: str | Omit = omit,
|
|
398
|
+
cname_ne: str | Omit = omit,
|
|
399
|
+
cname_not_in: str | Omit = omit,
|
|
400
|
+
datacenter_eq: str | Omit = omit,
|
|
401
|
+
datacenter_in: str | Omit = omit,
|
|
402
|
+
datacenter_ne: str | Omit = omit,
|
|
403
|
+
datacenter_not_in: str | Omit = omit,
|
|
404
|
+
fields: str | Omit = omit,
|
|
405
|
+
limit: int | Omit = omit,
|
|
406
|
+
method_eq: str | Omit = omit,
|
|
407
|
+
method_in: str | Omit = omit,
|
|
408
|
+
method_ne: str | Omit = omit,
|
|
409
|
+
method_not_in: str | Omit = omit,
|
|
410
|
+
offset: int | Omit = omit,
|
|
411
|
+
resource_id_eq: int | Omit = omit,
|
|
412
|
+
resource_id_gt: int | Omit = omit,
|
|
413
|
+
resource_id_gte: int | Omit = omit,
|
|
414
|
+
resource_id_in: str | Omit = omit,
|
|
415
|
+
resource_id_lt: int | Omit = omit,
|
|
416
|
+
resource_id_lte: int | Omit = omit,
|
|
417
|
+
resource_id_ne: int | Omit = omit,
|
|
418
|
+
resource_id_not_in: str | Omit = omit,
|
|
419
|
+
size_eq: int | Omit = omit,
|
|
420
|
+
size_gt: int | Omit = omit,
|
|
421
|
+
size_gte: int | Omit = omit,
|
|
422
|
+
size_in: str | Omit = omit,
|
|
423
|
+
size_lt: int | Omit = omit,
|
|
424
|
+
size_lte: int | Omit = omit,
|
|
425
|
+
size_ne: int | Omit = omit,
|
|
426
|
+
size_not_in: str | Omit = omit,
|
|
427
|
+
sort: str | Omit = omit,
|
|
428
|
+
status_eq: int | Omit = omit,
|
|
429
|
+
status_gt: int | Omit = omit,
|
|
430
|
+
status_gte: int | Omit = omit,
|
|
431
|
+
status_in: str | Omit = omit,
|
|
432
|
+
status_lt: int | Omit = omit,
|
|
433
|
+
status_lte: int | Omit = omit,
|
|
434
|
+
status_ne: int | Omit = omit,
|
|
435
|
+
status_not_in: str | Omit = omit,
|
|
436
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
437
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
438
|
+
extra_headers: Headers | None = None,
|
|
439
|
+
extra_query: Query | None = None,
|
|
440
|
+
extra_body: Body | None = None,
|
|
441
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
442
|
+
) -> BinaryAPIResponse:
|
|
443
|
+
"""
|
|
444
|
+
Download CDN logs for up to 3 days starting today.
|
|
445
|
+
|
|
446
|
+
You can filter logs using query params by client IP, CDN resource, date, path
|
|
447
|
+
and etc.
|
|
448
|
+
|
|
449
|
+
Args:
|
|
450
|
+
format: Output format.
|
|
451
|
+
|
|
452
|
+
Possible values:
|
|
453
|
+
|
|
454
|
+
- csv
|
|
455
|
+
- tsv
|
|
456
|
+
|
|
457
|
+
from_: Start date and time of the requested time period (ISO 8601/RFC 3339 format,
|
|
458
|
+
UTC.)
|
|
459
|
+
|
|
460
|
+
Difference between "from" and "to" cannot exceed 6 hours.
|
|
461
|
+
|
|
462
|
+
Examples:
|
|
463
|
+
|
|
464
|
+
- &from=2021-06-14T00:00:00Z
|
|
465
|
+
- &from=2021-06-14T00:00:00.000Z
|
|
466
|
+
|
|
467
|
+
to: End date and time of the requested time period (ISO 8601/RFC 3339 format, UTC.)
|
|
468
|
+
|
|
469
|
+
Difference between "from" and "to" cannot exceed 6 hours.
|
|
470
|
+
|
|
471
|
+
Examples:
|
|
472
|
+
|
|
473
|
+
- &to=2021-06-15T00:00:00Z
|
|
474
|
+
- &to=2021-06-15T00:00:00.000Z
|
|
475
|
+
|
|
476
|
+
cache_status_eq: Caching status. Possible values: 'MISS', 'BYPASS', 'EXPIRED', 'STALE',
|
|
477
|
+
'PENDING', 'UPDATING', 'REVALIDATED', 'HIT', '-'.
|
|
478
|
+
|
|
479
|
+
cache_status_in: List of caching statuses. Possible values: 'MISS', 'BYPASS', 'EXPIRED', 'STALE',
|
|
480
|
+
'PENDING', 'UPDATING', 'REVALIDATED', 'HIT', '-'. Values should be separated by
|
|
481
|
+
a comma.
|
|
482
|
+
|
|
483
|
+
cache_status_ne: Caching status not equal to the specified value. Possible values: 'MISS',
|
|
484
|
+
'BYPASS', 'EXPIRED', 'STALE', 'PENDING', 'UPDATING', 'REVALIDATED', 'HIT', '-'.
|
|
485
|
+
|
|
486
|
+
cache_status_not_in:
|
|
487
|
+
List of caching statuses not equal to the specified values. Possible values:
|
|
488
|
+
'MISS', 'BYPASS', 'EXPIRED', 'STALE', 'PENDING', 'UPDATING', 'REVALIDATED',
|
|
489
|
+
'HIT', '-'. Values should be separated by a comma.
|
|
490
|
+
|
|
491
|
+
client_ip_eq: IP address of the client who sent the request.
|
|
492
|
+
|
|
493
|
+
client_ip_in: List of IP addresses of the clients who sent the request.
|
|
494
|
+
|
|
495
|
+
client_ip_ne: IP address of the client who did not send the request.
|
|
496
|
+
|
|
497
|
+
client_ip_not_in: List of IP addresses of the clients who did not send the request.
|
|
498
|
+
|
|
499
|
+
cname_contains: Part of the custom domain of the requested CDN resource. Minimum length is 3
|
|
500
|
+
characters.
|
|
501
|
+
|
|
502
|
+
cname_eq: Custom domain of the requested CDN resource.
|
|
503
|
+
|
|
504
|
+
cname_in: List of custom domains of the requested CDN resource. Values should be separated
|
|
505
|
+
by a comma.
|
|
506
|
+
|
|
507
|
+
cname_ne: Custom domain of the requested CDN resource not equal to the specified value.
|
|
508
|
+
|
|
509
|
+
cname_not_in: List of custom domains of the requested CDN resource not equal to the specified
|
|
510
|
+
values. Values should be separated by a comma.
|
|
511
|
+
|
|
512
|
+
datacenter_eq: Data center where request was processed.
|
|
513
|
+
|
|
514
|
+
datacenter_in: List of data centers where request was processed. Values should be separated by
|
|
515
|
+
a comma.
|
|
516
|
+
|
|
517
|
+
datacenter_ne: Data center where request was not processed.
|
|
518
|
+
|
|
519
|
+
datacenter_not_in: List of data centers where request was not processed. Values should be separated
|
|
520
|
+
by a comma.
|
|
521
|
+
|
|
522
|
+
fields: A comma-separated list of returned fields.
|
|
523
|
+
|
|
524
|
+
Supported fields are presented in the responses section.
|
|
525
|
+
|
|
526
|
+
Example:
|
|
527
|
+
|
|
528
|
+
- &fields=timestamp,path,status
|
|
529
|
+
|
|
530
|
+
limit: Maximum number of log records in the response.
|
|
531
|
+
|
|
532
|
+
method_eq: Request HTTP method. Possible values: 'CONNECT', 'DELETE', 'GET', 'HEAD',
|
|
533
|
+
'OPTIONS', 'PATCH', 'POST', 'PUT', 'TRACE'.
|
|
534
|
+
|
|
535
|
+
method_in: Request HTTP method. Possible values: 'CONNECT', 'DELETE', 'GET', 'HEAD',
|
|
536
|
+
'OPTIONS', 'PATCH', 'POST', 'PUT', 'TRACE'. Values should be separated by a
|
|
537
|
+
comma.
|
|
538
|
+
|
|
539
|
+
method_ne: Request HTTP method. Possible values: 'CONNECT', 'DELETE', 'GET', 'HEAD',
|
|
540
|
+
'OPTIONS', 'PATCH', 'POST', 'PUT', 'TRACE'.
|
|
541
|
+
|
|
542
|
+
method_not_in: Request HTTP method. Possible values: 'CONNECT', 'DELETE', 'GET', 'HEAD',
|
|
543
|
+
'OPTIONS', 'PATCH', 'POST', 'PUT', 'TRACE'. Values should be separated by a
|
|
544
|
+
comma.
|
|
545
|
+
|
|
546
|
+
offset: Number of log records to skip starting from the beginning of the requested
|
|
547
|
+
period.
|
|
548
|
+
|
|
549
|
+
resource_id_eq: ID of the requested CDN resource equal to the specified value.
|
|
550
|
+
|
|
551
|
+
resource_id_gt: ID of the requested CDN resource greater than the specified value.
|
|
552
|
+
|
|
553
|
+
resource_id_gte: ID of the requested CDN resource greater than or equal to the specified value.
|
|
554
|
+
|
|
555
|
+
resource_id_in: List of IDs of the requested CDN resource. Values should be separated by a
|
|
556
|
+
comma.
|
|
557
|
+
|
|
558
|
+
resource_id_lt: ID of the requested CDN resource less than the specified value.
|
|
559
|
+
|
|
560
|
+
resource_id_lte: ID of the requested CDN resource less than or equal to the specified value.
|
|
561
|
+
|
|
562
|
+
resource_id_ne: ID of the requested CDN resource not equal to the specified value.
|
|
563
|
+
|
|
564
|
+
resource_id_not_in: List of IDs of the requested CDN resource not equal to the specified values.
|
|
565
|
+
Values should be separated by a comma.
|
|
566
|
+
|
|
567
|
+
size_eq: Response size in bytes equal to the specified value.
|
|
568
|
+
|
|
569
|
+
size_gt: Response size in bytes greater than the specified value.
|
|
570
|
+
|
|
571
|
+
size_gte: Response size in bytes greater than or equal to the specified value.
|
|
572
|
+
|
|
573
|
+
size_in: List of response sizes in bytes. Values should be separated by a comma.
|
|
574
|
+
|
|
575
|
+
size_lt: Response size in bytes less than the specified value.
|
|
576
|
+
|
|
577
|
+
size_lte: Response size in bytes less than or equal to the specified value.
|
|
578
|
+
|
|
579
|
+
size_ne: Response size in bytes not equal to the specified value.
|
|
580
|
+
|
|
581
|
+
size_not_in: List of response sizes in bytes not equal to the specified values. Values should
|
|
582
|
+
be separated by
|
|
583
|
+
|
|
584
|
+
sort: Sorting rules.
|
|
585
|
+
|
|
586
|
+
Possible values:
|
|
587
|
+
|
|
588
|
+
- **method** - Request HTTP method.
|
|
589
|
+
- **`client_ip`** - IP address of the client who sent the request.
|
|
590
|
+
- **status** - Status code in the response.
|
|
591
|
+
- **size** - Response size in bytes.
|
|
592
|
+
- **cname** - Custom domain of the requested resource.
|
|
593
|
+
- **`resource_id`** - ID of the requested CDN resource.
|
|
594
|
+
- **`cache_status`** - Caching status.
|
|
595
|
+
- **datacenter** - Data center where request was processed.
|
|
596
|
+
- **timestamp** - Date and time when the request was made.
|
|
597
|
+
|
|
598
|
+
May include multiple values separated by a comma.
|
|
599
|
+
|
|
600
|
+
Example:
|
|
601
|
+
|
|
602
|
+
- &sort=-timestamp,status
|
|
603
|
+
|
|
604
|
+
status_eq: Status code in the response equal to the specified value.
|
|
605
|
+
|
|
606
|
+
status_gt: Status code in the response greater than the specified value.
|
|
607
|
+
|
|
608
|
+
status_gte: Status code in the response greater than or equal to the specified value.
|
|
609
|
+
|
|
610
|
+
status_in: List of status codes in the response. Values should be separated by a comma.
|
|
611
|
+
|
|
612
|
+
status_lt: Status code in the response less than the specified value.
|
|
613
|
+
|
|
614
|
+
status_lte: Status code in the response less than or equal to the specified value.
|
|
615
|
+
|
|
616
|
+
status_ne: Status code in the response not equal to the specified value.
|
|
617
|
+
|
|
618
|
+
status_not_in: List of status codes not in the response. Values should be separated by a comma.
|
|
619
|
+
|
|
620
|
+
extra_headers: Send extra headers
|
|
621
|
+
|
|
622
|
+
extra_query: Add additional query parameters to the request
|
|
623
|
+
|
|
624
|
+
extra_body: Add additional JSON properties to the request
|
|
625
|
+
|
|
626
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
627
|
+
"""
|
|
628
|
+
extra_headers = {"Accept": "application/zip", **(extra_headers or {})}
|
|
629
|
+
return self._get(
|
|
630
|
+
"/cdn/advanced/v1/logs/download"
|
|
631
|
+
if self._client._base_url_overridden
|
|
632
|
+
else "https://api.gcore.com//cdn/advanced/v1/logs/download",
|
|
633
|
+
options=make_request_options(
|
|
634
|
+
extra_headers=extra_headers,
|
|
635
|
+
extra_query=extra_query,
|
|
636
|
+
extra_body=extra_body,
|
|
637
|
+
timeout=timeout,
|
|
638
|
+
query=maybe_transform(
|
|
639
|
+
{
|
|
640
|
+
"format": format,
|
|
641
|
+
"from_": from_,
|
|
642
|
+
"to": to,
|
|
643
|
+
"cache_status_eq": cache_status_eq,
|
|
644
|
+
"cache_status_in": cache_status_in,
|
|
645
|
+
"cache_status_ne": cache_status_ne,
|
|
646
|
+
"cache_status_not_in": cache_status_not_in,
|
|
647
|
+
"client_ip_eq": client_ip_eq,
|
|
648
|
+
"client_ip_in": client_ip_in,
|
|
649
|
+
"client_ip_ne": client_ip_ne,
|
|
650
|
+
"client_ip_not_in": client_ip_not_in,
|
|
651
|
+
"cname_contains": cname_contains,
|
|
652
|
+
"cname_eq": cname_eq,
|
|
653
|
+
"cname_in": cname_in,
|
|
654
|
+
"cname_ne": cname_ne,
|
|
655
|
+
"cname_not_in": cname_not_in,
|
|
656
|
+
"datacenter_eq": datacenter_eq,
|
|
657
|
+
"datacenter_in": datacenter_in,
|
|
658
|
+
"datacenter_ne": datacenter_ne,
|
|
659
|
+
"datacenter_not_in": datacenter_not_in,
|
|
660
|
+
"fields": fields,
|
|
661
|
+
"limit": limit,
|
|
662
|
+
"method_eq": method_eq,
|
|
663
|
+
"method_in": method_in,
|
|
664
|
+
"method_ne": method_ne,
|
|
665
|
+
"method_not_in": method_not_in,
|
|
666
|
+
"offset": offset,
|
|
667
|
+
"resource_id_eq": resource_id_eq,
|
|
668
|
+
"resource_id_gt": resource_id_gt,
|
|
669
|
+
"resource_id_gte": resource_id_gte,
|
|
670
|
+
"resource_id_in": resource_id_in,
|
|
671
|
+
"resource_id_lt": resource_id_lt,
|
|
672
|
+
"resource_id_lte": resource_id_lte,
|
|
673
|
+
"resource_id_ne": resource_id_ne,
|
|
674
|
+
"resource_id_not_in": resource_id_not_in,
|
|
675
|
+
"size_eq": size_eq,
|
|
676
|
+
"size_gt": size_gt,
|
|
677
|
+
"size_gte": size_gte,
|
|
678
|
+
"size_in": size_in,
|
|
679
|
+
"size_lt": size_lt,
|
|
680
|
+
"size_lte": size_lte,
|
|
681
|
+
"size_ne": size_ne,
|
|
682
|
+
"size_not_in": size_not_in,
|
|
683
|
+
"sort": sort,
|
|
684
|
+
"status_eq": status_eq,
|
|
685
|
+
"status_gt": status_gt,
|
|
686
|
+
"status_gte": status_gte,
|
|
687
|
+
"status_in": status_in,
|
|
688
|
+
"status_lt": status_lt,
|
|
689
|
+
"status_lte": status_lte,
|
|
690
|
+
"status_ne": status_ne,
|
|
691
|
+
"status_not_in": status_not_in,
|
|
692
|
+
},
|
|
693
|
+
log_download_params.LogDownloadParams,
|
|
694
|
+
),
|
|
695
|
+
),
|
|
696
|
+
cast_to=BinaryAPIResponse,
|
|
697
|
+
)
|
|
698
|
+
|
|
699
|
+
|
|
700
|
+
class AsyncLogsResource(AsyncAPIResource):
|
|
701
|
+
@cached_property
|
|
702
|
+
def settings(self) -> AsyncSettingsResource:
|
|
703
|
+
return AsyncSettingsResource(self._client)
|
|
704
|
+
|
|
705
|
+
@cached_property
|
|
706
|
+
def with_raw_response(self) -> AsyncLogsResourceWithRawResponse:
|
|
707
|
+
"""
|
|
708
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
709
|
+
the raw response object instead of the parsed content.
|
|
710
|
+
|
|
711
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
712
|
+
"""
|
|
713
|
+
return AsyncLogsResourceWithRawResponse(self)
|
|
714
|
+
|
|
715
|
+
@cached_property
|
|
716
|
+
def with_streaming_response(self) -> AsyncLogsResourceWithStreamingResponse:
|
|
717
|
+
"""
|
|
718
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
719
|
+
|
|
720
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
721
|
+
"""
|
|
722
|
+
return AsyncLogsResourceWithStreamingResponse(self)
|
|
723
|
+
|
|
724
|
+
def list(
|
|
725
|
+
self,
|
|
726
|
+
*,
|
|
727
|
+
from_: str,
|
|
728
|
+
to: str,
|
|
729
|
+
cache_status_eq: str | Omit = omit,
|
|
730
|
+
cache_status_in: str | Omit = omit,
|
|
731
|
+
cache_status_ne: str | Omit = omit,
|
|
732
|
+
cache_status_not_in: str | Omit = omit,
|
|
733
|
+
client_ip_eq: str | Omit = omit,
|
|
734
|
+
client_ip_in: str | Omit = omit,
|
|
735
|
+
client_ip_ne: str | Omit = omit,
|
|
736
|
+
client_ip_not_in: str | Omit = omit,
|
|
737
|
+
cname_contains: str | Omit = omit,
|
|
738
|
+
cname_eq: str | Omit = omit,
|
|
739
|
+
cname_in: str | Omit = omit,
|
|
740
|
+
cname_ne: str | Omit = omit,
|
|
741
|
+
cname_not_in: str | Omit = omit,
|
|
742
|
+
datacenter_eq: str | Omit = omit,
|
|
743
|
+
datacenter_in: str | Omit = omit,
|
|
744
|
+
datacenter_ne: str | Omit = omit,
|
|
745
|
+
datacenter_not_in: str | Omit = omit,
|
|
746
|
+
fields: str | Omit = omit,
|
|
747
|
+
limit: int | Omit = omit,
|
|
748
|
+
method_eq: str | Omit = omit,
|
|
749
|
+
method_in: str | Omit = omit,
|
|
750
|
+
method_ne: str | Omit = omit,
|
|
751
|
+
method_not_in: str | Omit = omit,
|
|
752
|
+
offset: int | Omit = omit,
|
|
753
|
+
ordering: str | Omit = omit,
|
|
754
|
+
resource_id_eq: int | Omit = omit,
|
|
755
|
+
resource_id_gt: int | Omit = omit,
|
|
756
|
+
resource_id_gte: int | Omit = omit,
|
|
757
|
+
resource_id_in: str | Omit = omit,
|
|
758
|
+
resource_id_lt: int | Omit = omit,
|
|
759
|
+
resource_id_lte: int | Omit = omit,
|
|
760
|
+
resource_id_ne: int | Omit = omit,
|
|
761
|
+
resource_id_not_in: str | Omit = omit,
|
|
762
|
+
size_eq: int | Omit = omit,
|
|
763
|
+
size_gt: int | Omit = omit,
|
|
764
|
+
size_gte: int | Omit = omit,
|
|
765
|
+
size_in: str | Omit = omit,
|
|
766
|
+
size_lt: int | Omit = omit,
|
|
767
|
+
size_lte: int | Omit = omit,
|
|
768
|
+
size_ne: int | Omit = omit,
|
|
769
|
+
size_not_in: str | Omit = omit,
|
|
770
|
+
status_eq: int | Omit = omit,
|
|
771
|
+
status_gt: int | Omit = omit,
|
|
772
|
+
status_gte: int | Omit = omit,
|
|
773
|
+
status_in: str | Omit = omit,
|
|
774
|
+
status_lt: int | Omit = omit,
|
|
775
|
+
status_lte: int | Omit = omit,
|
|
776
|
+
status_ne: int | Omit = omit,
|
|
777
|
+
status_not_in: str | Omit = omit,
|
|
778
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
779
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
780
|
+
extra_headers: Headers | None = None,
|
|
781
|
+
extra_query: Query | None = None,
|
|
782
|
+
extra_body: Body | None = None,
|
|
783
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
784
|
+
) -> AsyncPaginator[Data, AsyncOffsetPageCdnLogs[Data]]:
|
|
785
|
+
"""
|
|
786
|
+
Get CDN logs for up to 3 days starting today.
|
|
787
|
+
|
|
788
|
+
You can filter logs using query parameters by client IP, CDN resource, date,
|
|
789
|
+
path and etc.
|
|
790
|
+
|
|
791
|
+
To filter the CDN logs by 2xx status codes, use:
|
|
792
|
+
|
|
793
|
+
- &`status__gte`=200&`status__lt`=300
|
|
794
|
+
|
|
795
|
+
Args:
|
|
796
|
+
from_: Start date and time of the requested time period (ISO 8601/RFC 3339 format,
|
|
797
|
+
UTC.)
|
|
798
|
+
|
|
799
|
+
Difference between "from" and "to" cannot exceed 6 hours.
|
|
800
|
+
|
|
801
|
+
Examples:
|
|
802
|
+
|
|
803
|
+
- &from=2021-06-14T00:00:00Z
|
|
804
|
+
- &from=2021-06-14T00:00:00.000Z
|
|
805
|
+
|
|
806
|
+
to: End date and time of the requested time period (ISO 8601/RFC 3339 format, UTC.)
|
|
807
|
+
|
|
808
|
+
Difference between "from" and "to" cannot exceed 6 hours.
|
|
809
|
+
|
|
810
|
+
Examples:
|
|
811
|
+
|
|
812
|
+
- &to=2021-06-15T00:00:00Z
|
|
813
|
+
- &to=2021-06-15T00:00:00.000Z
|
|
814
|
+
|
|
815
|
+
cache_status_eq: Caching status. Possible values: 'MISS', 'BYPASS', 'EXPIRED', 'STALE',
|
|
816
|
+
'PENDING', 'UPDATING', 'REVALIDATED', 'HIT', '-'.
|
|
817
|
+
|
|
818
|
+
cache_status_in: List of caching statuses. Possible values: 'MISS', 'BYPASS', 'EXPIRED', 'STALE',
|
|
819
|
+
'PENDING', 'UPDATING', 'REVALIDATED', 'HIT', '-'. Values should be separated by
|
|
820
|
+
a comma.
|
|
821
|
+
|
|
822
|
+
cache_status_ne: Caching status not equal to the specified value. Possible values: 'MISS',
|
|
823
|
+
'BYPASS', 'EXPIRED', 'STALE', 'PENDING', 'UPDATING', 'REVALIDATED', 'HIT', '-'.
|
|
824
|
+
|
|
825
|
+
cache_status_not_in:
|
|
826
|
+
List of caching statuses not equal to the specified values. Possible values:
|
|
827
|
+
'MISS', 'BYPASS', 'EXPIRED', 'STALE', 'PENDING', 'UPDATING', 'REVALIDATED',
|
|
828
|
+
'HIT', '-'. Values should be separated by a comma.
|
|
829
|
+
|
|
830
|
+
client_ip_eq: IP address of the client who sent the request.
|
|
831
|
+
|
|
832
|
+
client_ip_in: List of IP addresses of the clients who sent the request.
|
|
833
|
+
|
|
834
|
+
client_ip_ne: IP address of the client who did not send the request.
|
|
835
|
+
|
|
836
|
+
client_ip_not_in: List of IP addresses of the clients who did not send the request.
|
|
837
|
+
|
|
838
|
+
cname_contains: Part of the custom domain of the requested CDN resource. Minimum length is 3
|
|
839
|
+
characters.
|
|
840
|
+
|
|
841
|
+
cname_eq: Custom domain of the requested CDN resource.
|
|
842
|
+
|
|
843
|
+
cname_in: List of custom domains of the requested CDN resource. Values should be separated
|
|
844
|
+
by a comma.
|
|
845
|
+
|
|
846
|
+
cname_ne: Custom domain of the requested CDN resource not equal to the specified value.
|
|
847
|
+
|
|
848
|
+
cname_not_in: List of custom domains of the requested CDN resource not equal to the specified
|
|
849
|
+
values. Values should be separated by a comma.
|
|
850
|
+
|
|
851
|
+
datacenter_eq: Data center where request was processed.
|
|
852
|
+
|
|
853
|
+
datacenter_in: List of data centers where request was processed. Values should be separated by
|
|
854
|
+
a comma.
|
|
855
|
+
|
|
856
|
+
datacenter_ne: Data center where request was not processed.
|
|
857
|
+
|
|
858
|
+
datacenter_not_in: List of data centers where request was not processed. Values should be separated
|
|
859
|
+
by a comma.
|
|
860
|
+
|
|
861
|
+
fields: A comma-separated list of returned fields.
|
|
862
|
+
|
|
863
|
+
Supported fields are presented in the responses section.
|
|
864
|
+
|
|
865
|
+
Example:
|
|
866
|
+
|
|
867
|
+
- &fields=timestamp,path,status
|
|
868
|
+
|
|
869
|
+
limit: Maximum number of log records in the response.
|
|
870
|
+
|
|
871
|
+
method_eq: Request HTTP method. Possible values: 'CONNECT', 'DELETE', 'GET', 'HEAD',
|
|
872
|
+
'OPTIONS', 'PATCH', 'POST', 'PUT', 'TRACE'.
|
|
873
|
+
|
|
874
|
+
method_in: Request HTTP method. Possible values: 'CONNECT', 'DELETE', 'GET', 'HEAD',
|
|
875
|
+
'OPTIONS', 'PATCH', 'POST', 'PUT', 'TRACE'. Values should be separated by a
|
|
876
|
+
comma.
|
|
877
|
+
|
|
878
|
+
method_ne: Request HTTP method. Possible values: 'CONNECT', 'DELETE', 'GET', 'HEAD',
|
|
879
|
+
'OPTIONS', 'PATCH', 'POST', 'PUT', 'TRACE'.
|
|
880
|
+
|
|
881
|
+
method_not_in: Request HTTP method. Possible values: 'CONNECT', 'DELETE', 'GET', 'HEAD',
|
|
882
|
+
'OPTIONS', 'PATCH', 'POST', 'PUT', 'TRACE'. Values should be separated by a
|
|
883
|
+
comma.
|
|
884
|
+
|
|
885
|
+
offset: Number of log records to skip starting from the beginning of the requested
|
|
886
|
+
period.
|
|
887
|
+
|
|
888
|
+
ordering: Sorting rules.
|
|
889
|
+
|
|
890
|
+
Possible values:
|
|
891
|
+
|
|
892
|
+
- **method** - Request HTTP method.
|
|
893
|
+
- **`client_ip`** - IP address of the client who sent the request.
|
|
894
|
+
- **status** - Status code in the response.
|
|
895
|
+
- **size** - Response size in bytes.
|
|
896
|
+
- **cname** - Custom domain of the requested resource.
|
|
897
|
+
- **`resource_id`** - ID of the requested CDN resource.
|
|
898
|
+
- **`cache_status`** - Caching status.
|
|
899
|
+
- **datacenter** - Data center where request was processed.
|
|
900
|
+
- **timestamp** - Date and time when the request was made.
|
|
901
|
+
|
|
902
|
+
Parameter may have multiple values separated by a comma.
|
|
903
|
+
|
|
904
|
+
By default, ascending sorting is applied. To sort in descending order, add '-'
|
|
905
|
+
prefix.
|
|
906
|
+
|
|
907
|
+
Example:
|
|
908
|
+
|
|
909
|
+
- &ordering=-timestamp,status
|
|
910
|
+
|
|
911
|
+
resource_id_eq: ID of the requested CDN resource equal to the specified value.
|
|
912
|
+
|
|
913
|
+
resource_id_gt: ID of the requested CDN resource greater than the specified value.
|
|
914
|
+
|
|
915
|
+
resource_id_gte: ID of the requested CDN resource greater than or equal to the specified value.
|
|
916
|
+
|
|
917
|
+
resource_id_in: List of IDs of the requested CDN resource. Values should be separated by a
|
|
918
|
+
comma.
|
|
919
|
+
|
|
920
|
+
resource_id_lt: ID of the requested CDN resource less than the specified value.
|
|
921
|
+
|
|
922
|
+
resource_id_lte: ID of the requested CDN resource less than or equal to the specified value.
|
|
923
|
+
|
|
924
|
+
resource_id_ne: ID of the requested CDN resource not equal to the specified value.
|
|
925
|
+
|
|
926
|
+
resource_id_not_in: List of IDs of the requested CDN resource not equal to the specified values.
|
|
927
|
+
Values should be separated by a comma.
|
|
928
|
+
|
|
929
|
+
size_eq: Response size in bytes equal to the specified value.
|
|
930
|
+
|
|
931
|
+
size_gt: Response size in bytes greater than the specified value.
|
|
932
|
+
|
|
933
|
+
size_gte: Response size in bytes greater than or equal to the specified value.
|
|
934
|
+
|
|
935
|
+
size_in: List of response sizes in bytes. Values should be separated by a comma.
|
|
936
|
+
|
|
937
|
+
size_lt: Response size in bytes less than the specified value.
|
|
938
|
+
|
|
939
|
+
size_lte: Response size in bytes less than or equal to the specified value.
|
|
940
|
+
|
|
941
|
+
size_ne: Response size in bytes not equal to the specified value.
|
|
942
|
+
|
|
943
|
+
size_not_in: List of response sizes in bytes not equal to the specified values. Values should
|
|
944
|
+
be separated by
|
|
945
|
+
|
|
946
|
+
status_eq: Status code in the response equal to the specified value.
|
|
947
|
+
|
|
948
|
+
status_gt: Status code in the response greater than the specified value.
|
|
949
|
+
|
|
950
|
+
status_gte: Status code in the response greater than or equal to the specified value.
|
|
951
|
+
|
|
952
|
+
status_in: List of status codes in the response. Values should be separated by a comma.
|
|
953
|
+
|
|
954
|
+
status_lt: Status code in the response less than the specified value.
|
|
955
|
+
|
|
956
|
+
status_lte: Status code in the response less than or equal to the specified value.
|
|
957
|
+
|
|
958
|
+
status_ne: Status code in the response not equal to the specified value.
|
|
959
|
+
|
|
960
|
+
status_not_in: List of status codes not in the response. Values should be separated by a comma.
|
|
961
|
+
|
|
962
|
+
extra_headers: Send extra headers
|
|
963
|
+
|
|
964
|
+
extra_query: Add additional query parameters to the request
|
|
965
|
+
|
|
966
|
+
extra_body: Add additional JSON properties to the request
|
|
967
|
+
|
|
968
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
969
|
+
"""
|
|
970
|
+
return self._get_api_list(
|
|
971
|
+
"/cdn/advanced/v1/logs"
|
|
972
|
+
if self._client._base_url_overridden
|
|
973
|
+
else "https://api.gcore.com//cdn/advanced/v1/logs",
|
|
974
|
+
page=AsyncOffsetPageCdnLogs[Data],
|
|
975
|
+
options=make_request_options(
|
|
976
|
+
extra_headers=extra_headers,
|
|
977
|
+
extra_query=extra_query,
|
|
978
|
+
extra_body=extra_body,
|
|
979
|
+
timeout=timeout,
|
|
980
|
+
query=maybe_transform(
|
|
981
|
+
{
|
|
982
|
+
"from_": from_,
|
|
983
|
+
"to": to,
|
|
984
|
+
"cache_status_eq": cache_status_eq,
|
|
985
|
+
"cache_status_in": cache_status_in,
|
|
986
|
+
"cache_status_ne": cache_status_ne,
|
|
987
|
+
"cache_status_not_in": cache_status_not_in,
|
|
988
|
+
"client_ip_eq": client_ip_eq,
|
|
989
|
+
"client_ip_in": client_ip_in,
|
|
990
|
+
"client_ip_ne": client_ip_ne,
|
|
991
|
+
"client_ip_not_in": client_ip_not_in,
|
|
992
|
+
"cname_contains": cname_contains,
|
|
993
|
+
"cname_eq": cname_eq,
|
|
994
|
+
"cname_in": cname_in,
|
|
995
|
+
"cname_ne": cname_ne,
|
|
996
|
+
"cname_not_in": cname_not_in,
|
|
997
|
+
"datacenter_eq": datacenter_eq,
|
|
998
|
+
"datacenter_in": datacenter_in,
|
|
999
|
+
"datacenter_ne": datacenter_ne,
|
|
1000
|
+
"datacenter_not_in": datacenter_not_in,
|
|
1001
|
+
"fields": fields,
|
|
1002
|
+
"limit": limit,
|
|
1003
|
+
"method_eq": method_eq,
|
|
1004
|
+
"method_in": method_in,
|
|
1005
|
+
"method_ne": method_ne,
|
|
1006
|
+
"method_not_in": method_not_in,
|
|
1007
|
+
"offset": offset,
|
|
1008
|
+
"ordering": ordering,
|
|
1009
|
+
"resource_id_eq": resource_id_eq,
|
|
1010
|
+
"resource_id_gt": resource_id_gt,
|
|
1011
|
+
"resource_id_gte": resource_id_gte,
|
|
1012
|
+
"resource_id_in": resource_id_in,
|
|
1013
|
+
"resource_id_lt": resource_id_lt,
|
|
1014
|
+
"resource_id_lte": resource_id_lte,
|
|
1015
|
+
"resource_id_ne": resource_id_ne,
|
|
1016
|
+
"resource_id_not_in": resource_id_not_in,
|
|
1017
|
+
"size_eq": size_eq,
|
|
1018
|
+
"size_gt": size_gt,
|
|
1019
|
+
"size_gte": size_gte,
|
|
1020
|
+
"size_in": size_in,
|
|
1021
|
+
"size_lt": size_lt,
|
|
1022
|
+
"size_lte": size_lte,
|
|
1023
|
+
"size_ne": size_ne,
|
|
1024
|
+
"size_not_in": size_not_in,
|
|
1025
|
+
"status_eq": status_eq,
|
|
1026
|
+
"status_gt": status_gt,
|
|
1027
|
+
"status_gte": status_gte,
|
|
1028
|
+
"status_in": status_in,
|
|
1029
|
+
"status_lt": status_lt,
|
|
1030
|
+
"status_lte": status_lte,
|
|
1031
|
+
"status_ne": status_ne,
|
|
1032
|
+
"status_not_in": status_not_in,
|
|
1033
|
+
},
|
|
1034
|
+
log_list_params.LogListParams,
|
|
1035
|
+
),
|
|
1036
|
+
),
|
|
1037
|
+
model=Data,
|
|
1038
|
+
)
|
|
1039
|
+
|
|
1040
|
+
async def download(
|
|
1041
|
+
self,
|
|
1042
|
+
*,
|
|
1043
|
+
format: str,
|
|
1044
|
+
from_: str,
|
|
1045
|
+
to: str,
|
|
1046
|
+
cache_status_eq: str | Omit = omit,
|
|
1047
|
+
cache_status_in: str | Omit = omit,
|
|
1048
|
+
cache_status_ne: str | Omit = omit,
|
|
1049
|
+
cache_status_not_in: str | Omit = omit,
|
|
1050
|
+
client_ip_eq: str | Omit = omit,
|
|
1051
|
+
client_ip_in: str | Omit = omit,
|
|
1052
|
+
client_ip_ne: str | Omit = omit,
|
|
1053
|
+
client_ip_not_in: str | Omit = omit,
|
|
1054
|
+
cname_contains: str | Omit = omit,
|
|
1055
|
+
cname_eq: str | Omit = omit,
|
|
1056
|
+
cname_in: str | Omit = omit,
|
|
1057
|
+
cname_ne: str | Omit = omit,
|
|
1058
|
+
cname_not_in: str | Omit = omit,
|
|
1059
|
+
datacenter_eq: str | Omit = omit,
|
|
1060
|
+
datacenter_in: str | Omit = omit,
|
|
1061
|
+
datacenter_ne: str | Omit = omit,
|
|
1062
|
+
datacenter_not_in: str | Omit = omit,
|
|
1063
|
+
fields: str | Omit = omit,
|
|
1064
|
+
limit: int | Omit = omit,
|
|
1065
|
+
method_eq: str | Omit = omit,
|
|
1066
|
+
method_in: str | Omit = omit,
|
|
1067
|
+
method_ne: str | Omit = omit,
|
|
1068
|
+
method_not_in: str | Omit = omit,
|
|
1069
|
+
offset: int | Omit = omit,
|
|
1070
|
+
resource_id_eq: int | Omit = omit,
|
|
1071
|
+
resource_id_gt: int | Omit = omit,
|
|
1072
|
+
resource_id_gte: int | Omit = omit,
|
|
1073
|
+
resource_id_in: str | Omit = omit,
|
|
1074
|
+
resource_id_lt: int | Omit = omit,
|
|
1075
|
+
resource_id_lte: int | Omit = omit,
|
|
1076
|
+
resource_id_ne: int | Omit = omit,
|
|
1077
|
+
resource_id_not_in: str | Omit = omit,
|
|
1078
|
+
size_eq: int | Omit = omit,
|
|
1079
|
+
size_gt: int | Omit = omit,
|
|
1080
|
+
size_gte: int | Omit = omit,
|
|
1081
|
+
size_in: str | Omit = omit,
|
|
1082
|
+
size_lt: int | Omit = omit,
|
|
1083
|
+
size_lte: int | Omit = omit,
|
|
1084
|
+
size_ne: int | Omit = omit,
|
|
1085
|
+
size_not_in: str | Omit = omit,
|
|
1086
|
+
sort: str | Omit = omit,
|
|
1087
|
+
status_eq: int | Omit = omit,
|
|
1088
|
+
status_gt: int | Omit = omit,
|
|
1089
|
+
status_gte: int | Omit = omit,
|
|
1090
|
+
status_in: str | Omit = omit,
|
|
1091
|
+
status_lt: int | Omit = omit,
|
|
1092
|
+
status_lte: int | Omit = omit,
|
|
1093
|
+
status_ne: int | Omit = omit,
|
|
1094
|
+
status_not_in: str | Omit = omit,
|
|
1095
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1096
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1097
|
+
extra_headers: Headers | None = None,
|
|
1098
|
+
extra_query: Query | None = None,
|
|
1099
|
+
extra_body: Body | None = None,
|
|
1100
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
1101
|
+
) -> AsyncBinaryAPIResponse:
|
|
1102
|
+
"""
|
|
1103
|
+
Download CDN logs for up to 3 days starting today.
|
|
1104
|
+
|
|
1105
|
+
You can filter logs using query params by client IP, CDN resource, date, path
|
|
1106
|
+
and etc.
|
|
1107
|
+
|
|
1108
|
+
Args:
|
|
1109
|
+
format: Output format.
|
|
1110
|
+
|
|
1111
|
+
Possible values:
|
|
1112
|
+
|
|
1113
|
+
- csv
|
|
1114
|
+
- tsv
|
|
1115
|
+
|
|
1116
|
+
from_: Start date and time of the requested time period (ISO 8601/RFC 3339 format,
|
|
1117
|
+
UTC.)
|
|
1118
|
+
|
|
1119
|
+
Difference between "from" and "to" cannot exceed 6 hours.
|
|
1120
|
+
|
|
1121
|
+
Examples:
|
|
1122
|
+
|
|
1123
|
+
- &from=2021-06-14T00:00:00Z
|
|
1124
|
+
- &from=2021-06-14T00:00:00.000Z
|
|
1125
|
+
|
|
1126
|
+
to: End date and time of the requested time period (ISO 8601/RFC 3339 format, UTC.)
|
|
1127
|
+
|
|
1128
|
+
Difference between "from" and "to" cannot exceed 6 hours.
|
|
1129
|
+
|
|
1130
|
+
Examples:
|
|
1131
|
+
|
|
1132
|
+
- &to=2021-06-15T00:00:00Z
|
|
1133
|
+
- &to=2021-06-15T00:00:00.000Z
|
|
1134
|
+
|
|
1135
|
+
cache_status_eq: Caching status. Possible values: 'MISS', 'BYPASS', 'EXPIRED', 'STALE',
|
|
1136
|
+
'PENDING', 'UPDATING', 'REVALIDATED', 'HIT', '-'.
|
|
1137
|
+
|
|
1138
|
+
cache_status_in: List of caching statuses. Possible values: 'MISS', 'BYPASS', 'EXPIRED', 'STALE',
|
|
1139
|
+
'PENDING', 'UPDATING', 'REVALIDATED', 'HIT', '-'. Values should be separated by
|
|
1140
|
+
a comma.
|
|
1141
|
+
|
|
1142
|
+
cache_status_ne: Caching status not equal to the specified value. Possible values: 'MISS',
|
|
1143
|
+
'BYPASS', 'EXPIRED', 'STALE', 'PENDING', 'UPDATING', 'REVALIDATED', 'HIT', '-'.
|
|
1144
|
+
|
|
1145
|
+
cache_status_not_in:
|
|
1146
|
+
List of caching statuses not equal to the specified values. Possible values:
|
|
1147
|
+
'MISS', 'BYPASS', 'EXPIRED', 'STALE', 'PENDING', 'UPDATING', 'REVALIDATED',
|
|
1148
|
+
'HIT', '-'. Values should be separated by a comma.
|
|
1149
|
+
|
|
1150
|
+
client_ip_eq: IP address of the client who sent the request.
|
|
1151
|
+
|
|
1152
|
+
client_ip_in: List of IP addresses of the clients who sent the request.
|
|
1153
|
+
|
|
1154
|
+
client_ip_ne: IP address of the client who did not send the request.
|
|
1155
|
+
|
|
1156
|
+
client_ip_not_in: List of IP addresses of the clients who did not send the request.
|
|
1157
|
+
|
|
1158
|
+
cname_contains: Part of the custom domain of the requested CDN resource. Minimum length is 3
|
|
1159
|
+
characters.
|
|
1160
|
+
|
|
1161
|
+
cname_eq: Custom domain of the requested CDN resource.
|
|
1162
|
+
|
|
1163
|
+
cname_in: List of custom domains of the requested CDN resource. Values should be separated
|
|
1164
|
+
by a comma.
|
|
1165
|
+
|
|
1166
|
+
cname_ne: Custom domain of the requested CDN resource not equal to the specified value.
|
|
1167
|
+
|
|
1168
|
+
cname_not_in: List of custom domains of the requested CDN resource not equal to the specified
|
|
1169
|
+
values. Values should be separated by a comma.
|
|
1170
|
+
|
|
1171
|
+
datacenter_eq: Data center where request was processed.
|
|
1172
|
+
|
|
1173
|
+
datacenter_in: List of data centers where request was processed. Values should be separated by
|
|
1174
|
+
a comma.
|
|
1175
|
+
|
|
1176
|
+
datacenter_ne: Data center where request was not processed.
|
|
1177
|
+
|
|
1178
|
+
datacenter_not_in: List of data centers where request was not processed. Values should be separated
|
|
1179
|
+
by a comma.
|
|
1180
|
+
|
|
1181
|
+
fields: A comma-separated list of returned fields.
|
|
1182
|
+
|
|
1183
|
+
Supported fields are presented in the responses section.
|
|
1184
|
+
|
|
1185
|
+
Example:
|
|
1186
|
+
|
|
1187
|
+
- &fields=timestamp,path,status
|
|
1188
|
+
|
|
1189
|
+
limit: Maximum number of log records in the response.
|
|
1190
|
+
|
|
1191
|
+
method_eq: Request HTTP method. Possible values: 'CONNECT', 'DELETE', 'GET', 'HEAD',
|
|
1192
|
+
'OPTIONS', 'PATCH', 'POST', 'PUT', 'TRACE'.
|
|
1193
|
+
|
|
1194
|
+
method_in: Request HTTP method. Possible values: 'CONNECT', 'DELETE', 'GET', 'HEAD',
|
|
1195
|
+
'OPTIONS', 'PATCH', 'POST', 'PUT', 'TRACE'. Values should be separated by a
|
|
1196
|
+
comma.
|
|
1197
|
+
|
|
1198
|
+
method_ne: Request HTTP method. Possible values: 'CONNECT', 'DELETE', 'GET', 'HEAD',
|
|
1199
|
+
'OPTIONS', 'PATCH', 'POST', 'PUT', 'TRACE'.
|
|
1200
|
+
|
|
1201
|
+
method_not_in: Request HTTP method. Possible values: 'CONNECT', 'DELETE', 'GET', 'HEAD',
|
|
1202
|
+
'OPTIONS', 'PATCH', 'POST', 'PUT', 'TRACE'. Values should be separated by a
|
|
1203
|
+
comma.
|
|
1204
|
+
|
|
1205
|
+
offset: Number of log records to skip starting from the beginning of the requested
|
|
1206
|
+
period.
|
|
1207
|
+
|
|
1208
|
+
resource_id_eq: ID of the requested CDN resource equal to the specified value.
|
|
1209
|
+
|
|
1210
|
+
resource_id_gt: ID of the requested CDN resource greater than the specified value.
|
|
1211
|
+
|
|
1212
|
+
resource_id_gte: ID of the requested CDN resource greater than or equal to the specified value.
|
|
1213
|
+
|
|
1214
|
+
resource_id_in: List of IDs of the requested CDN resource. Values should be separated by a
|
|
1215
|
+
comma.
|
|
1216
|
+
|
|
1217
|
+
resource_id_lt: ID of the requested CDN resource less than the specified value.
|
|
1218
|
+
|
|
1219
|
+
resource_id_lte: ID of the requested CDN resource less than or equal to the specified value.
|
|
1220
|
+
|
|
1221
|
+
resource_id_ne: ID of the requested CDN resource not equal to the specified value.
|
|
1222
|
+
|
|
1223
|
+
resource_id_not_in: List of IDs of the requested CDN resource not equal to the specified values.
|
|
1224
|
+
Values should be separated by a comma.
|
|
1225
|
+
|
|
1226
|
+
size_eq: Response size in bytes equal to the specified value.
|
|
1227
|
+
|
|
1228
|
+
size_gt: Response size in bytes greater than the specified value.
|
|
1229
|
+
|
|
1230
|
+
size_gte: Response size in bytes greater than or equal to the specified value.
|
|
1231
|
+
|
|
1232
|
+
size_in: List of response sizes in bytes. Values should be separated by a comma.
|
|
1233
|
+
|
|
1234
|
+
size_lt: Response size in bytes less than the specified value.
|
|
1235
|
+
|
|
1236
|
+
size_lte: Response size in bytes less than or equal to the specified value.
|
|
1237
|
+
|
|
1238
|
+
size_ne: Response size in bytes not equal to the specified value.
|
|
1239
|
+
|
|
1240
|
+
size_not_in: List of response sizes in bytes not equal to the specified values. Values should
|
|
1241
|
+
be separated by
|
|
1242
|
+
|
|
1243
|
+
sort: Sorting rules.
|
|
1244
|
+
|
|
1245
|
+
Possible values:
|
|
1246
|
+
|
|
1247
|
+
- **method** - Request HTTP method.
|
|
1248
|
+
- **`client_ip`** - IP address of the client who sent the request.
|
|
1249
|
+
- **status** - Status code in the response.
|
|
1250
|
+
- **size** - Response size in bytes.
|
|
1251
|
+
- **cname** - Custom domain of the requested resource.
|
|
1252
|
+
- **`resource_id`** - ID of the requested CDN resource.
|
|
1253
|
+
- **`cache_status`** - Caching status.
|
|
1254
|
+
- **datacenter** - Data center where request was processed.
|
|
1255
|
+
- **timestamp** - Date and time when the request was made.
|
|
1256
|
+
|
|
1257
|
+
May include multiple values separated by a comma.
|
|
1258
|
+
|
|
1259
|
+
Example:
|
|
1260
|
+
|
|
1261
|
+
- &sort=-timestamp,status
|
|
1262
|
+
|
|
1263
|
+
status_eq: Status code in the response equal to the specified value.
|
|
1264
|
+
|
|
1265
|
+
status_gt: Status code in the response greater than the specified value.
|
|
1266
|
+
|
|
1267
|
+
status_gte: Status code in the response greater than or equal to the specified value.
|
|
1268
|
+
|
|
1269
|
+
status_in: List of status codes in the response. Values should be separated by a comma.
|
|
1270
|
+
|
|
1271
|
+
status_lt: Status code in the response less than the specified value.
|
|
1272
|
+
|
|
1273
|
+
status_lte: Status code in the response less than or equal to the specified value.
|
|
1274
|
+
|
|
1275
|
+
status_ne: Status code in the response not equal to the specified value.
|
|
1276
|
+
|
|
1277
|
+
status_not_in: List of status codes not in the response. Values should be separated by a comma.
|
|
1278
|
+
|
|
1279
|
+
extra_headers: Send extra headers
|
|
1280
|
+
|
|
1281
|
+
extra_query: Add additional query parameters to the request
|
|
1282
|
+
|
|
1283
|
+
extra_body: Add additional JSON properties to the request
|
|
1284
|
+
|
|
1285
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
1286
|
+
"""
|
|
1287
|
+
extra_headers = {"Accept": "application/zip", **(extra_headers or {})}
|
|
1288
|
+
return await self._get(
|
|
1289
|
+
"/cdn/advanced/v1/logs/download"
|
|
1290
|
+
if self._client._base_url_overridden
|
|
1291
|
+
else "https://api.gcore.com//cdn/advanced/v1/logs/download",
|
|
1292
|
+
options=make_request_options(
|
|
1293
|
+
extra_headers=extra_headers,
|
|
1294
|
+
extra_query=extra_query,
|
|
1295
|
+
extra_body=extra_body,
|
|
1296
|
+
timeout=timeout,
|
|
1297
|
+
query=await async_maybe_transform(
|
|
1298
|
+
{
|
|
1299
|
+
"format": format,
|
|
1300
|
+
"from_": from_,
|
|
1301
|
+
"to": to,
|
|
1302
|
+
"cache_status_eq": cache_status_eq,
|
|
1303
|
+
"cache_status_in": cache_status_in,
|
|
1304
|
+
"cache_status_ne": cache_status_ne,
|
|
1305
|
+
"cache_status_not_in": cache_status_not_in,
|
|
1306
|
+
"client_ip_eq": client_ip_eq,
|
|
1307
|
+
"client_ip_in": client_ip_in,
|
|
1308
|
+
"client_ip_ne": client_ip_ne,
|
|
1309
|
+
"client_ip_not_in": client_ip_not_in,
|
|
1310
|
+
"cname_contains": cname_contains,
|
|
1311
|
+
"cname_eq": cname_eq,
|
|
1312
|
+
"cname_in": cname_in,
|
|
1313
|
+
"cname_ne": cname_ne,
|
|
1314
|
+
"cname_not_in": cname_not_in,
|
|
1315
|
+
"datacenter_eq": datacenter_eq,
|
|
1316
|
+
"datacenter_in": datacenter_in,
|
|
1317
|
+
"datacenter_ne": datacenter_ne,
|
|
1318
|
+
"datacenter_not_in": datacenter_not_in,
|
|
1319
|
+
"fields": fields,
|
|
1320
|
+
"limit": limit,
|
|
1321
|
+
"method_eq": method_eq,
|
|
1322
|
+
"method_in": method_in,
|
|
1323
|
+
"method_ne": method_ne,
|
|
1324
|
+
"method_not_in": method_not_in,
|
|
1325
|
+
"offset": offset,
|
|
1326
|
+
"resource_id_eq": resource_id_eq,
|
|
1327
|
+
"resource_id_gt": resource_id_gt,
|
|
1328
|
+
"resource_id_gte": resource_id_gte,
|
|
1329
|
+
"resource_id_in": resource_id_in,
|
|
1330
|
+
"resource_id_lt": resource_id_lt,
|
|
1331
|
+
"resource_id_lte": resource_id_lte,
|
|
1332
|
+
"resource_id_ne": resource_id_ne,
|
|
1333
|
+
"resource_id_not_in": resource_id_not_in,
|
|
1334
|
+
"size_eq": size_eq,
|
|
1335
|
+
"size_gt": size_gt,
|
|
1336
|
+
"size_gte": size_gte,
|
|
1337
|
+
"size_in": size_in,
|
|
1338
|
+
"size_lt": size_lt,
|
|
1339
|
+
"size_lte": size_lte,
|
|
1340
|
+
"size_ne": size_ne,
|
|
1341
|
+
"size_not_in": size_not_in,
|
|
1342
|
+
"sort": sort,
|
|
1343
|
+
"status_eq": status_eq,
|
|
1344
|
+
"status_gt": status_gt,
|
|
1345
|
+
"status_gte": status_gte,
|
|
1346
|
+
"status_in": status_in,
|
|
1347
|
+
"status_lt": status_lt,
|
|
1348
|
+
"status_lte": status_lte,
|
|
1349
|
+
"status_ne": status_ne,
|
|
1350
|
+
"status_not_in": status_not_in,
|
|
1351
|
+
},
|
|
1352
|
+
log_download_params.LogDownloadParams,
|
|
1353
|
+
),
|
|
1354
|
+
),
|
|
1355
|
+
cast_to=AsyncBinaryAPIResponse,
|
|
1356
|
+
)
|
|
1357
|
+
|
|
1358
|
+
|
|
1359
|
+
class LogsResourceWithRawResponse:
|
|
1360
|
+
def __init__(self, logs: LogsResource) -> None:
|
|
1361
|
+
self._logs = logs
|
|
1362
|
+
|
|
1363
|
+
self.list = to_raw_response_wrapper(
|
|
1364
|
+
logs.list,
|
|
1365
|
+
)
|
|
1366
|
+
self.download = to_custom_raw_response_wrapper(
|
|
1367
|
+
logs.download,
|
|
1368
|
+
BinaryAPIResponse,
|
|
1369
|
+
)
|
|
1370
|
+
|
|
1371
|
+
@cached_property
|
|
1372
|
+
def settings(self) -> SettingsResourceWithRawResponse:
|
|
1373
|
+
return SettingsResourceWithRawResponse(self._logs.settings)
|
|
1374
|
+
|
|
1375
|
+
|
|
1376
|
+
class AsyncLogsResourceWithRawResponse:
|
|
1377
|
+
def __init__(self, logs: AsyncLogsResource) -> None:
|
|
1378
|
+
self._logs = logs
|
|
1379
|
+
|
|
1380
|
+
self.list = async_to_raw_response_wrapper(
|
|
1381
|
+
logs.list,
|
|
1382
|
+
)
|
|
1383
|
+
self.download = async_to_custom_raw_response_wrapper(
|
|
1384
|
+
logs.download,
|
|
1385
|
+
AsyncBinaryAPIResponse,
|
|
1386
|
+
)
|
|
1387
|
+
|
|
1388
|
+
@cached_property
|
|
1389
|
+
def settings(self) -> AsyncSettingsResourceWithRawResponse:
|
|
1390
|
+
return AsyncSettingsResourceWithRawResponse(self._logs.settings)
|
|
1391
|
+
|
|
1392
|
+
|
|
1393
|
+
class LogsResourceWithStreamingResponse:
|
|
1394
|
+
def __init__(self, logs: LogsResource) -> None:
|
|
1395
|
+
self._logs = logs
|
|
1396
|
+
|
|
1397
|
+
self.list = to_streamed_response_wrapper(
|
|
1398
|
+
logs.list,
|
|
1399
|
+
)
|
|
1400
|
+
self.download = to_custom_streamed_response_wrapper(
|
|
1401
|
+
logs.download,
|
|
1402
|
+
StreamedBinaryAPIResponse,
|
|
1403
|
+
)
|
|
1404
|
+
|
|
1405
|
+
@cached_property
|
|
1406
|
+
def settings(self) -> SettingsResourceWithStreamingResponse:
|
|
1407
|
+
return SettingsResourceWithStreamingResponse(self._logs.settings)
|
|
1408
|
+
|
|
1409
|
+
|
|
1410
|
+
class AsyncLogsResourceWithStreamingResponse:
|
|
1411
|
+
def __init__(self, logs: AsyncLogsResource) -> None:
|
|
1412
|
+
self._logs = logs
|
|
1413
|
+
|
|
1414
|
+
self.list = async_to_streamed_response_wrapper(
|
|
1415
|
+
logs.list,
|
|
1416
|
+
)
|
|
1417
|
+
self.download = async_to_custom_streamed_response_wrapper(
|
|
1418
|
+
logs.download,
|
|
1419
|
+
AsyncStreamedBinaryAPIResponse,
|
|
1420
|
+
)
|
|
1421
|
+
|
|
1422
|
+
@cached_property
|
|
1423
|
+
def settings(self) -> AsyncSettingsResourceWithStreamingResponse:
|
|
1424
|
+
return AsyncSettingsResourceWithStreamingResponse(self._logs.settings)
|