cribl-control-plane 0.0.25__py3-none-any.whl → 0.0.26__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 cribl-control-plane might be problematic. Click here for more details.
- cribl_control_plane/_version.py +3 -3
- cribl_control_plane/destinations.py +10 -8
- cribl_control_plane/errors/healthstatus_error.py +1 -1
- cribl_control_plane/groups_sdk.py +10 -10
- cribl_control_plane/{healthinfo.py → health.py} +3 -1
- cribl_control_plane/models/__init__.py +3 -27
- cribl_control_plane/models/healthstatus.py +3 -3
- cribl_control_plane/models/inputappscope.py +5 -5
- cribl_control_plane/models/inputcollection.py +2 -2
- cribl_control_plane/models/inputconfluentcloud.py +3 -3
- cribl_control_plane/models/inputcribl.py +5 -5
- cribl_control_plane/models/inputcriblhttp.py +3 -3
- cribl_control_plane/models/inputcribllakehttp.py +3 -3
- cribl_control_plane/models/inputcriblmetrics.py +5 -5
- cribl_control_plane/models/inputcribltcp.py +3 -3
- cribl_control_plane/models/inputdatadogagent.py +3 -3
- cribl_control_plane/models/inputedgeprometheus.py +3 -3
- cribl_control_plane/models/inputelastic.py +3 -3
- cribl_control_plane/models/inputeventhub.py +3 -3
- cribl_control_plane/models/inputfile.py +5 -5
- cribl_control_plane/models/inputfirehose.py +3 -3
- cribl_control_plane/models/inputgooglepubsub.py +3 -3
- cribl_control_plane/models/inputgrafana.py +6 -6
- cribl_control_plane/models/inputhttp.py +3 -3
- cribl_control_plane/models/inputhttpraw.py +3 -3
- cribl_control_plane/models/inputjournalfiles.py +3 -3
- cribl_control_plane/models/inputkafka.py +3 -3
- cribl_control_plane/models/inputkinesis.py +3 -3
- cribl_control_plane/models/inputkubeevents.py +5 -5
- cribl_control_plane/models/inputkubelogs.py +5 -5
- cribl_control_plane/models/inputkubemetrics.py +5 -5
- cribl_control_plane/models/inputloki.py +3 -3
- cribl_control_plane/models/inputmodeldriventelemetry.py +3 -3
- cribl_control_plane/models/inputmsk.py +3 -3
- cribl_control_plane/models/inputnetflow.py +3 -3
- cribl_control_plane/models/inputoffice365mgmt.py +3 -3
- cribl_control_plane/models/inputoffice365msgtrace.py +3 -3
- cribl_control_plane/models/inputoffice365service.py +3 -3
- cribl_control_plane/models/inputopentelemetry.py +3 -3
- cribl_control_plane/models/inputprometheus.py +3 -3
- cribl_control_plane/models/inputprometheusrw.py +3 -3
- cribl_control_plane/models/inputrawudp.py +3 -3
- cribl_control_plane/models/inputsnmp.py +3 -3
- cribl_control_plane/models/inputsplunk.py +3 -3
- cribl_control_plane/models/inputsplunkhec.py +3 -3
- cribl_control_plane/models/inputsplunksearch.py +3 -3
- cribl_control_plane/models/inputsqs.py +3 -3
- cribl_control_plane/models/inputsystemmetrics.py +5 -5
- cribl_control_plane/models/inputsystemstate.py +5 -5
- cribl_control_plane/models/inputtcp.py +3 -3
- cribl_control_plane/models/inputtcpjson.py +3 -3
- cribl_control_plane/models/inputwef.py +3 -3
- cribl_control_plane/models/inputwindowsmetrics.py +5 -5
- cribl_control_plane/models/inputwiz.py +3 -3
- cribl_control_plane/models/inputzscalerhec.py +3 -3
- cribl_control_plane/models/outputazureblob.py +3 -3
- cribl_control_plane/models/outputazuredataexplorer.py +3 -3
- cribl_control_plane/models/outputazureeventhub.py +3 -3
- cribl_control_plane/models/outputclickhouse.py +3 -3
- cribl_control_plane/models/outputcloudwatch.py +3 -3
- cribl_control_plane/models/outputconfluentcloud.py +3 -3
- cribl_control_plane/models/outputcriblhttp.py +5 -5
- cribl_control_plane/models/outputcribllake.py +5 -5
- cribl_control_plane/models/outputcribltcp.py +5 -5
- cribl_control_plane/models/outputcrowdstrikenextgensiem.py +3 -3
- cribl_control_plane/models/outputdatadog.py +5 -5
- cribl_control_plane/models/outputdataset.py +5 -5
- cribl_control_plane/models/outputdevnull.py +5 -5
- cribl_control_plane/models/outputdiskspool.py +5 -5
- cribl_control_plane/models/outputdls3.py +3 -3
- cribl_control_plane/models/outputdynatracehttp.py +3 -3
- cribl_control_plane/models/outputdynatraceotlp.py +3 -3
- cribl_control_plane/models/outputelasticcloud.py +3 -3
- cribl_control_plane/models/outputexabeam.py +3 -3
- cribl_control_plane/models/outputgooglecloudlogging.py +3 -3
- cribl_control_plane/models/outputgooglecloudstorage.py +3 -3
- cribl_control_plane/models/outputgrafanacloud.py +10 -10
- cribl_control_plane/models/outputgraphite.py +3 -3
- cribl_control_plane/models/outputhumiohec.py +3 -3
- cribl_control_plane/models/outputkafka.py +3 -3
- cribl_control_plane/models/outputkinesis.py +3 -3
- cribl_control_plane/models/outputminio.py +3 -3
- cribl_control_plane/models/outputmsk.py +3 -3
- cribl_control_plane/models/outputnewrelic.py +5 -5
- cribl_control_plane/models/outputnewrelicevents.py +3 -3
- cribl_control_plane/models/outputring.py +5 -5
- cribl_control_plane/models/outputs3.py +3 -3
- cribl_control_plane/models/outputsecuritylake.py +3 -3
- cribl_control_plane/models/outputsentinel.py +3 -3
- cribl_control_plane/models/outputsentineloneaisiem.py +3 -3
- cribl_control_plane/models/outputservicenow.py +3 -3
- cribl_control_plane/models/outputsns.py +3 -3
- cribl_control_plane/models/outputsplunk.py +3 -3
- cribl_control_plane/models/outputsplunkhec.py +5 -5
- cribl_control_plane/models/outputsqs.py +3 -3
- cribl_control_plane/models/outputstatsd.py +3 -3
- cribl_control_plane/models/outputstatsdext.py +3 -3
- cribl_control_plane/models/outputsyslog.py +5 -5
- cribl_control_plane/models/outputtcpjson.py +5 -5
- cribl_control_plane/models/outputwebhook.py +5 -5
- cribl_control_plane/models/outputxsiam.py +5 -5
- cribl_control_plane/nodes.py +252 -68
- cribl_control_plane/sdk.py +8 -12
- cribl_control_plane/sources.py +2 -0
- cribl_control_plane/versioning.py +10 -10
- {cribl_control_plane-0.0.25.dist-info → cribl_control_plane-0.0.26.dist-info}/METADATA +20 -27
- {cribl_control_plane-0.0.25.dist-info → cribl_control_plane-0.0.26.dist-info}/RECORD +108 -112
- cribl_control_plane/deployments.py +0 -185
- cribl_control_plane/models/restartresponse.py +0 -26
- cribl_control_plane/models/updateworkersrestartop.py +0 -24
- cribl_control_plane/workers_sdk.py +0 -187
- {cribl_control_plane-0.0.25.dist-info → cribl_control_plane-0.0.26.dist-info}/WHEEL +0 -0
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
-
|
|
3
|
-
from .basesdk import BaseSDK
|
|
4
|
-
from cribl_control_plane import errors, models, utils
|
|
5
|
-
from cribl_control_plane._hooks import HookContext
|
|
6
|
-
from cribl_control_plane.types import OptionalNullable, UNSET
|
|
7
|
-
from cribl_control_plane.utils import get_security_from_env
|
|
8
|
-
from cribl_control_plane.utils.unmarshal_json_response import unmarshal_json_response
|
|
9
|
-
from typing import Any, Mapping, Optional
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
class Deployments(BaseSDK):
|
|
13
|
-
def get_summary(
|
|
14
|
-
self,
|
|
15
|
-
*,
|
|
16
|
-
mode: Optional[models.GetSummaryMode] = None,
|
|
17
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
18
|
-
server_url: Optional[str] = None,
|
|
19
|
-
timeout_ms: Optional[int] = None,
|
|
20
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
|
21
|
-
) -> models.GetSummaryResponse:
|
|
22
|
-
r"""Retrieve a summary of the Distributed deployment
|
|
23
|
-
|
|
24
|
-
Get summary of Distributed deployment
|
|
25
|
-
|
|
26
|
-
:param mode: product filter
|
|
27
|
-
:param retries: Override the default retry configuration for this method
|
|
28
|
-
:param server_url: Override the default server URL for this method
|
|
29
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
30
|
-
:param http_headers: Additional headers to set or replace on requests.
|
|
31
|
-
"""
|
|
32
|
-
base_url = None
|
|
33
|
-
url_variables = None
|
|
34
|
-
if timeout_ms is None:
|
|
35
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
|
36
|
-
|
|
37
|
-
if server_url is not None:
|
|
38
|
-
base_url = server_url
|
|
39
|
-
else:
|
|
40
|
-
base_url = self._get_url(base_url, url_variables)
|
|
41
|
-
|
|
42
|
-
request = models.GetSummaryRequest(
|
|
43
|
-
mode=mode,
|
|
44
|
-
)
|
|
45
|
-
|
|
46
|
-
req = self._build_request(
|
|
47
|
-
method="GET",
|
|
48
|
-
path="/master/summary",
|
|
49
|
-
base_url=base_url,
|
|
50
|
-
url_variables=url_variables,
|
|
51
|
-
request=request,
|
|
52
|
-
request_body_required=False,
|
|
53
|
-
request_has_path_params=False,
|
|
54
|
-
request_has_query_params=True,
|
|
55
|
-
user_agent_header="user-agent",
|
|
56
|
-
accept_header_value="application/json",
|
|
57
|
-
http_headers=http_headers,
|
|
58
|
-
security=self.sdk_configuration.security,
|
|
59
|
-
timeout_ms=timeout_ms,
|
|
60
|
-
)
|
|
61
|
-
|
|
62
|
-
if retries == UNSET:
|
|
63
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
|
64
|
-
retries = self.sdk_configuration.retry_config
|
|
65
|
-
|
|
66
|
-
retry_config = None
|
|
67
|
-
if isinstance(retries, utils.RetryConfig):
|
|
68
|
-
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
69
|
-
|
|
70
|
-
http_res = self.do_request(
|
|
71
|
-
hook_ctx=HookContext(
|
|
72
|
-
config=self.sdk_configuration,
|
|
73
|
-
base_url=base_url or "",
|
|
74
|
-
operation_id="getSummary",
|
|
75
|
-
oauth2_scopes=[],
|
|
76
|
-
security_source=get_security_from_env(
|
|
77
|
-
self.sdk_configuration.security, models.Security
|
|
78
|
-
),
|
|
79
|
-
),
|
|
80
|
-
request=req,
|
|
81
|
-
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
82
|
-
retry_config=retry_config,
|
|
83
|
-
)
|
|
84
|
-
|
|
85
|
-
response_data: Any = None
|
|
86
|
-
if utils.match_response(http_res, "200", "application/json"):
|
|
87
|
-
return unmarshal_json_response(models.GetSummaryResponse, http_res)
|
|
88
|
-
if utils.match_response(http_res, "500", "application/json"):
|
|
89
|
-
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
90
|
-
raise errors.Error(response_data, http_res)
|
|
91
|
-
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
92
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
93
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
94
|
-
if utils.match_response(http_res, "5XX", "*"):
|
|
95
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
96
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
97
|
-
|
|
98
|
-
raise errors.APIError("Unexpected response received", http_res)
|
|
99
|
-
|
|
100
|
-
async def get_summary_async(
|
|
101
|
-
self,
|
|
102
|
-
*,
|
|
103
|
-
mode: Optional[models.GetSummaryMode] = None,
|
|
104
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
105
|
-
server_url: Optional[str] = None,
|
|
106
|
-
timeout_ms: Optional[int] = None,
|
|
107
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
|
108
|
-
) -> models.GetSummaryResponse:
|
|
109
|
-
r"""Retrieve a summary of the Distributed deployment
|
|
110
|
-
|
|
111
|
-
Get summary of Distributed deployment
|
|
112
|
-
|
|
113
|
-
:param mode: product filter
|
|
114
|
-
:param retries: Override the default retry configuration for this method
|
|
115
|
-
:param server_url: Override the default server URL for this method
|
|
116
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
117
|
-
:param http_headers: Additional headers to set or replace on requests.
|
|
118
|
-
"""
|
|
119
|
-
base_url = None
|
|
120
|
-
url_variables = None
|
|
121
|
-
if timeout_ms is None:
|
|
122
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
|
123
|
-
|
|
124
|
-
if server_url is not None:
|
|
125
|
-
base_url = server_url
|
|
126
|
-
else:
|
|
127
|
-
base_url = self._get_url(base_url, url_variables)
|
|
128
|
-
|
|
129
|
-
request = models.GetSummaryRequest(
|
|
130
|
-
mode=mode,
|
|
131
|
-
)
|
|
132
|
-
|
|
133
|
-
req = self._build_request_async(
|
|
134
|
-
method="GET",
|
|
135
|
-
path="/master/summary",
|
|
136
|
-
base_url=base_url,
|
|
137
|
-
url_variables=url_variables,
|
|
138
|
-
request=request,
|
|
139
|
-
request_body_required=False,
|
|
140
|
-
request_has_path_params=False,
|
|
141
|
-
request_has_query_params=True,
|
|
142
|
-
user_agent_header="user-agent",
|
|
143
|
-
accept_header_value="application/json",
|
|
144
|
-
http_headers=http_headers,
|
|
145
|
-
security=self.sdk_configuration.security,
|
|
146
|
-
timeout_ms=timeout_ms,
|
|
147
|
-
)
|
|
148
|
-
|
|
149
|
-
if retries == UNSET:
|
|
150
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
|
151
|
-
retries = self.sdk_configuration.retry_config
|
|
152
|
-
|
|
153
|
-
retry_config = None
|
|
154
|
-
if isinstance(retries, utils.RetryConfig):
|
|
155
|
-
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
156
|
-
|
|
157
|
-
http_res = await self.do_request_async(
|
|
158
|
-
hook_ctx=HookContext(
|
|
159
|
-
config=self.sdk_configuration,
|
|
160
|
-
base_url=base_url or "",
|
|
161
|
-
operation_id="getSummary",
|
|
162
|
-
oauth2_scopes=[],
|
|
163
|
-
security_source=get_security_from_env(
|
|
164
|
-
self.sdk_configuration.security, models.Security
|
|
165
|
-
),
|
|
166
|
-
),
|
|
167
|
-
request=req,
|
|
168
|
-
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
169
|
-
retry_config=retry_config,
|
|
170
|
-
)
|
|
171
|
-
|
|
172
|
-
response_data: Any = None
|
|
173
|
-
if utils.match_response(http_res, "200", "application/json"):
|
|
174
|
-
return unmarshal_json_response(models.GetSummaryResponse, http_res)
|
|
175
|
-
if utils.match_response(http_res, "500", "application/json"):
|
|
176
|
-
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
177
|
-
raise errors.Error(response_data, http_res)
|
|
178
|
-
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
179
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
180
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
181
|
-
if utils.match_response(http_res, "5XX", "*"):
|
|
182
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
183
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
184
|
-
|
|
185
|
-
raise errors.APIError("Unexpected response received", http_res)
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
from cribl_control_plane.types import BaseModel
|
|
5
|
-
from enum import Enum
|
|
6
|
-
from typing import Optional
|
|
7
|
-
from typing_extensions import NotRequired, TypedDict
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class RestartResponseStatus(str, Enum):
|
|
11
|
-
ERROR = "Error"
|
|
12
|
-
RESTARTING = "Restarting"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
class RestartResponseTypedDict(TypedDict):
|
|
16
|
-
id: str
|
|
17
|
-
status: RestartResponseStatus
|
|
18
|
-
message: NotRequired[str]
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
class RestartResponse(BaseModel):
|
|
22
|
-
id: str
|
|
23
|
-
|
|
24
|
-
status: RestartResponseStatus
|
|
25
|
-
|
|
26
|
-
message: Optional[str] = None
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
from .restartresponse import RestartResponse, RestartResponseTypedDict
|
|
5
|
-
from cribl_control_plane.types import BaseModel
|
|
6
|
-
from typing import List, Optional
|
|
7
|
-
from typing_extensions import NotRequired, TypedDict
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class UpdateWorkersRestartResponseTypedDict(TypedDict):
|
|
11
|
-
r"""a list of RestartResponse objects"""
|
|
12
|
-
|
|
13
|
-
count: NotRequired[int]
|
|
14
|
-
r"""number of items present in the items array"""
|
|
15
|
-
items: NotRequired[List[RestartResponseTypedDict]]
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
class UpdateWorkersRestartResponse(BaseModel):
|
|
19
|
-
r"""a list of RestartResponse objects"""
|
|
20
|
-
|
|
21
|
-
count: Optional[int] = None
|
|
22
|
-
r"""number of items present in the items array"""
|
|
23
|
-
|
|
24
|
-
items: Optional[List[RestartResponse]] = None
|
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
-
|
|
3
|
-
from .basesdk import BaseSDK
|
|
4
|
-
from cribl_control_plane import errors, models, utils
|
|
5
|
-
from cribl_control_plane._hooks import HookContext
|
|
6
|
-
from cribl_control_plane.types import OptionalNullable, UNSET
|
|
7
|
-
from cribl_control_plane.utils import get_security_from_env
|
|
8
|
-
from cribl_control_plane.utils.unmarshal_json_response import unmarshal_json_response
|
|
9
|
-
from typing import Any, Mapping, Optional
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
class WorkersSDK(BaseSDK):
|
|
13
|
-
r"""Actions related to Workers"""
|
|
14
|
-
|
|
15
|
-
def get_summary_workers(
|
|
16
|
-
self,
|
|
17
|
-
*,
|
|
18
|
-
filter_exp: Optional[str] = None,
|
|
19
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
20
|
-
server_url: Optional[str] = None,
|
|
21
|
-
timeout_ms: Optional[int] = None,
|
|
22
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
|
23
|
-
) -> models.GetSummaryWorkersResponse:
|
|
24
|
-
r"""Retrieve a count of Worker and Edge Nodes
|
|
25
|
-
|
|
26
|
-
get worker and edge nodes count
|
|
27
|
-
|
|
28
|
-
:param filter_exp: Filter expression evaluated against nodes
|
|
29
|
-
:param retries: Override the default retry configuration for this method
|
|
30
|
-
:param server_url: Override the default server URL for this method
|
|
31
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
32
|
-
:param http_headers: Additional headers to set or replace on requests.
|
|
33
|
-
"""
|
|
34
|
-
base_url = None
|
|
35
|
-
url_variables = None
|
|
36
|
-
if timeout_ms is None:
|
|
37
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
|
38
|
-
|
|
39
|
-
if server_url is not None:
|
|
40
|
-
base_url = server_url
|
|
41
|
-
else:
|
|
42
|
-
base_url = self._get_url(base_url, url_variables)
|
|
43
|
-
|
|
44
|
-
request = models.GetSummaryWorkersRequest(
|
|
45
|
-
filter_exp=filter_exp,
|
|
46
|
-
)
|
|
47
|
-
|
|
48
|
-
req = self._build_request(
|
|
49
|
-
method="GET",
|
|
50
|
-
path="/master/summary/workers",
|
|
51
|
-
base_url=base_url,
|
|
52
|
-
url_variables=url_variables,
|
|
53
|
-
request=request,
|
|
54
|
-
request_body_required=False,
|
|
55
|
-
request_has_path_params=False,
|
|
56
|
-
request_has_query_params=True,
|
|
57
|
-
user_agent_header="user-agent",
|
|
58
|
-
accept_header_value="application/json",
|
|
59
|
-
http_headers=http_headers,
|
|
60
|
-
security=self.sdk_configuration.security,
|
|
61
|
-
timeout_ms=timeout_ms,
|
|
62
|
-
)
|
|
63
|
-
|
|
64
|
-
if retries == UNSET:
|
|
65
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
|
66
|
-
retries = self.sdk_configuration.retry_config
|
|
67
|
-
|
|
68
|
-
retry_config = None
|
|
69
|
-
if isinstance(retries, utils.RetryConfig):
|
|
70
|
-
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
71
|
-
|
|
72
|
-
http_res = self.do_request(
|
|
73
|
-
hook_ctx=HookContext(
|
|
74
|
-
config=self.sdk_configuration,
|
|
75
|
-
base_url=base_url or "",
|
|
76
|
-
operation_id="getSummaryWorkers",
|
|
77
|
-
oauth2_scopes=[],
|
|
78
|
-
security_source=get_security_from_env(
|
|
79
|
-
self.sdk_configuration.security, models.Security
|
|
80
|
-
),
|
|
81
|
-
),
|
|
82
|
-
request=req,
|
|
83
|
-
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
84
|
-
retry_config=retry_config,
|
|
85
|
-
)
|
|
86
|
-
|
|
87
|
-
response_data: Any = None
|
|
88
|
-
if utils.match_response(http_res, "200", "application/json"):
|
|
89
|
-
return unmarshal_json_response(models.GetSummaryWorkersResponse, http_res)
|
|
90
|
-
if utils.match_response(http_res, "500", "application/json"):
|
|
91
|
-
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
92
|
-
raise errors.Error(response_data, http_res)
|
|
93
|
-
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
94
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
95
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
96
|
-
if utils.match_response(http_res, "5XX", "*"):
|
|
97
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
98
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
99
|
-
|
|
100
|
-
raise errors.APIError("Unexpected response received", http_res)
|
|
101
|
-
|
|
102
|
-
async def get_summary_workers_async(
|
|
103
|
-
self,
|
|
104
|
-
*,
|
|
105
|
-
filter_exp: Optional[str] = None,
|
|
106
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
107
|
-
server_url: Optional[str] = None,
|
|
108
|
-
timeout_ms: Optional[int] = None,
|
|
109
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
|
110
|
-
) -> models.GetSummaryWorkersResponse:
|
|
111
|
-
r"""Retrieve a count of Worker and Edge Nodes
|
|
112
|
-
|
|
113
|
-
get worker and edge nodes count
|
|
114
|
-
|
|
115
|
-
:param filter_exp: Filter expression evaluated against nodes
|
|
116
|
-
:param retries: Override the default retry configuration for this method
|
|
117
|
-
:param server_url: Override the default server URL for this method
|
|
118
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
119
|
-
:param http_headers: Additional headers to set or replace on requests.
|
|
120
|
-
"""
|
|
121
|
-
base_url = None
|
|
122
|
-
url_variables = None
|
|
123
|
-
if timeout_ms is None:
|
|
124
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
|
125
|
-
|
|
126
|
-
if server_url is not None:
|
|
127
|
-
base_url = server_url
|
|
128
|
-
else:
|
|
129
|
-
base_url = self._get_url(base_url, url_variables)
|
|
130
|
-
|
|
131
|
-
request = models.GetSummaryWorkersRequest(
|
|
132
|
-
filter_exp=filter_exp,
|
|
133
|
-
)
|
|
134
|
-
|
|
135
|
-
req = self._build_request_async(
|
|
136
|
-
method="GET",
|
|
137
|
-
path="/master/summary/workers",
|
|
138
|
-
base_url=base_url,
|
|
139
|
-
url_variables=url_variables,
|
|
140
|
-
request=request,
|
|
141
|
-
request_body_required=False,
|
|
142
|
-
request_has_path_params=False,
|
|
143
|
-
request_has_query_params=True,
|
|
144
|
-
user_agent_header="user-agent",
|
|
145
|
-
accept_header_value="application/json",
|
|
146
|
-
http_headers=http_headers,
|
|
147
|
-
security=self.sdk_configuration.security,
|
|
148
|
-
timeout_ms=timeout_ms,
|
|
149
|
-
)
|
|
150
|
-
|
|
151
|
-
if retries == UNSET:
|
|
152
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
|
153
|
-
retries = self.sdk_configuration.retry_config
|
|
154
|
-
|
|
155
|
-
retry_config = None
|
|
156
|
-
if isinstance(retries, utils.RetryConfig):
|
|
157
|
-
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
158
|
-
|
|
159
|
-
http_res = await self.do_request_async(
|
|
160
|
-
hook_ctx=HookContext(
|
|
161
|
-
config=self.sdk_configuration,
|
|
162
|
-
base_url=base_url or "",
|
|
163
|
-
operation_id="getSummaryWorkers",
|
|
164
|
-
oauth2_scopes=[],
|
|
165
|
-
security_source=get_security_from_env(
|
|
166
|
-
self.sdk_configuration.security, models.Security
|
|
167
|
-
),
|
|
168
|
-
),
|
|
169
|
-
request=req,
|
|
170
|
-
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
171
|
-
retry_config=retry_config,
|
|
172
|
-
)
|
|
173
|
-
|
|
174
|
-
response_data: Any = None
|
|
175
|
-
if utils.match_response(http_res, "200", "application/json"):
|
|
176
|
-
return unmarshal_json_response(models.GetSummaryWorkersResponse, http_res)
|
|
177
|
-
if utils.match_response(http_res, "500", "application/json"):
|
|
178
|
-
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
179
|
-
raise errors.Error(response_data, http_res)
|
|
180
|
-
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
181
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
182
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
183
|
-
if utils.match_response(http_res, "5XX", "*"):
|
|
184
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
185
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
186
|
-
|
|
187
|
-
raise errors.APIError("Unexpected response received", http_res)
|
|
File without changes
|