gcore 0.7.0__py3-none-any.whl → 0.9.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.
- gcore/_base_client.py +4 -1
- gcore/_client.py +9 -0
- gcore/_files.py +4 -4
- gcore/_version.py +1 -1
- gcore/pagination.py +0 -62
- gcore/resources/__init__.py +14 -0
- gcore/resources/cloud/cost_reports.py +24 -0
- gcore/resources/cloud/quotas/requests.py +7 -15
- gcore/resources/fastedge/binaries.py +81 -1
- gcore/resources/iam/users.py +5 -5
- gcore/resources/security/__init__.py +75 -0
- gcore/resources/security/bgp_announces.py +308 -0
- gcore/resources/security/events.py +234 -0
- gcore/resources/security/profile_templates.py +143 -0
- gcore/resources/security/profiles.py +661 -0
- gcore/resources/security/security.py +198 -0
- gcore/types/cloud/cost_report_get_aggregated_monthly_params.py +3 -0
- gcore/types/cloud/cost_report_get_aggregated_params.py +3 -0
- gcore/types/cloud/cost_report_get_detailed_params.py +3 -0
- gcore/types/cloud/floating_ip.py +0 -9
- gcore/types/cloud/floating_ip_detailed.py +0 -9
- gcore/types/cloud/gpu_baremetal_flavor.py +16 -0
- gcore/types/cloud/quotas/request_list_params.py +2 -2
- gcore/types/cloud/region.py +6 -3
- gcore/types/cloud/subnet.py +1 -1
- gcore/types/fastedge/__init__.py +1 -0
- gcore/types/fastedge/binary_create_params.py +11 -0
- gcore/types/security/__init__.py +18 -0
- gcore/types/security/bgp_announce_change_params.py +16 -0
- gcore/types/security/bgp_announce_list_params.py +18 -0
- gcore/types/security/bgp_announce_list_response.py +10 -0
- gcore/types/security/client_announce.py +15 -0
- gcore/types/security/client_profile.py +56 -0
- gcore/types/security/client_profile_template.py +43 -0
- gcore/types/security/client_view.py +29 -0
- gcore/types/security/event_list_params.py +38 -0
- gcore/types/security/profile_create_params.py +24 -0
- gcore/types/security/profile_list_params.py +17 -0
- gcore/types/security/profile_list_response.py +10 -0
- gcore/types/security/profile_recreate_params.py +24 -0
- gcore/types/security/profile_replace_params.py +24 -0
- gcore/types/security/profile_template_list_response.py +10 -0
- {gcore-0.7.0.dist-info → gcore-0.9.0.dist-info}/METADATA +1 -1
- {gcore-0.7.0.dist-info → gcore-0.9.0.dist-info}/RECORD +46 -24
- {gcore-0.7.0.dist-info → gcore-0.9.0.dist-info}/WHEEL +0 -0
- {gcore-0.7.0.dist-info → gcore-0.9.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,143 @@
|
|
|
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 ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
|
8
|
+
from ..._compat import cached_property
|
|
9
|
+
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
10
|
+
from ..._response import (
|
|
11
|
+
to_raw_response_wrapper,
|
|
12
|
+
to_streamed_response_wrapper,
|
|
13
|
+
async_to_raw_response_wrapper,
|
|
14
|
+
async_to_streamed_response_wrapper,
|
|
15
|
+
)
|
|
16
|
+
from ..._base_client import make_request_options
|
|
17
|
+
from ...types.security.profile_template_list_response import ProfileTemplateListResponse
|
|
18
|
+
|
|
19
|
+
__all__ = ["ProfileTemplatesResource", "AsyncProfileTemplatesResource"]
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class ProfileTemplatesResource(SyncAPIResource):
|
|
23
|
+
@cached_property
|
|
24
|
+
def with_raw_response(self) -> ProfileTemplatesResourceWithRawResponse:
|
|
25
|
+
"""
|
|
26
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
27
|
+
the raw response object instead of the parsed content.
|
|
28
|
+
|
|
29
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
30
|
+
"""
|
|
31
|
+
return ProfileTemplatesResourceWithRawResponse(self)
|
|
32
|
+
|
|
33
|
+
@cached_property
|
|
34
|
+
def with_streaming_response(self) -> ProfileTemplatesResourceWithStreamingResponse:
|
|
35
|
+
"""
|
|
36
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
37
|
+
|
|
38
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
39
|
+
"""
|
|
40
|
+
return ProfileTemplatesResourceWithStreamingResponse(self)
|
|
41
|
+
|
|
42
|
+
def list(
|
|
43
|
+
self,
|
|
44
|
+
*,
|
|
45
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
46
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
47
|
+
extra_headers: Headers | None = None,
|
|
48
|
+
extra_query: Query | None = None,
|
|
49
|
+
extra_body: Body | None = None,
|
|
50
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
51
|
+
) -> ProfileTemplateListResponse:
|
|
52
|
+
"""Get list of profile templates.
|
|
53
|
+
|
|
54
|
+
Profile template is used as a template to create
|
|
55
|
+
profile. Client receives only common and created for him profile templates.
|
|
56
|
+
"""
|
|
57
|
+
return self._get(
|
|
58
|
+
"/security/iaas/profile-templates",
|
|
59
|
+
options=make_request_options(
|
|
60
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
61
|
+
),
|
|
62
|
+
cast_to=ProfileTemplateListResponse,
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
class AsyncProfileTemplatesResource(AsyncAPIResource):
|
|
67
|
+
@cached_property
|
|
68
|
+
def with_raw_response(self) -> AsyncProfileTemplatesResourceWithRawResponse:
|
|
69
|
+
"""
|
|
70
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
71
|
+
the raw response object instead of the parsed content.
|
|
72
|
+
|
|
73
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
74
|
+
"""
|
|
75
|
+
return AsyncProfileTemplatesResourceWithRawResponse(self)
|
|
76
|
+
|
|
77
|
+
@cached_property
|
|
78
|
+
def with_streaming_response(self) -> AsyncProfileTemplatesResourceWithStreamingResponse:
|
|
79
|
+
"""
|
|
80
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
81
|
+
|
|
82
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
83
|
+
"""
|
|
84
|
+
return AsyncProfileTemplatesResourceWithStreamingResponse(self)
|
|
85
|
+
|
|
86
|
+
async def list(
|
|
87
|
+
self,
|
|
88
|
+
*,
|
|
89
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
90
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
91
|
+
extra_headers: Headers | None = None,
|
|
92
|
+
extra_query: Query | None = None,
|
|
93
|
+
extra_body: Body | None = None,
|
|
94
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
95
|
+
) -> ProfileTemplateListResponse:
|
|
96
|
+
"""Get list of profile templates.
|
|
97
|
+
|
|
98
|
+
Profile template is used as a template to create
|
|
99
|
+
profile. Client receives only common and created for him profile templates.
|
|
100
|
+
"""
|
|
101
|
+
return await self._get(
|
|
102
|
+
"/security/iaas/profile-templates",
|
|
103
|
+
options=make_request_options(
|
|
104
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
105
|
+
),
|
|
106
|
+
cast_to=ProfileTemplateListResponse,
|
|
107
|
+
)
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
class ProfileTemplatesResourceWithRawResponse:
|
|
111
|
+
def __init__(self, profile_templates: ProfileTemplatesResource) -> None:
|
|
112
|
+
self._profile_templates = profile_templates
|
|
113
|
+
|
|
114
|
+
self.list = to_raw_response_wrapper(
|
|
115
|
+
profile_templates.list,
|
|
116
|
+
)
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
class AsyncProfileTemplatesResourceWithRawResponse:
|
|
120
|
+
def __init__(self, profile_templates: AsyncProfileTemplatesResource) -> None:
|
|
121
|
+
self._profile_templates = profile_templates
|
|
122
|
+
|
|
123
|
+
self.list = async_to_raw_response_wrapper(
|
|
124
|
+
profile_templates.list,
|
|
125
|
+
)
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
class ProfileTemplatesResourceWithStreamingResponse:
|
|
129
|
+
def __init__(self, profile_templates: ProfileTemplatesResource) -> None:
|
|
130
|
+
self._profile_templates = profile_templates
|
|
131
|
+
|
|
132
|
+
self.list = to_streamed_response_wrapper(
|
|
133
|
+
profile_templates.list,
|
|
134
|
+
)
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
class AsyncProfileTemplatesResourceWithStreamingResponse:
|
|
138
|
+
def __init__(self, profile_templates: AsyncProfileTemplatesResource) -> None:
|
|
139
|
+
self._profile_templates = profile_templates
|
|
140
|
+
|
|
141
|
+
self.list = async_to_streamed_response_wrapper(
|
|
142
|
+
profile_templates.list,
|
|
143
|
+
)
|