scc-firewall-manager-sdk 1.13.789__py3-none-any.whl → 1.13.790__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 scc-firewall-manager-sdk might be problematic. Click here for more details.
- scc_firewall_manager_sdk/__init__.py +4 -2
- scc_firewall_manager_sdk/api/__init__.py +3 -1
- scc_firewall_manager_sdk/api/{msp_api.py → msp_inventory_api.py} +620 -4332
- scc_firewall_manager_sdk/api/msp_tenant_management_api.py +2547 -0
- scc_firewall_manager_sdk/api/msp_user_management_api.py +1245 -0
- scc_firewall_manager_sdk/api_client.py +1 -1
- scc_firewall_manager_sdk/configuration.py +1 -1
- {scc_firewall_manager_sdk-1.13.789.dist-info → scc_firewall_manager_sdk-1.13.790.dist-info}/METADATA +1 -1
- {scc_firewall_manager_sdk-1.13.789.dist-info → scc_firewall_manager_sdk-1.13.790.dist-info}/RECORD +11 -9
- {scc_firewall_manager_sdk-1.13.789.dist-info → scc_firewall_manager_sdk-1.13.790.dist-info}/WHEEL +0 -0
- {scc_firewall_manager_sdk-1.13.789.dist-info → scc_firewall_manager_sdk-1.13.790.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,1245 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Cisco Security Cloud Control Firewall Manager API
|
|
5
|
+
|
|
6
|
+
Use the documentation to explore the endpoints Security Cloud Control Firewall Manager has to offer
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.13.0
|
|
9
|
+
Contact: cdo.tac@cisco.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
import warnings
|
|
16
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
17
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
18
|
+
from typing_extensions import Annotated
|
|
19
|
+
|
|
20
|
+
from pydantic import Field, StrictStr
|
|
21
|
+
from typing import Optional
|
|
22
|
+
from typing_extensions import Annotated
|
|
23
|
+
from scc_firewall_manager_sdk.models.cdo_transaction import CdoTransaction
|
|
24
|
+
from scc_firewall_manager_sdk.models.msp_add_users_to_tenant_input import MspAddUsersToTenantInput
|
|
25
|
+
from scc_firewall_manager_sdk.models.msp_delete_users_from_tenant_input import MspDeleteUsersFromTenantInput
|
|
26
|
+
from scc_firewall_manager_sdk.models.user_page import UserPage
|
|
27
|
+
|
|
28
|
+
from scc_firewall_manager_sdk.api_client import ApiClient, RequestSerialized
|
|
29
|
+
from scc_firewall_manager_sdk.api_response import ApiResponse
|
|
30
|
+
from scc_firewall_manager_sdk.rest import RESTResponseType
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class MSPUserManagementApi:
|
|
34
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
35
|
+
Ref: https://openapi-generator.tech
|
|
36
|
+
|
|
37
|
+
Do not edit the class manually.
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
def __init__(self, api_client=None) -> None:
|
|
41
|
+
if api_client is None:
|
|
42
|
+
api_client = ApiClient.get_default()
|
|
43
|
+
self.api_client = api_client
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
@validate_call
|
|
47
|
+
def add_users_to_tenant_in_msp_portal(
|
|
48
|
+
self,
|
|
49
|
+
tenant_uid: Annotated[StrictStr, Field(description="Unique identifier of the tenant to which the users will be added.")],
|
|
50
|
+
msp_add_users_to_tenant_input: MspAddUsersToTenantInput,
|
|
51
|
+
_request_timeout: Union[
|
|
52
|
+
None,
|
|
53
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
54
|
+
Tuple[
|
|
55
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
56
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
57
|
+
]
|
|
58
|
+
] = None,
|
|
59
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
60
|
+
_content_type: Optional[StrictStr] = None,
|
|
61
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
62
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
63
|
+
) -> CdoTransaction:
|
|
64
|
+
"""Add users to Security Cloud Control tenant in MSP Portal
|
|
65
|
+
|
|
66
|
+
This is an asynchronous operation to add a list of users to a tenant associated with the MSP Portal.
|
|
67
|
+
|
|
68
|
+
:param tenant_uid: Unique identifier of the tenant to which the users will be added. (required)
|
|
69
|
+
:type tenant_uid: str
|
|
70
|
+
:param msp_add_users_to_tenant_input: (required)
|
|
71
|
+
:type msp_add_users_to_tenant_input: MspAddUsersToTenantInput
|
|
72
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
73
|
+
number provided, it will be total request
|
|
74
|
+
timeout. It can also be a pair (tuple) of
|
|
75
|
+
(connection, read) timeouts.
|
|
76
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
77
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
78
|
+
request; this effectively ignores the
|
|
79
|
+
authentication in the spec for a single request.
|
|
80
|
+
:type _request_auth: dict, optional
|
|
81
|
+
:param _content_type: force content-type for the request.
|
|
82
|
+
:type _content_type: str, Optional
|
|
83
|
+
:param _headers: set to override the headers for a single
|
|
84
|
+
request; this effectively ignores the headers
|
|
85
|
+
in the spec for a single request.
|
|
86
|
+
:type _headers: dict, optional
|
|
87
|
+
:param _host_index: set to override the host_index for a single
|
|
88
|
+
request; this effectively ignores the host_index
|
|
89
|
+
in the spec for a single request.
|
|
90
|
+
:type _host_index: int, optional
|
|
91
|
+
:return: Returns the result object.
|
|
92
|
+
""" # noqa: E501
|
|
93
|
+
|
|
94
|
+
_param = self._add_users_to_tenant_in_msp_portal_serialize(
|
|
95
|
+
tenant_uid=tenant_uid,
|
|
96
|
+
msp_add_users_to_tenant_input=msp_add_users_to_tenant_input,
|
|
97
|
+
_request_auth=_request_auth,
|
|
98
|
+
_content_type=_content_type,
|
|
99
|
+
_headers=_headers,
|
|
100
|
+
_host_index=_host_index
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
104
|
+
'202': "CdoTransaction",
|
|
105
|
+
'500': "CommonApiError",
|
|
106
|
+
}
|
|
107
|
+
response_data = self.api_client.call_api(
|
|
108
|
+
*_param,
|
|
109
|
+
_request_timeout=_request_timeout
|
|
110
|
+
)
|
|
111
|
+
response_data.read()
|
|
112
|
+
return self.api_client.response_deserialize(
|
|
113
|
+
response_data=response_data,
|
|
114
|
+
response_types_map=_response_types_map,
|
|
115
|
+
).data
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
@validate_call
|
|
119
|
+
def add_users_to_tenant_in_msp_portal_with_http_info(
|
|
120
|
+
self,
|
|
121
|
+
tenant_uid: Annotated[StrictStr, Field(description="Unique identifier of the tenant to which the users will be added.")],
|
|
122
|
+
msp_add_users_to_tenant_input: MspAddUsersToTenantInput,
|
|
123
|
+
_request_timeout: Union[
|
|
124
|
+
None,
|
|
125
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
126
|
+
Tuple[
|
|
127
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
128
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
129
|
+
]
|
|
130
|
+
] = None,
|
|
131
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
132
|
+
_content_type: Optional[StrictStr] = None,
|
|
133
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
134
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
135
|
+
) -> ApiResponse[CdoTransaction]:
|
|
136
|
+
"""Add users to Security Cloud Control tenant in MSP Portal
|
|
137
|
+
|
|
138
|
+
This is an asynchronous operation to add a list of users to a tenant associated with the MSP Portal.
|
|
139
|
+
|
|
140
|
+
:param tenant_uid: Unique identifier of the tenant to which the users will be added. (required)
|
|
141
|
+
:type tenant_uid: str
|
|
142
|
+
:param msp_add_users_to_tenant_input: (required)
|
|
143
|
+
:type msp_add_users_to_tenant_input: MspAddUsersToTenantInput
|
|
144
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
145
|
+
number provided, it will be total request
|
|
146
|
+
timeout. It can also be a pair (tuple) of
|
|
147
|
+
(connection, read) timeouts.
|
|
148
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
149
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
150
|
+
request; this effectively ignores the
|
|
151
|
+
authentication in the spec for a single request.
|
|
152
|
+
:type _request_auth: dict, optional
|
|
153
|
+
:param _content_type: force content-type for the request.
|
|
154
|
+
:type _content_type: str, Optional
|
|
155
|
+
:param _headers: set to override the headers for a single
|
|
156
|
+
request; this effectively ignores the headers
|
|
157
|
+
in the spec for a single request.
|
|
158
|
+
:type _headers: dict, optional
|
|
159
|
+
:param _host_index: set to override the host_index for a single
|
|
160
|
+
request; this effectively ignores the host_index
|
|
161
|
+
in the spec for a single request.
|
|
162
|
+
:type _host_index: int, optional
|
|
163
|
+
:return: Returns the result object.
|
|
164
|
+
""" # noqa: E501
|
|
165
|
+
|
|
166
|
+
_param = self._add_users_to_tenant_in_msp_portal_serialize(
|
|
167
|
+
tenant_uid=tenant_uid,
|
|
168
|
+
msp_add_users_to_tenant_input=msp_add_users_to_tenant_input,
|
|
169
|
+
_request_auth=_request_auth,
|
|
170
|
+
_content_type=_content_type,
|
|
171
|
+
_headers=_headers,
|
|
172
|
+
_host_index=_host_index
|
|
173
|
+
)
|
|
174
|
+
|
|
175
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
176
|
+
'202': "CdoTransaction",
|
|
177
|
+
'500': "CommonApiError",
|
|
178
|
+
}
|
|
179
|
+
response_data = self.api_client.call_api(
|
|
180
|
+
*_param,
|
|
181
|
+
_request_timeout=_request_timeout
|
|
182
|
+
)
|
|
183
|
+
response_data.read()
|
|
184
|
+
return self.api_client.response_deserialize(
|
|
185
|
+
response_data=response_data,
|
|
186
|
+
response_types_map=_response_types_map,
|
|
187
|
+
)
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
@validate_call
|
|
191
|
+
def add_users_to_tenant_in_msp_portal_without_preload_content(
|
|
192
|
+
self,
|
|
193
|
+
tenant_uid: Annotated[StrictStr, Field(description="Unique identifier of the tenant to which the users will be added.")],
|
|
194
|
+
msp_add_users_to_tenant_input: MspAddUsersToTenantInput,
|
|
195
|
+
_request_timeout: Union[
|
|
196
|
+
None,
|
|
197
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
198
|
+
Tuple[
|
|
199
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
200
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
201
|
+
]
|
|
202
|
+
] = None,
|
|
203
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
204
|
+
_content_type: Optional[StrictStr] = None,
|
|
205
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
206
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
207
|
+
) -> RESTResponseType:
|
|
208
|
+
"""Add users to Security Cloud Control tenant in MSP Portal
|
|
209
|
+
|
|
210
|
+
This is an asynchronous operation to add a list of users to a tenant associated with the MSP Portal.
|
|
211
|
+
|
|
212
|
+
:param tenant_uid: Unique identifier of the tenant to which the users will be added. (required)
|
|
213
|
+
:type tenant_uid: str
|
|
214
|
+
:param msp_add_users_to_tenant_input: (required)
|
|
215
|
+
:type msp_add_users_to_tenant_input: MspAddUsersToTenantInput
|
|
216
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
217
|
+
number provided, it will be total request
|
|
218
|
+
timeout. It can also be a pair (tuple) of
|
|
219
|
+
(connection, read) timeouts.
|
|
220
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
221
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
222
|
+
request; this effectively ignores the
|
|
223
|
+
authentication in the spec for a single request.
|
|
224
|
+
:type _request_auth: dict, optional
|
|
225
|
+
:param _content_type: force content-type for the request.
|
|
226
|
+
:type _content_type: str, Optional
|
|
227
|
+
:param _headers: set to override the headers for a single
|
|
228
|
+
request; this effectively ignores the headers
|
|
229
|
+
in the spec for a single request.
|
|
230
|
+
:type _headers: dict, optional
|
|
231
|
+
:param _host_index: set to override the host_index for a single
|
|
232
|
+
request; this effectively ignores the host_index
|
|
233
|
+
in the spec for a single request.
|
|
234
|
+
:type _host_index: int, optional
|
|
235
|
+
:return: Returns the result object.
|
|
236
|
+
""" # noqa: E501
|
|
237
|
+
|
|
238
|
+
_param = self._add_users_to_tenant_in_msp_portal_serialize(
|
|
239
|
+
tenant_uid=tenant_uid,
|
|
240
|
+
msp_add_users_to_tenant_input=msp_add_users_to_tenant_input,
|
|
241
|
+
_request_auth=_request_auth,
|
|
242
|
+
_content_type=_content_type,
|
|
243
|
+
_headers=_headers,
|
|
244
|
+
_host_index=_host_index
|
|
245
|
+
)
|
|
246
|
+
|
|
247
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
248
|
+
'202': "CdoTransaction",
|
|
249
|
+
'500': "CommonApiError",
|
|
250
|
+
}
|
|
251
|
+
response_data = self.api_client.call_api(
|
|
252
|
+
*_param,
|
|
253
|
+
_request_timeout=_request_timeout
|
|
254
|
+
)
|
|
255
|
+
return response_data.response
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
def _add_users_to_tenant_in_msp_portal_serialize(
|
|
259
|
+
self,
|
|
260
|
+
tenant_uid,
|
|
261
|
+
msp_add_users_to_tenant_input,
|
|
262
|
+
_request_auth,
|
|
263
|
+
_content_type,
|
|
264
|
+
_headers,
|
|
265
|
+
_host_index,
|
|
266
|
+
) -> RequestSerialized:
|
|
267
|
+
|
|
268
|
+
_host = None
|
|
269
|
+
|
|
270
|
+
_collection_formats: Dict[str, str] = {
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
_path_params: Dict[str, str] = {}
|
|
274
|
+
_query_params: List[Tuple[str, str]] = []
|
|
275
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
276
|
+
_form_params: List[Tuple[str, str]] = []
|
|
277
|
+
_files: Dict[str, str] = {}
|
|
278
|
+
_body_params: Optional[bytes] = None
|
|
279
|
+
|
|
280
|
+
# process the path parameters
|
|
281
|
+
if tenant_uid is not None:
|
|
282
|
+
_path_params['tenantUid'] = tenant_uid
|
|
283
|
+
# process the query parameters
|
|
284
|
+
# process the header parameters
|
|
285
|
+
# process the form parameters
|
|
286
|
+
# process the body parameter
|
|
287
|
+
if msp_add_users_to_tenant_input is not None:
|
|
288
|
+
_body_params = msp_add_users_to_tenant_input
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
# set the HTTP header `Accept`
|
|
292
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
293
|
+
[
|
|
294
|
+
'application/json'
|
|
295
|
+
]
|
|
296
|
+
)
|
|
297
|
+
|
|
298
|
+
# set the HTTP header `Content-Type`
|
|
299
|
+
if _content_type:
|
|
300
|
+
_header_params['Content-Type'] = _content_type
|
|
301
|
+
else:
|
|
302
|
+
_default_content_type = (
|
|
303
|
+
self.api_client.select_header_content_type(
|
|
304
|
+
[
|
|
305
|
+
'application/json'
|
|
306
|
+
]
|
|
307
|
+
)
|
|
308
|
+
)
|
|
309
|
+
if _default_content_type is not None:
|
|
310
|
+
_header_params['Content-Type'] = _default_content_type
|
|
311
|
+
|
|
312
|
+
# authentication setting
|
|
313
|
+
_auth_settings: List[str] = [
|
|
314
|
+
'bearerAuth'
|
|
315
|
+
]
|
|
316
|
+
|
|
317
|
+
return self.api_client.param_serialize(
|
|
318
|
+
method='POST',
|
|
319
|
+
resource_path='/v1/msp/tenants/{tenantUid}/users',
|
|
320
|
+
path_params=_path_params,
|
|
321
|
+
query_params=_query_params,
|
|
322
|
+
header_params=_header_params,
|
|
323
|
+
body=_body_params,
|
|
324
|
+
post_params=_form_params,
|
|
325
|
+
files=_files,
|
|
326
|
+
auth_settings=_auth_settings,
|
|
327
|
+
collection_formats=_collection_formats,
|
|
328
|
+
_host=_host,
|
|
329
|
+
_request_auth=_request_auth
|
|
330
|
+
)
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
@validate_call
|
|
336
|
+
def delete_users_from_tenant_in_msp_portal(
|
|
337
|
+
self,
|
|
338
|
+
tenant_uid: Annotated[StrictStr, Field(description="Unique identifier of the tenant from which the users will be deleted")],
|
|
339
|
+
msp_delete_users_from_tenant_input: MspDeleteUsersFromTenantInput,
|
|
340
|
+
_request_timeout: Union[
|
|
341
|
+
None,
|
|
342
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
343
|
+
Tuple[
|
|
344
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
345
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
346
|
+
]
|
|
347
|
+
] = None,
|
|
348
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
349
|
+
_content_type: Optional[StrictStr] = None,
|
|
350
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
351
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
352
|
+
) -> CdoTransaction:
|
|
353
|
+
"""Remove users from Security Cloud Control tenant in MSP Portal
|
|
354
|
+
|
|
355
|
+
This is an asynchronous operation to remove a list of users from a tenant associated with the MSP Portal.
|
|
356
|
+
|
|
357
|
+
:param tenant_uid: Unique identifier of the tenant from which the users will be deleted (required)
|
|
358
|
+
:type tenant_uid: str
|
|
359
|
+
:param msp_delete_users_from_tenant_input: (required)
|
|
360
|
+
:type msp_delete_users_from_tenant_input: MspDeleteUsersFromTenantInput
|
|
361
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
362
|
+
number provided, it will be total request
|
|
363
|
+
timeout. It can also be a pair (tuple) of
|
|
364
|
+
(connection, read) timeouts.
|
|
365
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
366
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
367
|
+
request; this effectively ignores the
|
|
368
|
+
authentication in the spec for a single request.
|
|
369
|
+
:type _request_auth: dict, optional
|
|
370
|
+
:param _content_type: force content-type for the request.
|
|
371
|
+
:type _content_type: str, Optional
|
|
372
|
+
:param _headers: set to override the headers for a single
|
|
373
|
+
request; this effectively ignores the headers
|
|
374
|
+
in the spec for a single request.
|
|
375
|
+
:type _headers: dict, optional
|
|
376
|
+
:param _host_index: set to override the host_index for a single
|
|
377
|
+
request; this effectively ignores the host_index
|
|
378
|
+
in the spec for a single request.
|
|
379
|
+
:type _host_index: int, optional
|
|
380
|
+
:return: Returns the result object.
|
|
381
|
+
""" # noqa: E501
|
|
382
|
+
|
|
383
|
+
_param = self._delete_users_from_tenant_in_msp_portal_serialize(
|
|
384
|
+
tenant_uid=tenant_uid,
|
|
385
|
+
msp_delete_users_from_tenant_input=msp_delete_users_from_tenant_input,
|
|
386
|
+
_request_auth=_request_auth,
|
|
387
|
+
_content_type=_content_type,
|
|
388
|
+
_headers=_headers,
|
|
389
|
+
_host_index=_host_index
|
|
390
|
+
)
|
|
391
|
+
|
|
392
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
393
|
+
'202': "CdoTransaction",
|
|
394
|
+
'500': "CommonApiError",
|
|
395
|
+
}
|
|
396
|
+
response_data = self.api_client.call_api(
|
|
397
|
+
*_param,
|
|
398
|
+
_request_timeout=_request_timeout
|
|
399
|
+
)
|
|
400
|
+
response_data.read()
|
|
401
|
+
return self.api_client.response_deserialize(
|
|
402
|
+
response_data=response_data,
|
|
403
|
+
response_types_map=_response_types_map,
|
|
404
|
+
).data
|
|
405
|
+
|
|
406
|
+
|
|
407
|
+
@validate_call
|
|
408
|
+
def delete_users_from_tenant_in_msp_portal_with_http_info(
|
|
409
|
+
self,
|
|
410
|
+
tenant_uid: Annotated[StrictStr, Field(description="Unique identifier of the tenant from which the users will be deleted")],
|
|
411
|
+
msp_delete_users_from_tenant_input: MspDeleteUsersFromTenantInput,
|
|
412
|
+
_request_timeout: Union[
|
|
413
|
+
None,
|
|
414
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
415
|
+
Tuple[
|
|
416
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
417
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
418
|
+
]
|
|
419
|
+
] = None,
|
|
420
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
421
|
+
_content_type: Optional[StrictStr] = None,
|
|
422
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
423
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
424
|
+
) -> ApiResponse[CdoTransaction]:
|
|
425
|
+
"""Remove users from Security Cloud Control tenant in MSP Portal
|
|
426
|
+
|
|
427
|
+
This is an asynchronous operation to remove a list of users from a tenant associated with the MSP Portal.
|
|
428
|
+
|
|
429
|
+
:param tenant_uid: Unique identifier of the tenant from which the users will be deleted (required)
|
|
430
|
+
:type tenant_uid: str
|
|
431
|
+
:param msp_delete_users_from_tenant_input: (required)
|
|
432
|
+
:type msp_delete_users_from_tenant_input: MspDeleteUsersFromTenantInput
|
|
433
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
434
|
+
number provided, it will be total request
|
|
435
|
+
timeout. It can also be a pair (tuple) of
|
|
436
|
+
(connection, read) timeouts.
|
|
437
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
438
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
439
|
+
request; this effectively ignores the
|
|
440
|
+
authentication in the spec for a single request.
|
|
441
|
+
:type _request_auth: dict, optional
|
|
442
|
+
:param _content_type: force content-type for the request.
|
|
443
|
+
:type _content_type: str, Optional
|
|
444
|
+
:param _headers: set to override the headers for a single
|
|
445
|
+
request; this effectively ignores the headers
|
|
446
|
+
in the spec for a single request.
|
|
447
|
+
:type _headers: dict, optional
|
|
448
|
+
:param _host_index: set to override the host_index for a single
|
|
449
|
+
request; this effectively ignores the host_index
|
|
450
|
+
in the spec for a single request.
|
|
451
|
+
:type _host_index: int, optional
|
|
452
|
+
:return: Returns the result object.
|
|
453
|
+
""" # noqa: E501
|
|
454
|
+
|
|
455
|
+
_param = self._delete_users_from_tenant_in_msp_portal_serialize(
|
|
456
|
+
tenant_uid=tenant_uid,
|
|
457
|
+
msp_delete_users_from_tenant_input=msp_delete_users_from_tenant_input,
|
|
458
|
+
_request_auth=_request_auth,
|
|
459
|
+
_content_type=_content_type,
|
|
460
|
+
_headers=_headers,
|
|
461
|
+
_host_index=_host_index
|
|
462
|
+
)
|
|
463
|
+
|
|
464
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
465
|
+
'202': "CdoTransaction",
|
|
466
|
+
'500': "CommonApiError",
|
|
467
|
+
}
|
|
468
|
+
response_data = self.api_client.call_api(
|
|
469
|
+
*_param,
|
|
470
|
+
_request_timeout=_request_timeout
|
|
471
|
+
)
|
|
472
|
+
response_data.read()
|
|
473
|
+
return self.api_client.response_deserialize(
|
|
474
|
+
response_data=response_data,
|
|
475
|
+
response_types_map=_response_types_map,
|
|
476
|
+
)
|
|
477
|
+
|
|
478
|
+
|
|
479
|
+
@validate_call
|
|
480
|
+
def delete_users_from_tenant_in_msp_portal_without_preload_content(
|
|
481
|
+
self,
|
|
482
|
+
tenant_uid: Annotated[StrictStr, Field(description="Unique identifier of the tenant from which the users will be deleted")],
|
|
483
|
+
msp_delete_users_from_tenant_input: MspDeleteUsersFromTenantInput,
|
|
484
|
+
_request_timeout: Union[
|
|
485
|
+
None,
|
|
486
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
487
|
+
Tuple[
|
|
488
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
489
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
490
|
+
]
|
|
491
|
+
] = None,
|
|
492
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
493
|
+
_content_type: Optional[StrictStr] = None,
|
|
494
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
495
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
496
|
+
) -> RESTResponseType:
|
|
497
|
+
"""Remove users from Security Cloud Control tenant in MSP Portal
|
|
498
|
+
|
|
499
|
+
This is an asynchronous operation to remove a list of users from a tenant associated with the MSP Portal.
|
|
500
|
+
|
|
501
|
+
:param tenant_uid: Unique identifier of the tenant from which the users will be deleted (required)
|
|
502
|
+
:type tenant_uid: str
|
|
503
|
+
:param msp_delete_users_from_tenant_input: (required)
|
|
504
|
+
:type msp_delete_users_from_tenant_input: MspDeleteUsersFromTenantInput
|
|
505
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
506
|
+
number provided, it will be total request
|
|
507
|
+
timeout. It can also be a pair (tuple) of
|
|
508
|
+
(connection, read) timeouts.
|
|
509
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
510
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
511
|
+
request; this effectively ignores the
|
|
512
|
+
authentication in the spec for a single request.
|
|
513
|
+
:type _request_auth: dict, optional
|
|
514
|
+
:param _content_type: force content-type for the request.
|
|
515
|
+
:type _content_type: str, Optional
|
|
516
|
+
:param _headers: set to override the headers for a single
|
|
517
|
+
request; this effectively ignores the headers
|
|
518
|
+
in the spec for a single request.
|
|
519
|
+
:type _headers: dict, optional
|
|
520
|
+
:param _host_index: set to override the host_index for a single
|
|
521
|
+
request; this effectively ignores the host_index
|
|
522
|
+
in the spec for a single request.
|
|
523
|
+
:type _host_index: int, optional
|
|
524
|
+
:return: Returns the result object.
|
|
525
|
+
""" # noqa: E501
|
|
526
|
+
|
|
527
|
+
_param = self._delete_users_from_tenant_in_msp_portal_serialize(
|
|
528
|
+
tenant_uid=tenant_uid,
|
|
529
|
+
msp_delete_users_from_tenant_input=msp_delete_users_from_tenant_input,
|
|
530
|
+
_request_auth=_request_auth,
|
|
531
|
+
_content_type=_content_type,
|
|
532
|
+
_headers=_headers,
|
|
533
|
+
_host_index=_host_index
|
|
534
|
+
)
|
|
535
|
+
|
|
536
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
537
|
+
'202': "CdoTransaction",
|
|
538
|
+
'500': "CommonApiError",
|
|
539
|
+
}
|
|
540
|
+
response_data = self.api_client.call_api(
|
|
541
|
+
*_param,
|
|
542
|
+
_request_timeout=_request_timeout
|
|
543
|
+
)
|
|
544
|
+
return response_data.response
|
|
545
|
+
|
|
546
|
+
|
|
547
|
+
def _delete_users_from_tenant_in_msp_portal_serialize(
|
|
548
|
+
self,
|
|
549
|
+
tenant_uid,
|
|
550
|
+
msp_delete_users_from_tenant_input,
|
|
551
|
+
_request_auth,
|
|
552
|
+
_content_type,
|
|
553
|
+
_headers,
|
|
554
|
+
_host_index,
|
|
555
|
+
) -> RequestSerialized:
|
|
556
|
+
|
|
557
|
+
_host = None
|
|
558
|
+
|
|
559
|
+
_collection_formats: Dict[str, str] = {
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
_path_params: Dict[str, str] = {}
|
|
563
|
+
_query_params: List[Tuple[str, str]] = []
|
|
564
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
565
|
+
_form_params: List[Tuple[str, str]] = []
|
|
566
|
+
_files: Dict[str, str] = {}
|
|
567
|
+
_body_params: Optional[bytes] = None
|
|
568
|
+
|
|
569
|
+
# process the path parameters
|
|
570
|
+
if tenant_uid is not None:
|
|
571
|
+
_path_params['tenantUid'] = tenant_uid
|
|
572
|
+
# process the query parameters
|
|
573
|
+
# process the header parameters
|
|
574
|
+
# process the form parameters
|
|
575
|
+
# process the body parameter
|
|
576
|
+
if msp_delete_users_from_tenant_input is not None:
|
|
577
|
+
_body_params = msp_delete_users_from_tenant_input
|
|
578
|
+
|
|
579
|
+
|
|
580
|
+
# set the HTTP header `Accept`
|
|
581
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
582
|
+
[
|
|
583
|
+
'application/json'
|
|
584
|
+
]
|
|
585
|
+
)
|
|
586
|
+
|
|
587
|
+
# set the HTTP header `Content-Type`
|
|
588
|
+
if _content_type:
|
|
589
|
+
_header_params['Content-Type'] = _content_type
|
|
590
|
+
else:
|
|
591
|
+
_default_content_type = (
|
|
592
|
+
self.api_client.select_header_content_type(
|
|
593
|
+
[
|
|
594
|
+
'application/json'
|
|
595
|
+
]
|
|
596
|
+
)
|
|
597
|
+
)
|
|
598
|
+
if _default_content_type is not None:
|
|
599
|
+
_header_params['Content-Type'] = _default_content_type
|
|
600
|
+
|
|
601
|
+
# authentication setting
|
|
602
|
+
_auth_settings: List[str] = [
|
|
603
|
+
'bearerAuth'
|
|
604
|
+
]
|
|
605
|
+
|
|
606
|
+
return self.api_client.param_serialize(
|
|
607
|
+
method='POST',
|
|
608
|
+
resource_path='/v1/msp/tenants/{tenantUid}/users/delete',
|
|
609
|
+
path_params=_path_params,
|
|
610
|
+
query_params=_query_params,
|
|
611
|
+
header_params=_header_params,
|
|
612
|
+
body=_body_params,
|
|
613
|
+
post_params=_form_params,
|
|
614
|
+
files=_files,
|
|
615
|
+
auth_settings=_auth_settings,
|
|
616
|
+
collection_formats=_collection_formats,
|
|
617
|
+
_host=_host,
|
|
618
|
+
_request_auth=_request_auth
|
|
619
|
+
)
|
|
620
|
+
|
|
621
|
+
|
|
622
|
+
|
|
623
|
+
|
|
624
|
+
@validate_call
|
|
625
|
+
def get_api_only_users_in_msp_managed_tenant(
|
|
626
|
+
self,
|
|
627
|
+
tenant_uid: Annotated[StrictStr, Field(description="Unique identifier of the tenant to retrieve the users for.")],
|
|
628
|
+
limit: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="The number of results to retrieve.")] = None,
|
|
629
|
+
offset: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="The offset of the results retrieved. The Security Cloud Control API uses the offset field to determine the index of the first result retrieved, and will retrieve `limit` results from the offset specified.")] = None,
|
|
630
|
+
q: Annotated[Optional[StrictStr], Field(description="The query to execute. Use the Lucene Query Syntax to construct your query.")] = None,
|
|
631
|
+
_request_timeout: Union[
|
|
632
|
+
None,
|
|
633
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
634
|
+
Tuple[
|
|
635
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
636
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
637
|
+
]
|
|
638
|
+
] = None,
|
|
639
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
640
|
+
_content_type: Optional[StrictStr] = None,
|
|
641
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
642
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
643
|
+
) -> UserPage:
|
|
644
|
+
"""Get API-only Users associated with tenant in MSP portal
|
|
645
|
+
|
|
646
|
+
Get a list of API-only users associated with the Security Cloud Control tenant managed by MSP portal.
|
|
647
|
+
|
|
648
|
+
:param tenant_uid: Unique identifier of the tenant to retrieve the users for. (required)
|
|
649
|
+
:type tenant_uid: str
|
|
650
|
+
:param limit: The number of results to retrieve.
|
|
651
|
+
:type limit: str
|
|
652
|
+
:param offset: The offset of the results retrieved. The Security Cloud Control API uses the offset field to determine the index of the first result retrieved, and will retrieve `limit` results from the offset specified.
|
|
653
|
+
:type offset: str
|
|
654
|
+
:param q: The query to execute. Use the Lucene Query Syntax to construct your query.
|
|
655
|
+
:type q: str
|
|
656
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
657
|
+
number provided, it will be total request
|
|
658
|
+
timeout. It can also be a pair (tuple) of
|
|
659
|
+
(connection, read) timeouts.
|
|
660
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
661
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
662
|
+
request; this effectively ignores the
|
|
663
|
+
authentication in the spec for a single request.
|
|
664
|
+
:type _request_auth: dict, optional
|
|
665
|
+
:param _content_type: force content-type for the request.
|
|
666
|
+
:type _content_type: str, Optional
|
|
667
|
+
:param _headers: set to override the headers for a single
|
|
668
|
+
request; this effectively ignores the headers
|
|
669
|
+
in the spec for a single request.
|
|
670
|
+
:type _headers: dict, optional
|
|
671
|
+
:param _host_index: set to override the host_index for a single
|
|
672
|
+
request; this effectively ignores the host_index
|
|
673
|
+
in the spec for a single request.
|
|
674
|
+
:type _host_index: int, optional
|
|
675
|
+
:return: Returns the result object.
|
|
676
|
+
""" # noqa: E501
|
|
677
|
+
|
|
678
|
+
_param = self._get_api_only_users_in_msp_managed_tenant_serialize(
|
|
679
|
+
tenant_uid=tenant_uid,
|
|
680
|
+
limit=limit,
|
|
681
|
+
offset=offset,
|
|
682
|
+
q=q,
|
|
683
|
+
_request_auth=_request_auth,
|
|
684
|
+
_content_type=_content_type,
|
|
685
|
+
_headers=_headers,
|
|
686
|
+
_host_index=_host_index
|
|
687
|
+
)
|
|
688
|
+
|
|
689
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
690
|
+
'200': "UserPage",
|
|
691
|
+
'500': "CommonApiError",
|
|
692
|
+
}
|
|
693
|
+
response_data = self.api_client.call_api(
|
|
694
|
+
*_param,
|
|
695
|
+
_request_timeout=_request_timeout
|
|
696
|
+
)
|
|
697
|
+
response_data.read()
|
|
698
|
+
return self.api_client.response_deserialize(
|
|
699
|
+
response_data=response_data,
|
|
700
|
+
response_types_map=_response_types_map,
|
|
701
|
+
).data
|
|
702
|
+
|
|
703
|
+
|
|
704
|
+
@validate_call
|
|
705
|
+
def get_api_only_users_in_msp_managed_tenant_with_http_info(
|
|
706
|
+
self,
|
|
707
|
+
tenant_uid: Annotated[StrictStr, Field(description="Unique identifier of the tenant to retrieve the users for.")],
|
|
708
|
+
limit: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="The number of results to retrieve.")] = None,
|
|
709
|
+
offset: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="The offset of the results retrieved. The Security Cloud Control API uses the offset field to determine the index of the first result retrieved, and will retrieve `limit` results from the offset specified.")] = None,
|
|
710
|
+
q: Annotated[Optional[StrictStr], Field(description="The query to execute. Use the Lucene Query Syntax to construct your query.")] = None,
|
|
711
|
+
_request_timeout: Union[
|
|
712
|
+
None,
|
|
713
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
714
|
+
Tuple[
|
|
715
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
716
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
717
|
+
]
|
|
718
|
+
] = None,
|
|
719
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
720
|
+
_content_type: Optional[StrictStr] = None,
|
|
721
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
722
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
723
|
+
) -> ApiResponse[UserPage]:
|
|
724
|
+
"""Get API-only Users associated with tenant in MSP portal
|
|
725
|
+
|
|
726
|
+
Get a list of API-only users associated with the Security Cloud Control tenant managed by MSP portal.
|
|
727
|
+
|
|
728
|
+
:param tenant_uid: Unique identifier of the tenant to retrieve the users for. (required)
|
|
729
|
+
:type tenant_uid: str
|
|
730
|
+
:param limit: The number of results to retrieve.
|
|
731
|
+
:type limit: str
|
|
732
|
+
:param offset: The offset of the results retrieved. The Security Cloud Control API uses the offset field to determine the index of the first result retrieved, and will retrieve `limit` results from the offset specified.
|
|
733
|
+
:type offset: str
|
|
734
|
+
:param q: The query to execute. Use the Lucene Query Syntax to construct your query.
|
|
735
|
+
:type q: str
|
|
736
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
737
|
+
number provided, it will be total request
|
|
738
|
+
timeout. It can also be a pair (tuple) of
|
|
739
|
+
(connection, read) timeouts.
|
|
740
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
741
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
742
|
+
request; this effectively ignores the
|
|
743
|
+
authentication in the spec for a single request.
|
|
744
|
+
:type _request_auth: dict, optional
|
|
745
|
+
:param _content_type: force content-type for the request.
|
|
746
|
+
:type _content_type: str, Optional
|
|
747
|
+
:param _headers: set to override the headers for a single
|
|
748
|
+
request; this effectively ignores the headers
|
|
749
|
+
in the spec for a single request.
|
|
750
|
+
:type _headers: dict, optional
|
|
751
|
+
:param _host_index: set to override the host_index for a single
|
|
752
|
+
request; this effectively ignores the host_index
|
|
753
|
+
in the spec for a single request.
|
|
754
|
+
:type _host_index: int, optional
|
|
755
|
+
:return: Returns the result object.
|
|
756
|
+
""" # noqa: E501
|
|
757
|
+
|
|
758
|
+
_param = self._get_api_only_users_in_msp_managed_tenant_serialize(
|
|
759
|
+
tenant_uid=tenant_uid,
|
|
760
|
+
limit=limit,
|
|
761
|
+
offset=offset,
|
|
762
|
+
q=q,
|
|
763
|
+
_request_auth=_request_auth,
|
|
764
|
+
_content_type=_content_type,
|
|
765
|
+
_headers=_headers,
|
|
766
|
+
_host_index=_host_index
|
|
767
|
+
)
|
|
768
|
+
|
|
769
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
770
|
+
'200': "UserPage",
|
|
771
|
+
'500': "CommonApiError",
|
|
772
|
+
}
|
|
773
|
+
response_data = self.api_client.call_api(
|
|
774
|
+
*_param,
|
|
775
|
+
_request_timeout=_request_timeout
|
|
776
|
+
)
|
|
777
|
+
response_data.read()
|
|
778
|
+
return self.api_client.response_deserialize(
|
|
779
|
+
response_data=response_data,
|
|
780
|
+
response_types_map=_response_types_map,
|
|
781
|
+
)
|
|
782
|
+
|
|
783
|
+
|
|
784
|
+
@validate_call
|
|
785
|
+
def get_api_only_users_in_msp_managed_tenant_without_preload_content(
|
|
786
|
+
self,
|
|
787
|
+
tenant_uid: Annotated[StrictStr, Field(description="Unique identifier of the tenant to retrieve the users for.")],
|
|
788
|
+
limit: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="The number of results to retrieve.")] = None,
|
|
789
|
+
offset: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="The offset of the results retrieved. The Security Cloud Control API uses the offset field to determine the index of the first result retrieved, and will retrieve `limit` results from the offset specified.")] = None,
|
|
790
|
+
q: Annotated[Optional[StrictStr], Field(description="The query to execute. Use the Lucene Query Syntax to construct your query.")] = None,
|
|
791
|
+
_request_timeout: Union[
|
|
792
|
+
None,
|
|
793
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
794
|
+
Tuple[
|
|
795
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
796
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
797
|
+
]
|
|
798
|
+
] = None,
|
|
799
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
800
|
+
_content_type: Optional[StrictStr] = None,
|
|
801
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
802
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
803
|
+
) -> RESTResponseType:
|
|
804
|
+
"""Get API-only Users associated with tenant in MSP portal
|
|
805
|
+
|
|
806
|
+
Get a list of API-only users associated with the Security Cloud Control tenant managed by MSP portal.
|
|
807
|
+
|
|
808
|
+
:param tenant_uid: Unique identifier of the tenant to retrieve the users for. (required)
|
|
809
|
+
:type tenant_uid: str
|
|
810
|
+
:param limit: The number of results to retrieve.
|
|
811
|
+
:type limit: str
|
|
812
|
+
:param offset: The offset of the results retrieved. The Security Cloud Control API uses the offset field to determine the index of the first result retrieved, and will retrieve `limit` results from the offset specified.
|
|
813
|
+
:type offset: str
|
|
814
|
+
:param q: The query to execute. Use the Lucene Query Syntax to construct your query.
|
|
815
|
+
:type q: str
|
|
816
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
817
|
+
number provided, it will be total request
|
|
818
|
+
timeout. It can also be a pair (tuple) of
|
|
819
|
+
(connection, read) timeouts.
|
|
820
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
821
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
822
|
+
request; this effectively ignores the
|
|
823
|
+
authentication in the spec for a single request.
|
|
824
|
+
:type _request_auth: dict, optional
|
|
825
|
+
:param _content_type: force content-type for the request.
|
|
826
|
+
:type _content_type: str, Optional
|
|
827
|
+
:param _headers: set to override the headers for a single
|
|
828
|
+
request; this effectively ignores the headers
|
|
829
|
+
in the spec for a single request.
|
|
830
|
+
:type _headers: dict, optional
|
|
831
|
+
:param _host_index: set to override the host_index for a single
|
|
832
|
+
request; this effectively ignores the host_index
|
|
833
|
+
in the spec for a single request.
|
|
834
|
+
:type _host_index: int, optional
|
|
835
|
+
:return: Returns the result object.
|
|
836
|
+
""" # noqa: E501
|
|
837
|
+
|
|
838
|
+
_param = self._get_api_only_users_in_msp_managed_tenant_serialize(
|
|
839
|
+
tenant_uid=tenant_uid,
|
|
840
|
+
limit=limit,
|
|
841
|
+
offset=offset,
|
|
842
|
+
q=q,
|
|
843
|
+
_request_auth=_request_auth,
|
|
844
|
+
_content_type=_content_type,
|
|
845
|
+
_headers=_headers,
|
|
846
|
+
_host_index=_host_index
|
|
847
|
+
)
|
|
848
|
+
|
|
849
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
850
|
+
'200': "UserPage",
|
|
851
|
+
'500': "CommonApiError",
|
|
852
|
+
}
|
|
853
|
+
response_data = self.api_client.call_api(
|
|
854
|
+
*_param,
|
|
855
|
+
_request_timeout=_request_timeout
|
|
856
|
+
)
|
|
857
|
+
return response_data.response
|
|
858
|
+
|
|
859
|
+
|
|
860
|
+
def _get_api_only_users_in_msp_managed_tenant_serialize(
|
|
861
|
+
self,
|
|
862
|
+
tenant_uid,
|
|
863
|
+
limit,
|
|
864
|
+
offset,
|
|
865
|
+
q,
|
|
866
|
+
_request_auth,
|
|
867
|
+
_content_type,
|
|
868
|
+
_headers,
|
|
869
|
+
_host_index,
|
|
870
|
+
) -> RequestSerialized:
|
|
871
|
+
|
|
872
|
+
_host = None
|
|
873
|
+
|
|
874
|
+
_collection_formats: Dict[str, str] = {
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
_path_params: Dict[str, str] = {}
|
|
878
|
+
_query_params: List[Tuple[str, str]] = []
|
|
879
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
880
|
+
_form_params: List[Tuple[str, str]] = []
|
|
881
|
+
_files: Dict[str, str] = {}
|
|
882
|
+
_body_params: Optional[bytes] = None
|
|
883
|
+
|
|
884
|
+
# process the path parameters
|
|
885
|
+
if tenant_uid is not None:
|
|
886
|
+
_path_params['tenantUid'] = tenant_uid
|
|
887
|
+
# process the query parameters
|
|
888
|
+
if limit is not None:
|
|
889
|
+
|
|
890
|
+
_query_params.append(('limit', limit))
|
|
891
|
+
|
|
892
|
+
if offset is not None:
|
|
893
|
+
|
|
894
|
+
_query_params.append(('offset', offset))
|
|
895
|
+
|
|
896
|
+
if q is not None:
|
|
897
|
+
|
|
898
|
+
_query_params.append(('q', q))
|
|
899
|
+
|
|
900
|
+
# process the header parameters
|
|
901
|
+
# process the form parameters
|
|
902
|
+
# process the body parameter
|
|
903
|
+
|
|
904
|
+
|
|
905
|
+
# set the HTTP header `Accept`
|
|
906
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
907
|
+
[
|
|
908
|
+
'application/json'
|
|
909
|
+
]
|
|
910
|
+
)
|
|
911
|
+
|
|
912
|
+
|
|
913
|
+
# authentication setting
|
|
914
|
+
_auth_settings: List[str] = [
|
|
915
|
+
'bearerAuth'
|
|
916
|
+
]
|
|
917
|
+
|
|
918
|
+
return self.api_client.param_serialize(
|
|
919
|
+
method='GET',
|
|
920
|
+
resource_path='/v1/msp/tenants/{tenantUid}/users/api-only',
|
|
921
|
+
path_params=_path_params,
|
|
922
|
+
query_params=_query_params,
|
|
923
|
+
header_params=_header_params,
|
|
924
|
+
body=_body_params,
|
|
925
|
+
post_params=_form_params,
|
|
926
|
+
files=_files,
|
|
927
|
+
auth_settings=_auth_settings,
|
|
928
|
+
collection_formats=_collection_formats,
|
|
929
|
+
_host=_host,
|
|
930
|
+
_request_auth=_request_auth
|
|
931
|
+
)
|
|
932
|
+
|
|
933
|
+
|
|
934
|
+
|
|
935
|
+
|
|
936
|
+
@validate_call
|
|
937
|
+
def get_human_users_in_msp_managed_tenant(
|
|
938
|
+
self,
|
|
939
|
+
tenant_uid: Annotated[StrictStr, Field(description="Unique identifier of the tenant to retrieve the users for.")],
|
|
940
|
+
limit: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="The number of results to retrieve.")] = None,
|
|
941
|
+
offset: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="The offset of the results retrieved. The Security Cloud Control API uses the offset field to determine the index of the first result retrieved, and will retrieve `limit` results from the offset specified.")] = None,
|
|
942
|
+
q: Annotated[Optional[StrictStr], Field(description="The query to execute. Use the Lucene Query Syntax to construct your query.")] = None,
|
|
943
|
+
_request_timeout: Union[
|
|
944
|
+
None,
|
|
945
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
946
|
+
Tuple[
|
|
947
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
948
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
949
|
+
]
|
|
950
|
+
] = None,
|
|
951
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
952
|
+
_content_type: Optional[StrictStr] = None,
|
|
953
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
954
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
955
|
+
) -> UserPage:
|
|
956
|
+
"""Get non-API-only Users associated with tenant in MSP portal
|
|
957
|
+
|
|
958
|
+
Get a list of (non-API-only) users associated with the Security Cloud Control tenant managed by MSP portal.
|
|
959
|
+
|
|
960
|
+
:param tenant_uid: Unique identifier of the tenant to retrieve the users for. (required)
|
|
961
|
+
:type tenant_uid: str
|
|
962
|
+
:param limit: The number of results to retrieve.
|
|
963
|
+
:type limit: str
|
|
964
|
+
:param offset: The offset of the results retrieved. The Security Cloud Control API uses the offset field to determine the index of the first result retrieved, and will retrieve `limit` results from the offset specified.
|
|
965
|
+
:type offset: str
|
|
966
|
+
:param q: The query to execute. Use the Lucene Query Syntax to construct your query.
|
|
967
|
+
:type q: str
|
|
968
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
969
|
+
number provided, it will be total request
|
|
970
|
+
timeout. It can also be a pair (tuple) of
|
|
971
|
+
(connection, read) timeouts.
|
|
972
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
973
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
974
|
+
request; this effectively ignores the
|
|
975
|
+
authentication in the spec for a single request.
|
|
976
|
+
:type _request_auth: dict, optional
|
|
977
|
+
:param _content_type: force content-type for the request.
|
|
978
|
+
:type _content_type: str, Optional
|
|
979
|
+
:param _headers: set to override the headers for a single
|
|
980
|
+
request; this effectively ignores the headers
|
|
981
|
+
in the spec for a single request.
|
|
982
|
+
:type _headers: dict, optional
|
|
983
|
+
:param _host_index: set to override the host_index for a single
|
|
984
|
+
request; this effectively ignores the host_index
|
|
985
|
+
in the spec for a single request.
|
|
986
|
+
:type _host_index: int, optional
|
|
987
|
+
:return: Returns the result object.
|
|
988
|
+
""" # noqa: E501
|
|
989
|
+
|
|
990
|
+
_param = self._get_human_users_in_msp_managed_tenant_serialize(
|
|
991
|
+
tenant_uid=tenant_uid,
|
|
992
|
+
limit=limit,
|
|
993
|
+
offset=offset,
|
|
994
|
+
q=q,
|
|
995
|
+
_request_auth=_request_auth,
|
|
996
|
+
_content_type=_content_type,
|
|
997
|
+
_headers=_headers,
|
|
998
|
+
_host_index=_host_index
|
|
999
|
+
)
|
|
1000
|
+
|
|
1001
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1002
|
+
'200': "UserPage",
|
|
1003
|
+
'500': "CommonApiError",
|
|
1004
|
+
}
|
|
1005
|
+
response_data = self.api_client.call_api(
|
|
1006
|
+
*_param,
|
|
1007
|
+
_request_timeout=_request_timeout
|
|
1008
|
+
)
|
|
1009
|
+
response_data.read()
|
|
1010
|
+
return self.api_client.response_deserialize(
|
|
1011
|
+
response_data=response_data,
|
|
1012
|
+
response_types_map=_response_types_map,
|
|
1013
|
+
).data
|
|
1014
|
+
|
|
1015
|
+
|
|
1016
|
+
@validate_call
|
|
1017
|
+
def get_human_users_in_msp_managed_tenant_with_http_info(
|
|
1018
|
+
self,
|
|
1019
|
+
tenant_uid: Annotated[StrictStr, Field(description="Unique identifier of the tenant to retrieve the users for.")],
|
|
1020
|
+
limit: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="The number of results to retrieve.")] = None,
|
|
1021
|
+
offset: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="The offset of the results retrieved. The Security Cloud Control API uses the offset field to determine the index of the first result retrieved, and will retrieve `limit` results from the offset specified.")] = None,
|
|
1022
|
+
q: Annotated[Optional[StrictStr], Field(description="The query to execute. Use the Lucene Query Syntax to construct your query.")] = None,
|
|
1023
|
+
_request_timeout: Union[
|
|
1024
|
+
None,
|
|
1025
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1026
|
+
Tuple[
|
|
1027
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1028
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1029
|
+
]
|
|
1030
|
+
] = None,
|
|
1031
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1032
|
+
_content_type: Optional[StrictStr] = None,
|
|
1033
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1034
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1035
|
+
) -> ApiResponse[UserPage]:
|
|
1036
|
+
"""Get non-API-only Users associated with tenant in MSP portal
|
|
1037
|
+
|
|
1038
|
+
Get a list of (non-API-only) users associated with the Security Cloud Control tenant managed by MSP portal.
|
|
1039
|
+
|
|
1040
|
+
:param tenant_uid: Unique identifier of the tenant to retrieve the users for. (required)
|
|
1041
|
+
:type tenant_uid: str
|
|
1042
|
+
:param limit: The number of results to retrieve.
|
|
1043
|
+
:type limit: str
|
|
1044
|
+
:param offset: The offset of the results retrieved. The Security Cloud Control API uses the offset field to determine the index of the first result retrieved, and will retrieve `limit` results from the offset specified.
|
|
1045
|
+
:type offset: str
|
|
1046
|
+
:param q: The query to execute. Use the Lucene Query Syntax to construct your query.
|
|
1047
|
+
:type q: str
|
|
1048
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1049
|
+
number provided, it will be total request
|
|
1050
|
+
timeout. It can also be a pair (tuple) of
|
|
1051
|
+
(connection, read) timeouts.
|
|
1052
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1053
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1054
|
+
request; this effectively ignores the
|
|
1055
|
+
authentication in the spec for a single request.
|
|
1056
|
+
:type _request_auth: dict, optional
|
|
1057
|
+
:param _content_type: force content-type for the request.
|
|
1058
|
+
:type _content_type: str, Optional
|
|
1059
|
+
:param _headers: set to override the headers for a single
|
|
1060
|
+
request; this effectively ignores the headers
|
|
1061
|
+
in the spec for a single request.
|
|
1062
|
+
:type _headers: dict, optional
|
|
1063
|
+
:param _host_index: set to override the host_index for a single
|
|
1064
|
+
request; this effectively ignores the host_index
|
|
1065
|
+
in the spec for a single request.
|
|
1066
|
+
:type _host_index: int, optional
|
|
1067
|
+
:return: Returns the result object.
|
|
1068
|
+
""" # noqa: E501
|
|
1069
|
+
|
|
1070
|
+
_param = self._get_human_users_in_msp_managed_tenant_serialize(
|
|
1071
|
+
tenant_uid=tenant_uid,
|
|
1072
|
+
limit=limit,
|
|
1073
|
+
offset=offset,
|
|
1074
|
+
q=q,
|
|
1075
|
+
_request_auth=_request_auth,
|
|
1076
|
+
_content_type=_content_type,
|
|
1077
|
+
_headers=_headers,
|
|
1078
|
+
_host_index=_host_index
|
|
1079
|
+
)
|
|
1080
|
+
|
|
1081
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1082
|
+
'200': "UserPage",
|
|
1083
|
+
'500': "CommonApiError",
|
|
1084
|
+
}
|
|
1085
|
+
response_data = self.api_client.call_api(
|
|
1086
|
+
*_param,
|
|
1087
|
+
_request_timeout=_request_timeout
|
|
1088
|
+
)
|
|
1089
|
+
response_data.read()
|
|
1090
|
+
return self.api_client.response_deserialize(
|
|
1091
|
+
response_data=response_data,
|
|
1092
|
+
response_types_map=_response_types_map,
|
|
1093
|
+
)
|
|
1094
|
+
|
|
1095
|
+
|
|
1096
|
+
@validate_call
|
|
1097
|
+
def get_human_users_in_msp_managed_tenant_without_preload_content(
|
|
1098
|
+
self,
|
|
1099
|
+
tenant_uid: Annotated[StrictStr, Field(description="Unique identifier of the tenant to retrieve the users for.")],
|
|
1100
|
+
limit: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="The number of results to retrieve.")] = None,
|
|
1101
|
+
offset: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="The offset of the results retrieved. The Security Cloud Control API uses the offset field to determine the index of the first result retrieved, and will retrieve `limit` results from the offset specified.")] = None,
|
|
1102
|
+
q: Annotated[Optional[StrictStr], Field(description="The query to execute. Use the Lucene Query Syntax to construct your query.")] = None,
|
|
1103
|
+
_request_timeout: Union[
|
|
1104
|
+
None,
|
|
1105
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1106
|
+
Tuple[
|
|
1107
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1108
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1109
|
+
]
|
|
1110
|
+
] = None,
|
|
1111
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1112
|
+
_content_type: Optional[StrictStr] = None,
|
|
1113
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1114
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1115
|
+
) -> RESTResponseType:
|
|
1116
|
+
"""Get non-API-only Users associated with tenant in MSP portal
|
|
1117
|
+
|
|
1118
|
+
Get a list of (non-API-only) users associated with the Security Cloud Control tenant managed by MSP portal.
|
|
1119
|
+
|
|
1120
|
+
:param tenant_uid: Unique identifier of the tenant to retrieve the users for. (required)
|
|
1121
|
+
:type tenant_uid: str
|
|
1122
|
+
:param limit: The number of results to retrieve.
|
|
1123
|
+
:type limit: str
|
|
1124
|
+
:param offset: The offset of the results retrieved. The Security Cloud Control API uses the offset field to determine the index of the first result retrieved, and will retrieve `limit` results from the offset specified.
|
|
1125
|
+
:type offset: str
|
|
1126
|
+
:param q: The query to execute. Use the Lucene Query Syntax to construct your query.
|
|
1127
|
+
:type q: str
|
|
1128
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1129
|
+
number provided, it will be total request
|
|
1130
|
+
timeout. It can also be a pair (tuple) of
|
|
1131
|
+
(connection, read) timeouts.
|
|
1132
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1133
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1134
|
+
request; this effectively ignores the
|
|
1135
|
+
authentication in the spec for a single request.
|
|
1136
|
+
:type _request_auth: dict, optional
|
|
1137
|
+
:param _content_type: force content-type for the request.
|
|
1138
|
+
:type _content_type: str, Optional
|
|
1139
|
+
:param _headers: set to override the headers for a single
|
|
1140
|
+
request; this effectively ignores the headers
|
|
1141
|
+
in the spec for a single request.
|
|
1142
|
+
:type _headers: dict, optional
|
|
1143
|
+
:param _host_index: set to override the host_index for a single
|
|
1144
|
+
request; this effectively ignores the host_index
|
|
1145
|
+
in the spec for a single request.
|
|
1146
|
+
:type _host_index: int, optional
|
|
1147
|
+
:return: Returns the result object.
|
|
1148
|
+
""" # noqa: E501
|
|
1149
|
+
|
|
1150
|
+
_param = self._get_human_users_in_msp_managed_tenant_serialize(
|
|
1151
|
+
tenant_uid=tenant_uid,
|
|
1152
|
+
limit=limit,
|
|
1153
|
+
offset=offset,
|
|
1154
|
+
q=q,
|
|
1155
|
+
_request_auth=_request_auth,
|
|
1156
|
+
_content_type=_content_type,
|
|
1157
|
+
_headers=_headers,
|
|
1158
|
+
_host_index=_host_index
|
|
1159
|
+
)
|
|
1160
|
+
|
|
1161
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1162
|
+
'200': "UserPage",
|
|
1163
|
+
'500': "CommonApiError",
|
|
1164
|
+
}
|
|
1165
|
+
response_data = self.api_client.call_api(
|
|
1166
|
+
*_param,
|
|
1167
|
+
_request_timeout=_request_timeout
|
|
1168
|
+
)
|
|
1169
|
+
return response_data.response
|
|
1170
|
+
|
|
1171
|
+
|
|
1172
|
+
def _get_human_users_in_msp_managed_tenant_serialize(
|
|
1173
|
+
self,
|
|
1174
|
+
tenant_uid,
|
|
1175
|
+
limit,
|
|
1176
|
+
offset,
|
|
1177
|
+
q,
|
|
1178
|
+
_request_auth,
|
|
1179
|
+
_content_type,
|
|
1180
|
+
_headers,
|
|
1181
|
+
_host_index,
|
|
1182
|
+
) -> RequestSerialized:
|
|
1183
|
+
|
|
1184
|
+
_host = None
|
|
1185
|
+
|
|
1186
|
+
_collection_formats: Dict[str, str] = {
|
|
1187
|
+
}
|
|
1188
|
+
|
|
1189
|
+
_path_params: Dict[str, str] = {}
|
|
1190
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1191
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1192
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1193
|
+
_files: Dict[str, str] = {}
|
|
1194
|
+
_body_params: Optional[bytes] = None
|
|
1195
|
+
|
|
1196
|
+
# process the path parameters
|
|
1197
|
+
if tenant_uid is not None:
|
|
1198
|
+
_path_params['tenantUid'] = tenant_uid
|
|
1199
|
+
# process the query parameters
|
|
1200
|
+
if limit is not None:
|
|
1201
|
+
|
|
1202
|
+
_query_params.append(('limit', limit))
|
|
1203
|
+
|
|
1204
|
+
if offset is not None:
|
|
1205
|
+
|
|
1206
|
+
_query_params.append(('offset', offset))
|
|
1207
|
+
|
|
1208
|
+
if q is not None:
|
|
1209
|
+
|
|
1210
|
+
_query_params.append(('q', q))
|
|
1211
|
+
|
|
1212
|
+
# process the header parameters
|
|
1213
|
+
# process the form parameters
|
|
1214
|
+
# process the body parameter
|
|
1215
|
+
|
|
1216
|
+
|
|
1217
|
+
# set the HTTP header `Accept`
|
|
1218
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1219
|
+
[
|
|
1220
|
+
'application/json'
|
|
1221
|
+
]
|
|
1222
|
+
)
|
|
1223
|
+
|
|
1224
|
+
|
|
1225
|
+
# authentication setting
|
|
1226
|
+
_auth_settings: List[str] = [
|
|
1227
|
+
'bearerAuth'
|
|
1228
|
+
]
|
|
1229
|
+
|
|
1230
|
+
return self.api_client.param_serialize(
|
|
1231
|
+
method='GET',
|
|
1232
|
+
resource_path='/v1/msp/tenants/{tenantUid}/users',
|
|
1233
|
+
path_params=_path_params,
|
|
1234
|
+
query_params=_query_params,
|
|
1235
|
+
header_params=_header_params,
|
|
1236
|
+
body=_body_params,
|
|
1237
|
+
post_params=_form_params,
|
|
1238
|
+
files=_files,
|
|
1239
|
+
auth_settings=_auth_settings,
|
|
1240
|
+
collection_formats=_collection_formats,
|
|
1241
|
+
_host=_host,
|
|
1242
|
+
_request_auth=_request_auth
|
|
1243
|
+
)
|
|
1244
|
+
|
|
1245
|
+
|