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,2547 @@
|
|
|
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.api_token_info import ApiTokenInfo
|
|
24
|
+
from scc_firewall_manager_sdk.models.cdo_transaction import CdoTransaction
|
|
25
|
+
from scc_firewall_manager_sdk.models.msp_add_tenant_input import MspAddTenantInput
|
|
26
|
+
from scc_firewall_manager_sdk.models.msp_create_tenant_input import MspCreateTenantInput
|
|
27
|
+
from scc_firewall_manager_sdk.models.msp_managed_tenant import MspManagedTenant
|
|
28
|
+
from scc_firewall_manager_sdk.models.msp_managed_tenant_page import MspManagedTenantPage
|
|
29
|
+
from scc_firewall_manager_sdk.models.status_info import StatusInfo
|
|
30
|
+
|
|
31
|
+
from scc_firewall_manager_sdk.api_client import ApiClient, RequestSerialized
|
|
32
|
+
from scc_firewall_manager_sdk.api_response import ApiResponse
|
|
33
|
+
from scc_firewall_manager_sdk.rest import RESTResponseType
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class MSPTenantManagementApi:
|
|
37
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
38
|
+
Ref: https://openapi-generator.tech
|
|
39
|
+
|
|
40
|
+
Do not edit the class manually.
|
|
41
|
+
"""
|
|
42
|
+
|
|
43
|
+
def __init__(self, api_client=None) -> None:
|
|
44
|
+
if api_client is None:
|
|
45
|
+
api_client = ApiClient.get_default()
|
|
46
|
+
self.api_client = api_client
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
@validate_call
|
|
50
|
+
def add_msp_tenant(
|
|
51
|
+
self,
|
|
52
|
+
msp_add_tenant_input: MspAddTenantInput,
|
|
53
|
+
_request_timeout: Union[
|
|
54
|
+
None,
|
|
55
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
56
|
+
Tuple[
|
|
57
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
58
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
59
|
+
]
|
|
60
|
+
] = None,
|
|
61
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
62
|
+
_content_type: Optional[StrictStr] = None,
|
|
63
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
64
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
65
|
+
) -> StatusInfo:
|
|
66
|
+
"""Add Tenant to MSP Portal (API token)
|
|
67
|
+
|
|
68
|
+
Add a tenant to the MSP Portal by providing an API token for the tenant. Use this endpoint to add a tenant that the user performing the operation is not associated with, or a tenant in a different region to that of the MSP Portal. Note: This endpoint can only be executed by a super-admin in an MSP Portal.
|
|
69
|
+
|
|
70
|
+
:param msp_add_tenant_input: (required)
|
|
71
|
+
:type msp_add_tenant_input: MspAddTenantInput
|
|
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_msp_tenant_serialize(
|
|
95
|
+
msp_add_tenant_input=msp_add_tenant_input,
|
|
96
|
+
_request_auth=_request_auth,
|
|
97
|
+
_content_type=_content_type,
|
|
98
|
+
_headers=_headers,
|
|
99
|
+
_host_index=_host_index
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
103
|
+
'201': "StatusInfo",
|
|
104
|
+
'400': "CommonApiError",
|
|
105
|
+
'401': "AuthenticationError",
|
|
106
|
+
'403': "CommonApiError",
|
|
107
|
+
'500': "CommonApiError",
|
|
108
|
+
}
|
|
109
|
+
response_data = self.api_client.call_api(
|
|
110
|
+
*_param,
|
|
111
|
+
_request_timeout=_request_timeout
|
|
112
|
+
)
|
|
113
|
+
response_data.read()
|
|
114
|
+
return self.api_client.response_deserialize(
|
|
115
|
+
response_data=response_data,
|
|
116
|
+
response_types_map=_response_types_map,
|
|
117
|
+
).data
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
@validate_call
|
|
121
|
+
def add_msp_tenant_with_http_info(
|
|
122
|
+
self,
|
|
123
|
+
msp_add_tenant_input: MspAddTenantInput,
|
|
124
|
+
_request_timeout: Union[
|
|
125
|
+
None,
|
|
126
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
127
|
+
Tuple[
|
|
128
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
129
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
130
|
+
]
|
|
131
|
+
] = None,
|
|
132
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
133
|
+
_content_type: Optional[StrictStr] = None,
|
|
134
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
135
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
136
|
+
) -> ApiResponse[StatusInfo]:
|
|
137
|
+
"""Add Tenant to MSP Portal (API token)
|
|
138
|
+
|
|
139
|
+
Add a tenant to the MSP Portal by providing an API token for the tenant. Use this endpoint to add a tenant that the user performing the operation is not associated with, or a tenant in a different region to that of the MSP Portal. Note: This endpoint can only be executed by a super-admin in an MSP Portal.
|
|
140
|
+
|
|
141
|
+
:param msp_add_tenant_input: (required)
|
|
142
|
+
:type msp_add_tenant_input: MspAddTenantInput
|
|
143
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
144
|
+
number provided, it will be total request
|
|
145
|
+
timeout. It can also be a pair (tuple) of
|
|
146
|
+
(connection, read) timeouts.
|
|
147
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
148
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
149
|
+
request; this effectively ignores the
|
|
150
|
+
authentication in the spec for a single request.
|
|
151
|
+
:type _request_auth: dict, optional
|
|
152
|
+
:param _content_type: force content-type for the request.
|
|
153
|
+
:type _content_type: str, Optional
|
|
154
|
+
:param _headers: set to override the headers for a single
|
|
155
|
+
request; this effectively ignores the headers
|
|
156
|
+
in the spec for a single request.
|
|
157
|
+
:type _headers: dict, optional
|
|
158
|
+
:param _host_index: set to override the host_index for a single
|
|
159
|
+
request; this effectively ignores the host_index
|
|
160
|
+
in the spec for a single request.
|
|
161
|
+
:type _host_index: int, optional
|
|
162
|
+
:return: Returns the result object.
|
|
163
|
+
""" # noqa: E501
|
|
164
|
+
|
|
165
|
+
_param = self._add_msp_tenant_serialize(
|
|
166
|
+
msp_add_tenant_input=msp_add_tenant_input,
|
|
167
|
+
_request_auth=_request_auth,
|
|
168
|
+
_content_type=_content_type,
|
|
169
|
+
_headers=_headers,
|
|
170
|
+
_host_index=_host_index
|
|
171
|
+
)
|
|
172
|
+
|
|
173
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
174
|
+
'201': "StatusInfo",
|
|
175
|
+
'400': "CommonApiError",
|
|
176
|
+
'401': "AuthenticationError",
|
|
177
|
+
'403': "CommonApiError",
|
|
178
|
+
'500': "CommonApiError",
|
|
179
|
+
}
|
|
180
|
+
response_data = self.api_client.call_api(
|
|
181
|
+
*_param,
|
|
182
|
+
_request_timeout=_request_timeout
|
|
183
|
+
)
|
|
184
|
+
response_data.read()
|
|
185
|
+
return self.api_client.response_deserialize(
|
|
186
|
+
response_data=response_data,
|
|
187
|
+
response_types_map=_response_types_map,
|
|
188
|
+
)
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
@validate_call
|
|
192
|
+
def add_msp_tenant_without_preload_content(
|
|
193
|
+
self,
|
|
194
|
+
msp_add_tenant_input: MspAddTenantInput,
|
|
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 Tenant to MSP Portal (API token)
|
|
209
|
+
|
|
210
|
+
Add a tenant to the MSP Portal by providing an API token for the tenant. Use this endpoint to add a tenant that the user performing the operation is not associated with, or a tenant in a different region to that of the MSP Portal. Note: This endpoint can only be executed by a super-admin in an MSP Portal.
|
|
211
|
+
|
|
212
|
+
:param msp_add_tenant_input: (required)
|
|
213
|
+
:type msp_add_tenant_input: MspAddTenantInput
|
|
214
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
215
|
+
number provided, it will be total request
|
|
216
|
+
timeout. It can also be a pair (tuple) of
|
|
217
|
+
(connection, read) timeouts.
|
|
218
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
219
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
220
|
+
request; this effectively ignores the
|
|
221
|
+
authentication in the spec for a single request.
|
|
222
|
+
:type _request_auth: dict, optional
|
|
223
|
+
:param _content_type: force content-type for the request.
|
|
224
|
+
:type _content_type: str, Optional
|
|
225
|
+
:param _headers: set to override the headers for a single
|
|
226
|
+
request; this effectively ignores the headers
|
|
227
|
+
in the spec for a single request.
|
|
228
|
+
:type _headers: dict, optional
|
|
229
|
+
:param _host_index: set to override the host_index for a single
|
|
230
|
+
request; this effectively ignores the host_index
|
|
231
|
+
in the spec for a single request.
|
|
232
|
+
:type _host_index: int, optional
|
|
233
|
+
:return: Returns the result object.
|
|
234
|
+
""" # noqa: E501
|
|
235
|
+
|
|
236
|
+
_param = self._add_msp_tenant_serialize(
|
|
237
|
+
msp_add_tenant_input=msp_add_tenant_input,
|
|
238
|
+
_request_auth=_request_auth,
|
|
239
|
+
_content_type=_content_type,
|
|
240
|
+
_headers=_headers,
|
|
241
|
+
_host_index=_host_index
|
|
242
|
+
)
|
|
243
|
+
|
|
244
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
245
|
+
'201': "StatusInfo",
|
|
246
|
+
'400': "CommonApiError",
|
|
247
|
+
'401': "AuthenticationError",
|
|
248
|
+
'403': "CommonApiError",
|
|
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_msp_tenant_serialize(
|
|
259
|
+
self,
|
|
260
|
+
msp_add_tenant_input,
|
|
261
|
+
_request_auth,
|
|
262
|
+
_content_type,
|
|
263
|
+
_headers,
|
|
264
|
+
_host_index,
|
|
265
|
+
) -> RequestSerialized:
|
|
266
|
+
|
|
267
|
+
_host = None
|
|
268
|
+
|
|
269
|
+
_collection_formats: Dict[str, str] = {
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
_path_params: Dict[str, str] = {}
|
|
273
|
+
_query_params: List[Tuple[str, str]] = []
|
|
274
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
275
|
+
_form_params: List[Tuple[str, str]] = []
|
|
276
|
+
_files: Dict[str, str] = {}
|
|
277
|
+
_body_params: Optional[bytes] = None
|
|
278
|
+
|
|
279
|
+
# process the path parameters
|
|
280
|
+
# process the query parameters
|
|
281
|
+
# process the header parameters
|
|
282
|
+
# process the form parameters
|
|
283
|
+
# process the body parameter
|
|
284
|
+
if msp_add_tenant_input is not None:
|
|
285
|
+
_body_params = msp_add_tenant_input
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
# set the HTTP header `Accept`
|
|
289
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
290
|
+
[
|
|
291
|
+
'application/json'
|
|
292
|
+
]
|
|
293
|
+
)
|
|
294
|
+
|
|
295
|
+
# set the HTTP header `Content-Type`
|
|
296
|
+
if _content_type:
|
|
297
|
+
_header_params['Content-Type'] = _content_type
|
|
298
|
+
else:
|
|
299
|
+
_default_content_type = (
|
|
300
|
+
self.api_client.select_header_content_type(
|
|
301
|
+
[
|
|
302
|
+
'application/json'
|
|
303
|
+
]
|
|
304
|
+
)
|
|
305
|
+
)
|
|
306
|
+
if _default_content_type is not None:
|
|
307
|
+
_header_params['Content-Type'] = _default_content_type
|
|
308
|
+
|
|
309
|
+
# authentication setting
|
|
310
|
+
_auth_settings: List[str] = [
|
|
311
|
+
'bearerAuth'
|
|
312
|
+
]
|
|
313
|
+
|
|
314
|
+
return self.api_client.param_serialize(
|
|
315
|
+
method='POST',
|
|
316
|
+
resource_path='/v1/msp/tenants',
|
|
317
|
+
path_params=_path_params,
|
|
318
|
+
query_params=_query_params,
|
|
319
|
+
header_params=_header_params,
|
|
320
|
+
body=_body_params,
|
|
321
|
+
post_params=_form_params,
|
|
322
|
+
files=_files,
|
|
323
|
+
auth_settings=_auth_settings,
|
|
324
|
+
collection_formats=_collection_formats,
|
|
325
|
+
_host=_host,
|
|
326
|
+
_request_auth=_request_auth
|
|
327
|
+
)
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
@validate_call
|
|
333
|
+
def add_tenant_to_msp_portal(
|
|
334
|
+
self,
|
|
335
|
+
tenant_uid: Annotated[StrictStr, Field(description="Unique identifier of the tenant to add to the MSP portal.")],
|
|
336
|
+
_request_timeout: Union[
|
|
337
|
+
None,
|
|
338
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
339
|
+
Tuple[
|
|
340
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
341
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
342
|
+
]
|
|
343
|
+
] = None,
|
|
344
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
345
|
+
_content_type: Optional[StrictStr] = None,
|
|
346
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
347
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
348
|
+
) -> CdoTransaction:
|
|
349
|
+
"""(Deprecated) Add tenant to MSP Portal
|
|
350
|
+
|
|
351
|
+
This is an asynchronous operation to add an existing tenant that the user making the API call is associated with to the MSP Portal. This endpoint will add an API-only user to the tenant, generate an API token for the API-only user, and add the tenant to the MSP Portal. Note: this endpoint can only be executed by a super-admin in the MSP Portal who is also associated with the tenant being added.
|
|
352
|
+
|
|
353
|
+
:param tenant_uid: Unique identifier of the tenant to add to the MSP portal. (required)
|
|
354
|
+
:type tenant_uid: str
|
|
355
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
356
|
+
number provided, it will be total request
|
|
357
|
+
timeout. It can also be a pair (tuple) of
|
|
358
|
+
(connection, read) timeouts.
|
|
359
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
360
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
361
|
+
request; this effectively ignores the
|
|
362
|
+
authentication in the spec for a single request.
|
|
363
|
+
:type _request_auth: dict, optional
|
|
364
|
+
:param _content_type: force content-type for the request.
|
|
365
|
+
:type _content_type: str, Optional
|
|
366
|
+
:param _headers: set to override the headers for a single
|
|
367
|
+
request; this effectively ignores the headers
|
|
368
|
+
in the spec for a single request.
|
|
369
|
+
:type _headers: dict, optional
|
|
370
|
+
:param _host_index: set to override the host_index for a single
|
|
371
|
+
request; this effectively ignores the host_index
|
|
372
|
+
in the spec for a single request.
|
|
373
|
+
:type _host_index: int, optional
|
|
374
|
+
:return: Returns the result object.
|
|
375
|
+
""" # noqa: E501
|
|
376
|
+
warnings.warn("POST /v1/msp/tenants/{tenantUid} is deprecated.", DeprecationWarning)
|
|
377
|
+
|
|
378
|
+
_param = self._add_tenant_to_msp_portal_serialize(
|
|
379
|
+
tenant_uid=tenant_uid,
|
|
380
|
+
_request_auth=_request_auth,
|
|
381
|
+
_content_type=_content_type,
|
|
382
|
+
_headers=_headers,
|
|
383
|
+
_host_index=_host_index
|
|
384
|
+
)
|
|
385
|
+
|
|
386
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
387
|
+
'202': "CdoTransaction",
|
|
388
|
+
'400': "CommonApiError",
|
|
389
|
+
'401': "AuthenticationError",
|
|
390
|
+
'403': "CommonApiError",
|
|
391
|
+
'409': "CommonApiError",
|
|
392
|
+
'500': "CommonApiError",
|
|
393
|
+
}
|
|
394
|
+
response_data = self.api_client.call_api(
|
|
395
|
+
*_param,
|
|
396
|
+
_request_timeout=_request_timeout
|
|
397
|
+
)
|
|
398
|
+
response_data.read()
|
|
399
|
+
return self.api_client.response_deserialize(
|
|
400
|
+
response_data=response_data,
|
|
401
|
+
response_types_map=_response_types_map,
|
|
402
|
+
).data
|
|
403
|
+
|
|
404
|
+
|
|
405
|
+
@validate_call
|
|
406
|
+
def add_tenant_to_msp_portal_with_http_info(
|
|
407
|
+
self,
|
|
408
|
+
tenant_uid: Annotated[StrictStr, Field(description="Unique identifier of the tenant to add to the MSP portal.")],
|
|
409
|
+
_request_timeout: Union[
|
|
410
|
+
None,
|
|
411
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
412
|
+
Tuple[
|
|
413
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
414
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
415
|
+
]
|
|
416
|
+
] = None,
|
|
417
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
418
|
+
_content_type: Optional[StrictStr] = None,
|
|
419
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
420
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
421
|
+
) -> ApiResponse[CdoTransaction]:
|
|
422
|
+
"""(Deprecated) Add tenant to MSP Portal
|
|
423
|
+
|
|
424
|
+
This is an asynchronous operation to add an existing tenant that the user making the API call is associated with to the MSP Portal. This endpoint will add an API-only user to the tenant, generate an API token for the API-only user, and add the tenant to the MSP Portal. Note: this endpoint can only be executed by a super-admin in the MSP Portal who is also associated with the tenant being added.
|
|
425
|
+
|
|
426
|
+
:param tenant_uid: Unique identifier of the tenant to add to the MSP portal. (required)
|
|
427
|
+
:type tenant_uid: str
|
|
428
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
429
|
+
number provided, it will be total request
|
|
430
|
+
timeout. It can also be a pair (tuple) of
|
|
431
|
+
(connection, read) timeouts.
|
|
432
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
433
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
434
|
+
request; this effectively ignores the
|
|
435
|
+
authentication in the spec for a single request.
|
|
436
|
+
:type _request_auth: dict, optional
|
|
437
|
+
:param _content_type: force content-type for the request.
|
|
438
|
+
:type _content_type: str, Optional
|
|
439
|
+
:param _headers: set to override the headers for a single
|
|
440
|
+
request; this effectively ignores the headers
|
|
441
|
+
in the spec for a single request.
|
|
442
|
+
:type _headers: dict, optional
|
|
443
|
+
:param _host_index: set to override the host_index for a single
|
|
444
|
+
request; this effectively ignores the host_index
|
|
445
|
+
in the spec for a single request.
|
|
446
|
+
:type _host_index: int, optional
|
|
447
|
+
:return: Returns the result object.
|
|
448
|
+
""" # noqa: E501
|
|
449
|
+
warnings.warn("POST /v1/msp/tenants/{tenantUid} is deprecated.", DeprecationWarning)
|
|
450
|
+
|
|
451
|
+
_param = self._add_tenant_to_msp_portal_serialize(
|
|
452
|
+
tenant_uid=tenant_uid,
|
|
453
|
+
_request_auth=_request_auth,
|
|
454
|
+
_content_type=_content_type,
|
|
455
|
+
_headers=_headers,
|
|
456
|
+
_host_index=_host_index
|
|
457
|
+
)
|
|
458
|
+
|
|
459
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
460
|
+
'202': "CdoTransaction",
|
|
461
|
+
'400': "CommonApiError",
|
|
462
|
+
'401': "AuthenticationError",
|
|
463
|
+
'403': "CommonApiError",
|
|
464
|
+
'409': "CommonApiError",
|
|
465
|
+
'500': "CommonApiError",
|
|
466
|
+
}
|
|
467
|
+
response_data = self.api_client.call_api(
|
|
468
|
+
*_param,
|
|
469
|
+
_request_timeout=_request_timeout
|
|
470
|
+
)
|
|
471
|
+
response_data.read()
|
|
472
|
+
return self.api_client.response_deserialize(
|
|
473
|
+
response_data=response_data,
|
|
474
|
+
response_types_map=_response_types_map,
|
|
475
|
+
)
|
|
476
|
+
|
|
477
|
+
|
|
478
|
+
@validate_call
|
|
479
|
+
def add_tenant_to_msp_portal_without_preload_content(
|
|
480
|
+
self,
|
|
481
|
+
tenant_uid: Annotated[StrictStr, Field(description="Unique identifier of the tenant to add to the MSP portal.")],
|
|
482
|
+
_request_timeout: Union[
|
|
483
|
+
None,
|
|
484
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
485
|
+
Tuple[
|
|
486
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
487
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
488
|
+
]
|
|
489
|
+
] = None,
|
|
490
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
491
|
+
_content_type: Optional[StrictStr] = None,
|
|
492
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
493
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
494
|
+
) -> RESTResponseType:
|
|
495
|
+
"""(Deprecated) Add tenant to MSP Portal
|
|
496
|
+
|
|
497
|
+
This is an asynchronous operation to add an existing tenant that the user making the API call is associated with to the MSP Portal. This endpoint will add an API-only user to the tenant, generate an API token for the API-only user, and add the tenant to the MSP Portal. Note: this endpoint can only be executed by a super-admin in the MSP Portal who is also associated with the tenant being added.
|
|
498
|
+
|
|
499
|
+
:param tenant_uid: Unique identifier of the tenant to add to the MSP portal. (required)
|
|
500
|
+
:type tenant_uid: str
|
|
501
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
502
|
+
number provided, it will be total request
|
|
503
|
+
timeout. It can also be a pair (tuple) of
|
|
504
|
+
(connection, read) timeouts.
|
|
505
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
506
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
507
|
+
request; this effectively ignores the
|
|
508
|
+
authentication in the spec for a single request.
|
|
509
|
+
:type _request_auth: dict, optional
|
|
510
|
+
:param _content_type: force content-type for the request.
|
|
511
|
+
:type _content_type: str, Optional
|
|
512
|
+
:param _headers: set to override the headers for a single
|
|
513
|
+
request; this effectively ignores the headers
|
|
514
|
+
in the spec for a single request.
|
|
515
|
+
:type _headers: dict, optional
|
|
516
|
+
:param _host_index: set to override the host_index for a single
|
|
517
|
+
request; this effectively ignores the host_index
|
|
518
|
+
in the spec for a single request.
|
|
519
|
+
:type _host_index: int, optional
|
|
520
|
+
:return: Returns the result object.
|
|
521
|
+
""" # noqa: E501
|
|
522
|
+
warnings.warn("POST /v1/msp/tenants/{tenantUid} is deprecated.", DeprecationWarning)
|
|
523
|
+
|
|
524
|
+
_param = self._add_tenant_to_msp_portal_serialize(
|
|
525
|
+
tenant_uid=tenant_uid,
|
|
526
|
+
_request_auth=_request_auth,
|
|
527
|
+
_content_type=_content_type,
|
|
528
|
+
_headers=_headers,
|
|
529
|
+
_host_index=_host_index
|
|
530
|
+
)
|
|
531
|
+
|
|
532
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
533
|
+
'202': "CdoTransaction",
|
|
534
|
+
'400': "CommonApiError",
|
|
535
|
+
'401': "AuthenticationError",
|
|
536
|
+
'403': "CommonApiError",
|
|
537
|
+
'409': "CommonApiError",
|
|
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 _add_tenant_to_msp_portal_serialize(
|
|
548
|
+
self,
|
|
549
|
+
tenant_uid,
|
|
550
|
+
_request_auth,
|
|
551
|
+
_content_type,
|
|
552
|
+
_headers,
|
|
553
|
+
_host_index,
|
|
554
|
+
) -> RequestSerialized:
|
|
555
|
+
|
|
556
|
+
_host = None
|
|
557
|
+
|
|
558
|
+
_collection_formats: Dict[str, str] = {
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
_path_params: Dict[str, str] = {}
|
|
562
|
+
_query_params: List[Tuple[str, str]] = []
|
|
563
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
564
|
+
_form_params: List[Tuple[str, str]] = []
|
|
565
|
+
_files: Dict[str, str] = {}
|
|
566
|
+
_body_params: Optional[bytes] = None
|
|
567
|
+
|
|
568
|
+
# process the path parameters
|
|
569
|
+
if tenant_uid is not None:
|
|
570
|
+
_path_params['tenantUid'] = tenant_uid
|
|
571
|
+
# process the query parameters
|
|
572
|
+
# process the header parameters
|
|
573
|
+
# process the form parameters
|
|
574
|
+
# process the body parameter
|
|
575
|
+
|
|
576
|
+
|
|
577
|
+
# set the HTTP header `Accept`
|
|
578
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
579
|
+
[
|
|
580
|
+
'application/json'
|
|
581
|
+
]
|
|
582
|
+
)
|
|
583
|
+
|
|
584
|
+
|
|
585
|
+
# authentication setting
|
|
586
|
+
_auth_settings: List[str] = [
|
|
587
|
+
'bearerAuth'
|
|
588
|
+
]
|
|
589
|
+
|
|
590
|
+
return self.api_client.param_serialize(
|
|
591
|
+
method='POST',
|
|
592
|
+
resource_path='/v1/msp/tenants/{tenantUid}',
|
|
593
|
+
path_params=_path_params,
|
|
594
|
+
query_params=_query_params,
|
|
595
|
+
header_params=_header_params,
|
|
596
|
+
body=_body_params,
|
|
597
|
+
post_params=_form_params,
|
|
598
|
+
files=_files,
|
|
599
|
+
auth_settings=_auth_settings,
|
|
600
|
+
collection_formats=_collection_formats,
|
|
601
|
+
_host=_host,
|
|
602
|
+
_request_auth=_request_auth
|
|
603
|
+
)
|
|
604
|
+
|
|
605
|
+
|
|
606
|
+
|
|
607
|
+
|
|
608
|
+
@validate_call
|
|
609
|
+
def create_tenant(
|
|
610
|
+
self,
|
|
611
|
+
msp_create_tenant_input: MspCreateTenantInput,
|
|
612
|
+
_request_timeout: Union[
|
|
613
|
+
None,
|
|
614
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
615
|
+
Tuple[
|
|
616
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
617
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
618
|
+
]
|
|
619
|
+
] = None,
|
|
620
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
621
|
+
_content_type: Optional[StrictStr] = None,
|
|
622
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
623
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
624
|
+
) -> CdoTransaction:
|
|
625
|
+
"""Create Security Cloud Control Tenant
|
|
626
|
+
|
|
627
|
+
Create a new tenant in Security Cloud Control from an MSP Portal. This endpoint creates a tenant, adds the tenant to the MSP Portal. If the user creating the tenant is not an API-only user, the user is also added to the tenant. Note: This endpoint can only be executed by a super-admin in an MSP Portal. You can create no more than 1 tenant every 30 seconds. Additionally, you are limited to creating a total of 100 tenants: please speak to support to raise this limit.
|
|
628
|
+
|
|
629
|
+
:param msp_create_tenant_input: (required)
|
|
630
|
+
:type msp_create_tenant_input: MspCreateTenantInput
|
|
631
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
632
|
+
number provided, it will be total request
|
|
633
|
+
timeout. It can also be a pair (tuple) of
|
|
634
|
+
(connection, read) timeouts.
|
|
635
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
636
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
637
|
+
request; this effectively ignores the
|
|
638
|
+
authentication in the spec for a single request.
|
|
639
|
+
:type _request_auth: dict, optional
|
|
640
|
+
:param _content_type: force content-type for the request.
|
|
641
|
+
:type _content_type: str, Optional
|
|
642
|
+
:param _headers: set to override the headers for a single
|
|
643
|
+
request; this effectively ignores the headers
|
|
644
|
+
in the spec for a single request.
|
|
645
|
+
:type _headers: dict, optional
|
|
646
|
+
:param _host_index: set to override the host_index for a single
|
|
647
|
+
request; this effectively ignores the host_index
|
|
648
|
+
in the spec for a single request.
|
|
649
|
+
:type _host_index: int, optional
|
|
650
|
+
:return: Returns the result object.
|
|
651
|
+
""" # noqa: E501
|
|
652
|
+
|
|
653
|
+
_param = self._create_tenant_serialize(
|
|
654
|
+
msp_create_tenant_input=msp_create_tenant_input,
|
|
655
|
+
_request_auth=_request_auth,
|
|
656
|
+
_content_type=_content_type,
|
|
657
|
+
_headers=_headers,
|
|
658
|
+
_host_index=_host_index
|
|
659
|
+
)
|
|
660
|
+
|
|
661
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
662
|
+
'202': "CdoTransaction",
|
|
663
|
+
'400': "CommonApiError",
|
|
664
|
+
'401': "AuthenticationError",
|
|
665
|
+
'403': "CommonApiError",
|
|
666
|
+
'409': "CommonApiError",
|
|
667
|
+
'500': "CommonApiError",
|
|
668
|
+
}
|
|
669
|
+
response_data = self.api_client.call_api(
|
|
670
|
+
*_param,
|
|
671
|
+
_request_timeout=_request_timeout
|
|
672
|
+
)
|
|
673
|
+
response_data.read()
|
|
674
|
+
return self.api_client.response_deserialize(
|
|
675
|
+
response_data=response_data,
|
|
676
|
+
response_types_map=_response_types_map,
|
|
677
|
+
).data
|
|
678
|
+
|
|
679
|
+
|
|
680
|
+
@validate_call
|
|
681
|
+
def create_tenant_with_http_info(
|
|
682
|
+
self,
|
|
683
|
+
msp_create_tenant_input: MspCreateTenantInput,
|
|
684
|
+
_request_timeout: Union[
|
|
685
|
+
None,
|
|
686
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
687
|
+
Tuple[
|
|
688
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
689
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
690
|
+
]
|
|
691
|
+
] = None,
|
|
692
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
693
|
+
_content_type: Optional[StrictStr] = None,
|
|
694
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
695
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
696
|
+
) -> ApiResponse[CdoTransaction]:
|
|
697
|
+
"""Create Security Cloud Control Tenant
|
|
698
|
+
|
|
699
|
+
Create a new tenant in Security Cloud Control from an MSP Portal. This endpoint creates a tenant, adds the tenant to the MSP Portal. If the user creating the tenant is not an API-only user, the user is also added to the tenant. Note: This endpoint can only be executed by a super-admin in an MSP Portal. You can create no more than 1 tenant every 30 seconds. Additionally, you are limited to creating a total of 100 tenants: please speak to support to raise this limit.
|
|
700
|
+
|
|
701
|
+
:param msp_create_tenant_input: (required)
|
|
702
|
+
:type msp_create_tenant_input: MspCreateTenantInput
|
|
703
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
704
|
+
number provided, it will be total request
|
|
705
|
+
timeout. It can also be a pair (tuple) of
|
|
706
|
+
(connection, read) timeouts.
|
|
707
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
708
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
709
|
+
request; this effectively ignores the
|
|
710
|
+
authentication in the spec for a single request.
|
|
711
|
+
:type _request_auth: dict, optional
|
|
712
|
+
:param _content_type: force content-type for the request.
|
|
713
|
+
:type _content_type: str, Optional
|
|
714
|
+
:param _headers: set to override the headers for a single
|
|
715
|
+
request; this effectively ignores the headers
|
|
716
|
+
in the spec for a single request.
|
|
717
|
+
:type _headers: dict, optional
|
|
718
|
+
:param _host_index: set to override the host_index for a single
|
|
719
|
+
request; this effectively ignores the host_index
|
|
720
|
+
in the spec for a single request.
|
|
721
|
+
:type _host_index: int, optional
|
|
722
|
+
:return: Returns the result object.
|
|
723
|
+
""" # noqa: E501
|
|
724
|
+
|
|
725
|
+
_param = self._create_tenant_serialize(
|
|
726
|
+
msp_create_tenant_input=msp_create_tenant_input,
|
|
727
|
+
_request_auth=_request_auth,
|
|
728
|
+
_content_type=_content_type,
|
|
729
|
+
_headers=_headers,
|
|
730
|
+
_host_index=_host_index
|
|
731
|
+
)
|
|
732
|
+
|
|
733
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
734
|
+
'202': "CdoTransaction",
|
|
735
|
+
'400': "CommonApiError",
|
|
736
|
+
'401': "AuthenticationError",
|
|
737
|
+
'403': "CommonApiError",
|
|
738
|
+
'409': "CommonApiError",
|
|
739
|
+
'500': "CommonApiError",
|
|
740
|
+
}
|
|
741
|
+
response_data = self.api_client.call_api(
|
|
742
|
+
*_param,
|
|
743
|
+
_request_timeout=_request_timeout
|
|
744
|
+
)
|
|
745
|
+
response_data.read()
|
|
746
|
+
return self.api_client.response_deserialize(
|
|
747
|
+
response_data=response_data,
|
|
748
|
+
response_types_map=_response_types_map,
|
|
749
|
+
)
|
|
750
|
+
|
|
751
|
+
|
|
752
|
+
@validate_call
|
|
753
|
+
def create_tenant_without_preload_content(
|
|
754
|
+
self,
|
|
755
|
+
msp_create_tenant_input: MspCreateTenantInput,
|
|
756
|
+
_request_timeout: Union[
|
|
757
|
+
None,
|
|
758
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
759
|
+
Tuple[
|
|
760
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
761
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
762
|
+
]
|
|
763
|
+
] = None,
|
|
764
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
765
|
+
_content_type: Optional[StrictStr] = None,
|
|
766
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
767
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
768
|
+
) -> RESTResponseType:
|
|
769
|
+
"""Create Security Cloud Control Tenant
|
|
770
|
+
|
|
771
|
+
Create a new tenant in Security Cloud Control from an MSP Portal. This endpoint creates a tenant, adds the tenant to the MSP Portal. If the user creating the tenant is not an API-only user, the user is also added to the tenant. Note: This endpoint can only be executed by a super-admin in an MSP Portal. You can create no more than 1 tenant every 30 seconds. Additionally, you are limited to creating a total of 100 tenants: please speak to support to raise this limit.
|
|
772
|
+
|
|
773
|
+
:param msp_create_tenant_input: (required)
|
|
774
|
+
:type msp_create_tenant_input: MspCreateTenantInput
|
|
775
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
776
|
+
number provided, it will be total request
|
|
777
|
+
timeout. It can also be a pair (tuple) of
|
|
778
|
+
(connection, read) timeouts.
|
|
779
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
780
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
781
|
+
request; this effectively ignores the
|
|
782
|
+
authentication in the spec for a single request.
|
|
783
|
+
:type _request_auth: dict, optional
|
|
784
|
+
:param _content_type: force content-type for the request.
|
|
785
|
+
:type _content_type: str, Optional
|
|
786
|
+
:param _headers: set to override the headers for a single
|
|
787
|
+
request; this effectively ignores the headers
|
|
788
|
+
in the spec for a single request.
|
|
789
|
+
:type _headers: dict, optional
|
|
790
|
+
:param _host_index: set to override the host_index for a single
|
|
791
|
+
request; this effectively ignores the host_index
|
|
792
|
+
in the spec for a single request.
|
|
793
|
+
:type _host_index: int, optional
|
|
794
|
+
:return: Returns the result object.
|
|
795
|
+
""" # noqa: E501
|
|
796
|
+
|
|
797
|
+
_param = self._create_tenant_serialize(
|
|
798
|
+
msp_create_tenant_input=msp_create_tenant_input,
|
|
799
|
+
_request_auth=_request_auth,
|
|
800
|
+
_content_type=_content_type,
|
|
801
|
+
_headers=_headers,
|
|
802
|
+
_host_index=_host_index
|
|
803
|
+
)
|
|
804
|
+
|
|
805
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
806
|
+
'202': "CdoTransaction",
|
|
807
|
+
'400': "CommonApiError",
|
|
808
|
+
'401': "AuthenticationError",
|
|
809
|
+
'403': "CommonApiError",
|
|
810
|
+
'409': "CommonApiError",
|
|
811
|
+
'500': "CommonApiError",
|
|
812
|
+
}
|
|
813
|
+
response_data = self.api_client.call_api(
|
|
814
|
+
*_param,
|
|
815
|
+
_request_timeout=_request_timeout
|
|
816
|
+
)
|
|
817
|
+
return response_data.response
|
|
818
|
+
|
|
819
|
+
|
|
820
|
+
def _create_tenant_serialize(
|
|
821
|
+
self,
|
|
822
|
+
msp_create_tenant_input,
|
|
823
|
+
_request_auth,
|
|
824
|
+
_content_type,
|
|
825
|
+
_headers,
|
|
826
|
+
_host_index,
|
|
827
|
+
) -> RequestSerialized:
|
|
828
|
+
|
|
829
|
+
_host = None
|
|
830
|
+
|
|
831
|
+
_collection_formats: Dict[str, str] = {
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
_path_params: Dict[str, str] = {}
|
|
835
|
+
_query_params: List[Tuple[str, str]] = []
|
|
836
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
837
|
+
_form_params: List[Tuple[str, str]] = []
|
|
838
|
+
_files: Dict[str, str] = {}
|
|
839
|
+
_body_params: Optional[bytes] = None
|
|
840
|
+
|
|
841
|
+
# process the path parameters
|
|
842
|
+
# process the query parameters
|
|
843
|
+
# process the header parameters
|
|
844
|
+
# process the form parameters
|
|
845
|
+
# process the body parameter
|
|
846
|
+
if msp_create_tenant_input is not None:
|
|
847
|
+
_body_params = msp_create_tenant_input
|
|
848
|
+
|
|
849
|
+
|
|
850
|
+
# set the HTTP header `Accept`
|
|
851
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
852
|
+
[
|
|
853
|
+
'application/json'
|
|
854
|
+
]
|
|
855
|
+
)
|
|
856
|
+
|
|
857
|
+
# set the HTTP header `Content-Type`
|
|
858
|
+
if _content_type:
|
|
859
|
+
_header_params['Content-Type'] = _content_type
|
|
860
|
+
else:
|
|
861
|
+
_default_content_type = (
|
|
862
|
+
self.api_client.select_header_content_type(
|
|
863
|
+
[
|
|
864
|
+
'application/json'
|
|
865
|
+
]
|
|
866
|
+
)
|
|
867
|
+
)
|
|
868
|
+
if _default_content_type is not None:
|
|
869
|
+
_header_params['Content-Type'] = _default_content_type
|
|
870
|
+
|
|
871
|
+
# authentication setting
|
|
872
|
+
_auth_settings: List[str] = [
|
|
873
|
+
'bearerAuth'
|
|
874
|
+
]
|
|
875
|
+
|
|
876
|
+
return self.api_client.param_serialize(
|
|
877
|
+
method='POST',
|
|
878
|
+
resource_path='/v1/msp/tenants/create',
|
|
879
|
+
path_params=_path_params,
|
|
880
|
+
query_params=_query_params,
|
|
881
|
+
header_params=_header_params,
|
|
882
|
+
body=_body_params,
|
|
883
|
+
post_params=_form_params,
|
|
884
|
+
files=_files,
|
|
885
|
+
auth_settings=_auth_settings,
|
|
886
|
+
collection_formats=_collection_formats,
|
|
887
|
+
_host=_host,
|
|
888
|
+
_request_auth=_request_auth
|
|
889
|
+
)
|
|
890
|
+
|
|
891
|
+
|
|
892
|
+
|
|
893
|
+
|
|
894
|
+
@validate_call
|
|
895
|
+
def enable_multicloud_defense_for_tenant_in_msp_portal(
|
|
896
|
+
self,
|
|
897
|
+
tenant_uid: Annotated[StrictStr, Field(description="Unique identifier of the tenant that Multicloud Defense will be enabled for.")],
|
|
898
|
+
_request_timeout: Union[
|
|
899
|
+
None,
|
|
900
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
901
|
+
Tuple[
|
|
902
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
903
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
904
|
+
]
|
|
905
|
+
] = None,
|
|
906
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
907
|
+
_content_type: Optional[StrictStr] = None,
|
|
908
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
909
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
910
|
+
) -> CdoTransaction:
|
|
911
|
+
"""Enable Multicloud Defense for Security Cloud Control tenant in MSP Portal
|
|
912
|
+
|
|
913
|
+
This is an asynchronous operation to enable Multicloud Defense for a tenant associated with the MSP Portal.
|
|
914
|
+
|
|
915
|
+
:param tenant_uid: Unique identifier of the tenant that Multicloud Defense will be enabled for. (required)
|
|
916
|
+
:type tenant_uid: str
|
|
917
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
918
|
+
number provided, it will be total request
|
|
919
|
+
timeout. It can also be a pair (tuple) of
|
|
920
|
+
(connection, read) timeouts.
|
|
921
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
922
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
923
|
+
request; this effectively ignores the
|
|
924
|
+
authentication in the spec for a single request.
|
|
925
|
+
:type _request_auth: dict, optional
|
|
926
|
+
:param _content_type: force content-type for the request.
|
|
927
|
+
:type _content_type: str, Optional
|
|
928
|
+
:param _headers: set to override the headers for a single
|
|
929
|
+
request; this effectively ignores the headers
|
|
930
|
+
in the spec for a single request.
|
|
931
|
+
:type _headers: dict, optional
|
|
932
|
+
:param _host_index: set to override the host_index for a single
|
|
933
|
+
request; this effectively ignores the host_index
|
|
934
|
+
in the spec for a single request.
|
|
935
|
+
:type _host_index: int, optional
|
|
936
|
+
:return: Returns the result object.
|
|
937
|
+
""" # noqa: E501
|
|
938
|
+
|
|
939
|
+
_param = self._enable_multicloud_defense_for_tenant_in_msp_portal_serialize(
|
|
940
|
+
tenant_uid=tenant_uid,
|
|
941
|
+
_request_auth=_request_auth,
|
|
942
|
+
_content_type=_content_type,
|
|
943
|
+
_headers=_headers,
|
|
944
|
+
_host_index=_host_index
|
|
945
|
+
)
|
|
946
|
+
|
|
947
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
948
|
+
'202': "CdoTransaction",
|
|
949
|
+
'500': "CommonApiError",
|
|
950
|
+
}
|
|
951
|
+
response_data = self.api_client.call_api(
|
|
952
|
+
*_param,
|
|
953
|
+
_request_timeout=_request_timeout
|
|
954
|
+
)
|
|
955
|
+
response_data.read()
|
|
956
|
+
return self.api_client.response_deserialize(
|
|
957
|
+
response_data=response_data,
|
|
958
|
+
response_types_map=_response_types_map,
|
|
959
|
+
).data
|
|
960
|
+
|
|
961
|
+
|
|
962
|
+
@validate_call
|
|
963
|
+
def enable_multicloud_defense_for_tenant_in_msp_portal_with_http_info(
|
|
964
|
+
self,
|
|
965
|
+
tenant_uid: Annotated[StrictStr, Field(description="Unique identifier of the tenant that Multicloud Defense will be enabled for.")],
|
|
966
|
+
_request_timeout: Union[
|
|
967
|
+
None,
|
|
968
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
969
|
+
Tuple[
|
|
970
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
971
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
972
|
+
]
|
|
973
|
+
] = None,
|
|
974
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
975
|
+
_content_type: Optional[StrictStr] = None,
|
|
976
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
977
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
978
|
+
) -> ApiResponse[CdoTransaction]:
|
|
979
|
+
"""Enable Multicloud Defense for Security Cloud Control tenant in MSP Portal
|
|
980
|
+
|
|
981
|
+
This is an asynchronous operation to enable Multicloud Defense for a tenant associated with the MSP Portal.
|
|
982
|
+
|
|
983
|
+
:param tenant_uid: Unique identifier of the tenant that Multicloud Defense will be enabled for. (required)
|
|
984
|
+
:type tenant_uid: str
|
|
985
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
986
|
+
number provided, it will be total request
|
|
987
|
+
timeout. It can also be a pair (tuple) of
|
|
988
|
+
(connection, read) timeouts.
|
|
989
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
990
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
991
|
+
request; this effectively ignores the
|
|
992
|
+
authentication in the spec for a single request.
|
|
993
|
+
:type _request_auth: dict, optional
|
|
994
|
+
:param _content_type: force content-type for the request.
|
|
995
|
+
:type _content_type: str, Optional
|
|
996
|
+
:param _headers: set to override the headers for a single
|
|
997
|
+
request; this effectively ignores the headers
|
|
998
|
+
in the spec for a single request.
|
|
999
|
+
:type _headers: dict, optional
|
|
1000
|
+
:param _host_index: set to override the host_index for a single
|
|
1001
|
+
request; this effectively ignores the host_index
|
|
1002
|
+
in the spec for a single request.
|
|
1003
|
+
:type _host_index: int, optional
|
|
1004
|
+
:return: Returns the result object.
|
|
1005
|
+
""" # noqa: E501
|
|
1006
|
+
|
|
1007
|
+
_param = self._enable_multicloud_defense_for_tenant_in_msp_portal_serialize(
|
|
1008
|
+
tenant_uid=tenant_uid,
|
|
1009
|
+
_request_auth=_request_auth,
|
|
1010
|
+
_content_type=_content_type,
|
|
1011
|
+
_headers=_headers,
|
|
1012
|
+
_host_index=_host_index
|
|
1013
|
+
)
|
|
1014
|
+
|
|
1015
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1016
|
+
'202': "CdoTransaction",
|
|
1017
|
+
'500': "CommonApiError",
|
|
1018
|
+
}
|
|
1019
|
+
response_data = self.api_client.call_api(
|
|
1020
|
+
*_param,
|
|
1021
|
+
_request_timeout=_request_timeout
|
|
1022
|
+
)
|
|
1023
|
+
response_data.read()
|
|
1024
|
+
return self.api_client.response_deserialize(
|
|
1025
|
+
response_data=response_data,
|
|
1026
|
+
response_types_map=_response_types_map,
|
|
1027
|
+
)
|
|
1028
|
+
|
|
1029
|
+
|
|
1030
|
+
@validate_call
|
|
1031
|
+
def enable_multicloud_defense_for_tenant_in_msp_portal_without_preload_content(
|
|
1032
|
+
self,
|
|
1033
|
+
tenant_uid: Annotated[StrictStr, Field(description="Unique identifier of the tenant that Multicloud Defense will be enabled for.")],
|
|
1034
|
+
_request_timeout: Union[
|
|
1035
|
+
None,
|
|
1036
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1037
|
+
Tuple[
|
|
1038
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1039
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1040
|
+
]
|
|
1041
|
+
] = None,
|
|
1042
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1043
|
+
_content_type: Optional[StrictStr] = None,
|
|
1044
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1045
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1046
|
+
) -> RESTResponseType:
|
|
1047
|
+
"""Enable Multicloud Defense for Security Cloud Control tenant in MSP Portal
|
|
1048
|
+
|
|
1049
|
+
This is an asynchronous operation to enable Multicloud Defense for a tenant associated with the MSP Portal.
|
|
1050
|
+
|
|
1051
|
+
:param tenant_uid: Unique identifier of the tenant that Multicloud Defense will be enabled for. (required)
|
|
1052
|
+
:type tenant_uid: str
|
|
1053
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1054
|
+
number provided, it will be total request
|
|
1055
|
+
timeout. It can also be a pair (tuple) of
|
|
1056
|
+
(connection, read) timeouts.
|
|
1057
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1058
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1059
|
+
request; this effectively ignores the
|
|
1060
|
+
authentication in the spec for a single request.
|
|
1061
|
+
:type _request_auth: dict, optional
|
|
1062
|
+
:param _content_type: force content-type for the request.
|
|
1063
|
+
:type _content_type: str, Optional
|
|
1064
|
+
:param _headers: set to override the headers for a single
|
|
1065
|
+
request; this effectively ignores the headers
|
|
1066
|
+
in the spec for a single request.
|
|
1067
|
+
:type _headers: dict, optional
|
|
1068
|
+
:param _host_index: set to override the host_index for a single
|
|
1069
|
+
request; this effectively ignores the host_index
|
|
1070
|
+
in the spec for a single request.
|
|
1071
|
+
:type _host_index: int, optional
|
|
1072
|
+
:return: Returns the result object.
|
|
1073
|
+
""" # noqa: E501
|
|
1074
|
+
|
|
1075
|
+
_param = self._enable_multicloud_defense_for_tenant_in_msp_portal_serialize(
|
|
1076
|
+
tenant_uid=tenant_uid,
|
|
1077
|
+
_request_auth=_request_auth,
|
|
1078
|
+
_content_type=_content_type,
|
|
1079
|
+
_headers=_headers,
|
|
1080
|
+
_host_index=_host_index
|
|
1081
|
+
)
|
|
1082
|
+
|
|
1083
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1084
|
+
'202': "CdoTransaction",
|
|
1085
|
+
'500': "CommonApiError",
|
|
1086
|
+
}
|
|
1087
|
+
response_data = self.api_client.call_api(
|
|
1088
|
+
*_param,
|
|
1089
|
+
_request_timeout=_request_timeout
|
|
1090
|
+
)
|
|
1091
|
+
return response_data.response
|
|
1092
|
+
|
|
1093
|
+
|
|
1094
|
+
def _enable_multicloud_defense_for_tenant_in_msp_portal_serialize(
|
|
1095
|
+
self,
|
|
1096
|
+
tenant_uid,
|
|
1097
|
+
_request_auth,
|
|
1098
|
+
_content_type,
|
|
1099
|
+
_headers,
|
|
1100
|
+
_host_index,
|
|
1101
|
+
) -> RequestSerialized:
|
|
1102
|
+
|
|
1103
|
+
_host = None
|
|
1104
|
+
|
|
1105
|
+
_collection_formats: Dict[str, str] = {
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
_path_params: Dict[str, str] = {}
|
|
1109
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1110
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1111
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1112
|
+
_files: Dict[str, str] = {}
|
|
1113
|
+
_body_params: Optional[bytes] = None
|
|
1114
|
+
|
|
1115
|
+
# process the path parameters
|
|
1116
|
+
if tenant_uid is not None:
|
|
1117
|
+
_path_params['tenantUid'] = tenant_uid
|
|
1118
|
+
# process the query parameters
|
|
1119
|
+
# process the header parameters
|
|
1120
|
+
# process the form parameters
|
|
1121
|
+
# process the body parameter
|
|
1122
|
+
|
|
1123
|
+
|
|
1124
|
+
# set the HTTP header `Accept`
|
|
1125
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1126
|
+
[
|
|
1127
|
+
'application/json'
|
|
1128
|
+
]
|
|
1129
|
+
)
|
|
1130
|
+
|
|
1131
|
+
|
|
1132
|
+
# authentication setting
|
|
1133
|
+
_auth_settings: List[str] = [
|
|
1134
|
+
'bearerAuth'
|
|
1135
|
+
]
|
|
1136
|
+
|
|
1137
|
+
return self.api_client.param_serialize(
|
|
1138
|
+
method='POST',
|
|
1139
|
+
resource_path='/v1/msp/tenants/{tenantUid}/mcd',
|
|
1140
|
+
path_params=_path_params,
|
|
1141
|
+
query_params=_query_params,
|
|
1142
|
+
header_params=_header_params,
|
|
1143
|
+
body=_body_params,
|
|
1144
|
+
post_params=_form_params,
|
|
1145
|
+
files=_files,
|
|
1146
|
+
auth_settings=_auth_settings,
|
|
1147
|
+
collection_formats=_collection_formats,
|
|
1148
|
+
_host=_host,
|
|
1149
|
+
_request_auth=_request_auth
|
|
1150
|
+
)
|
|
1151
|
+
|
|
1152
|
+
|
|
1153
|
+
|
|
1154
|
+
|
|
1155
|
+
@validate_call
|
|
1156
|
+
def generate_api_token_for_user_in_tenant(
|
|
1157
|
+
self,
|
|
1158
|
+
tenant_uid: Annotated[StrictStr, Field(description="The unique identifier of the tenant in Security Cloud Control.")],
|
|
1159
|
+
api_user_uid: Annotated[StrictStr, Field(description="The unique identifier of the API-only user in Security Cloud Control.")],
|
|
1160
|
+
_request_timeout: Union[
|
|
1161
|
+
None,
|
|
1162
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1163
|
+
Tuple[
|
|
1164
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1165
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1166
|
+
]
|
|
1167
|
+
] = None,
|
|
1168
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1169
|
+
_content_type: Optional[StrictStr] = None,
|
|
1170
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1171
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1172
|
+
) -> ApiTokenInfo:
|
|
1173
|
+
"""Generate token for API-only user on tenant managed by MSP portal
|
|
1174
|
+
|
|
1175
|
+
Generate API Token for API-only user on a tenant managed by the MSP portal. API-only users are used for building automations with Security Cloud Control. If the user ID provided is not that of an API-only user, this operation will fail.
|
|
1176
|
+
|
|
1177
|
+
:param tenant_uid: The unique identifier of the tenant in Security Cloud Control. (required)
|
|
1178
|
+
:type tenant_uid: str
|
|
1179
|
+
:param api_user_uid: The unique identifier of the API-only user in Security Cloud Control. (required)
|
|
1180
|
+
:type api_user_uid: str
|
|
1181
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1182
|
+
number provided, it will be total request
|
|
1183
|
+
timeout. It can also be a pair (tuple) of
|
|
1184
|
+
(connection, read) timeouts.
|
|
1185
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1186
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1187
|
+
request; this effectively ignores the
|
|
1188
|
+
authentication in the spec for a single request.
|
|
1189
|
+
:type _request_auth: dict, optional
|
|
1190
|
+
:param _content_type: force content-type for the request.
|
|
1191
|
+
:type _content_type: str, Optional
|
|
1192
|
+
:param _headers: set to override the headers for a single
|
|
1193
|
+
request; this effectively ignores the headers
|
|
1194
|
+
in the spec for a single request.
|
|
1195
|
+
:type _headers: dict, optional
|
|
1196
|
+
:param _host_index: set to override the host_index for a single
|
|
1197
|
+
request; this effectively ignores the host_index
|
|
1198
|
+
in the spec for a single request.
|
|
1199
|
+
:type _host_index: int, optional
|
|
1200
|
+
:return: Returns the result object.
|
|
1201
|
+
""" # noqa: E501
|
|
1202
|
+
|
|
1203
|
+
_param = self._generate_api_token_for_user_in_tenant_serialize(
|
|
1204
|
+
tenant_uid=tenant_uid,
|
|
1205
|
+
api_user_uid=api_user_uid,
|
|
1206
|
+
_request_auth=_request_auth,
|
|
1207
|
+
_content_type=_content_type,
|
|
1208
|
+
_headers=_headers,
|
|
1209
|
+
_host_index=_host_index
|
|
1210
|
+
)
|
|
1211
|
+
|
|
1212
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1213
|
+
'201': "ApiTokenInfo",
|
|
1214
|
+
'400': "CommonApiError",
|
|
1215
|
+
'401': "AuthenticationError",
|
|
1216
|
+
'403': "CommonApiError",
|
|
1217
|
+
'500': "CommonApiError",
|
|
1218
|
+
}
|
|
1219
|
+
response_data = self.api_client.call_api(
|
|
1220
|
+
*_param,
|
|
1221
|
+
_request_timeout=_request_timeout
|
|
1222
|
+
)
|
|
1223
|
+
response_data.read()
|
|
1224
|
+
return self.api_client.response_deserialize(
|
|
1225
|
+
response_data=response_data,
|
|
1226
|
+
response_types_map=_response_types_map,
|
|
1227
|
+
).data
|
|
1228
|
+
|
|
1229
|
+
|
|
1230
|
+
@validate_call
|
|
1231
|
+
def generate_api_token_for_user_in_tenant_with_http_info(
|
|
1232
|
+
self,
|
|
1233
|
+
tenant_uid: Annotated[StrictStr, Field(description="The unique identifier of the tenant in Security Cloud Control.")],
|
|
1234
|
+
api_user_uid: Annotated[StrictStr, Field(description="The unique identifier of the API-only user in Security Cloud Control.")],
|
|
1235
|
+
_request_timeout: Union[
|
|
1236
|
+
None,
|
|
1237
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1238
|
+
Tuple[
|
|
1239
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1240
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1241
|
+
]
|
|
1242
|
+
] = None,
|
|
1243
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1244
|
+
_content_type: Optional[StrictStr] = None,
|
|
1245
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1246
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1247
|
+
) -> ApiResponse[ApiTokenInfo]:
|
|
1248
|
+
"""Generate token for API-only user on tenant managed by MSP portal
|
|
1249
|
+
|
|
1250
|
+
Generate API Token for API-only user on a tenant managed by the MSP portal. API-only users are used for building automations with Security Cloud Control. If the user ID provided is not that of an API-only user, this operation will fail.
|
|
1251
|
+
|
|
1252
|
+
:param tenant_uid: The unique identifier of the tenant in Security Cloud Control. (required)
|
|
1253
|
+
:type tenant_uid: str
|
|
1254
|
+
:param api_user_uid: The unique identifier of the API-only user in Security Cloud Control. (required)
|
|
1255
|
+
:type api_user_uid: str
|
|
1256
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1257
|
+
number provided, it will be total request
|
|
1258
|
+
timeout. It can also be a pair (tuple) of
|
|
1259
|
+
(connection, read) timeouts.
|
|
1260
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1261
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1262
|
+
request; this effectively ignores the
|
|
1263
|
+
authentication in the spec for a single request.
|
|
1264
|
+
:type _request_auth: dict, optional
|
|
1265
|
+
:param _content_type: force content-type for the request.
|
|
1266
|
+
:type _content_type: str, Optional
|
|
1267
|
+
:param _headers: set to override the headers for a single
|
|
1268
|
+
request; this effectively ignores the headers
|
|
1269
|
+
in the spec for a single request.
|
|
1270
|
+
:type _headers: dict, optional
|
|
1271
|
+
:param _host_index: set to override the host_index for a single
|
|
1272
|
+
request; this effectively ignores the host_index
|
|
1273
|
+
in the spec for a single request.
|
|
1274
|
+
:type _host_index: int, optional
|
|
1275
|
+
:return: Returns the result object.
|
|
1276
|
+
""" # noqa: E501
|
|
1277
|
+
|
|
1278
|
+
_param = self._generate_api_token_for_user_in_tenant_serialize(
|
|
1279
|
+
tenant_uid=tenant_uid,
|
|
1280
|
+
api_user_uid=api_user_uid,
|
|
1281
|
+
_request_auth=_request_auth,
|
|
1282
|
+
_content_type=_content_type,
|
|
1283
|
+
_headers=_headers,
|
|
1284
|
+
_host_index=_host_index
|
|
1285
|
+
)
|
|
1286
|
+
|
|
1287
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1288
|
+
'201': "ApiTokenInfo",
|
|
1289
|
+
'400': "CommonApiError",
|
|
1290
|
+
'401': "AuthenticationError",
|
|
1291
|
+
'403': "CommonApiError",
|
|
1292
|
+
'500': "CommonApiError",
|
|
1293
|
+
}
|
|
1294
|
+
response_data = self.api_client.call_api(
|
|
1295
|
+
*_param,
|
|
1296
|
+
_request_timeout=_request_timeout
|
|
1297
|
+
)
|
|
1298
|
+
response_data.read()
|
|
1299
|
+
return self.api_client.response_deserialize(
|
|
1300
|
+
response_data=response_data,
|
|
1301
|
+
response_types_map=_response_types_map,
|
|
1302
|
+
)
|
|
1303
|
+
|
|
1304
|
+
|
|
1305
|
+
@validate_call
|
|
1306
|
+
def generate_api_token_for_user_in_tenant_without_preload_content(
|
|
1307
|
+
self,
|
|
1308
|
+
tenant_uid: Annotated[StrictStr, Field(description="The unique identifier of the tenant in Security Cloud Control.")],
|
|
1309
|
+
api_user_uid: Annotated[StrictStr, Field(description="The unique identifier of the API-only user in Security Cloud Control.")],
|
|
1310
|
+
_request_timeout: Union[
|
|
1311
|
+
None,
|
|
1312
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1313
|
+
Tuple[
|
|
1314
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1315
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1316
|
+
]
|
|
1317
|
+
] = None,
|
|
1318
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1319
|
+
_content_type: Optional[StrictStr] = None,
|
|
1320
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1321
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1322
|
+
) -> RESTResponseType:
|
|
1323
|
+
"""Generate token for API-only user on tenant managed by MSP portal
|
|
1324
|
+
|
|
1325
|
+
Generate API Token for API-only user on a tenant managed by the MSP portal. API-only users are used for building automations with Security Cloud Control. If the user ID provided is not that of an API-only user, this operation will fail.
|
|
1326
|
+
|
|
1327
|
+
:param tenant_uid: The unique identifier of the tenant in Security Cloud Control. (required)
|
|
1328
|
+
:type tenant_uid: str
|
|
1329
|
+
:param api_user_uid: The unique identifier of the API-only user in Security Cloud Control. (required)
|
|
1330
|
+
:type api_user_uid: str
|
|
1331
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1332
|
+
number provided, it will be total request
|
|
1333
|
+
timeout. It can also be a pair (tuple) of
|
|
1334
|
+
(connection, read) timeouts.
|
|
1335
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1336
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1337
|
+
request; this effectively ignores the
|
|
1338
|
+
authentication in the spec for a single request.
|
|
1339
|
+
:type _request_auth: dict, optional
|
|
1340
|
+
:param _content_type: force content-type for the request.
|
|
1341
|
+
:type _content_type: str, Optional
|
|
1342
|
+
:param _headers: set to override the headers for a single
|
|
1343
|
+
request; this effectively ignores the headers
|
|
1344
|
+
in the spec for a single request.
|
|
1345
|
+
:type _headers: dict, optional
|
|
1346
|
+
:param _host_index: set to override the host_index for a single
|
|
1347
|
+
request; this effectively ignores the host_index
|
|
1348
|
+
in the spec for a single request.
|
|
1349
|
+
:type _host_index: int, optional
|
|
1350
|
+
:return: Returns the result object.
|
|
1351
|
+
""" # noqa: E501
|
|
1352
|
+
|
|
1353
|
+
_param = self._generate_api_token_for_user_in_tenant_serialize(
|
|
1354
|
+
tenant_uid=tenant_uid,
|
|
1355
|
+
api_user_uid=api_user_uid,
|
|
1356
|
+
_request_auth=_request_auth,
|
|
1357
|
+
_content_type=_content_type,
|
|
1358
|
+
_headers=_headers,
|
|
1359
|
+
_host_index=_host_index
|
|
1360
|
+
)
|
|
1361
|
+
|
|
1362
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1363
|
+
'201': "ApiTokenInfo",
|
|
1364
|
+
'400': "CommonApiError",
|
|
1365
|
+
'401': "AuthenticationError",
|
|
1366
|
+
'403': "CommonApiError",
|
|
1367
|
+
'500': "CommonApiError",
|
|
1368
|
+
}
|
|
1369
|
+
response_data = self.api_client.call_api(
|
|
1370
|
+
*_param,
|
|
1371
|
+
_request_timeout=_request_timeout
|
|
1372
|
+
)
|
|
1373
|
+
return response_data.response
|
|
1374
|
+
|
|
1375
|
+
|
|
1376
|
+
def _generate_api_token_for_user_in_tenant_serialize(
|
|
1377
|
+
self,
|
|
1378
|
+
tenant_uid,
|
|
1379
|
+
api_user_uid,
|
|
1380
|
+
_request_auth,
|
|
1381
|
+
_content_type,
|
|
1382
|
+
_headers,
|
|
1383
|
+
_host_index,
|
|
1384
|
+
) -> RequestSerialized:
|
|
1385
|
+
|
|
1386
|
+
_host = None
|
|
1387
|
+
|
|
1388
|
+
_collection_formats: Dict[str, str] = {
|
|
1389
|
+
}
|
|
1390
|
+
|
|
1391
|
+
_path_params: Dict[str, str] = {}
|
|
1392
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1393
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1394
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1395
|
+
_files: Dict[str, str] = {}
|
|
1396
|
+
_body_params: Optional[bytes] = None
|
|
1397
|
+
|
|
1398
|
+
# process the path parameters
|
|
1399
|
+
if tenant_uid is not None:
|
|
1400
|
+
_path_params['tenantUid'] = tenant_uid
|
|
1401
|
+
if api_user_uid is not None:
|
|
1402
|
+
_path_params['apiUserUid'] = api_user_uid
|
|
1403
|
+
# process the query parameters
|
|
1404
|
+
# process the header parameters
|
|
1405
|
+
# process the form parameters
|
|
1406
|
+
# process the body parameter
|
|
1407
|
+
|
|
1408
|
+
|
|
1409
|
+
# set the HTTP header `Accept`
|
|
1410
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1411
|
+
[
|
|
1412
|
+
'application/json'
|
|
1413
|
+
]
|
|
1414
|
+
)
|
|
1415
|
+
|
|
1416
|
+
|
|
1417
|
+
# authentication setting
|
|
1418
|
+
_auth_settings: List[str] = [
|
|
1419
|
+
'bearerAuth'
|
|
1420
|
+
]
|
|
1421
|
+
|
|
1422
|
+
return self.api_client.param_serialize(
|
|
1423
|
+
method='POST',
|
|
1424
|
+
resource_path='/v1/msp/tenants/{tenantUid}/users/{apiUserUid}/token',
|
|
1425
|
+
path_params=_path_params,
|
|
1426
|
+
query_params=_query_params,
|
|
1427
|
+
header_params=_header_params,
|
|
1428
|
+
body=_body_params,
|
|
1429
|
+
post_params=_form_params,
|
|
1430
|
+
files=_files,
|
|
1431
|
+
auth_settings=_auth_settings,
|
|
1432
|
+
collection_formats=_collection_formats,
|
|
1433
|
+
_host=_host,
|
|
1434
|
+
_request_auth=_request_auth
|
|
1435
|
+
)
|
|
1436
|
+
|
|
1437
|
+
|
|
1438
|
+
|
|
1439
|
+
|
|
1440
|
+
@validate_call
|
|
1441
|
+
def get_msp_managed_tenant(
|
|
1442
|
+
self,
|
|
1443
|
+
tenant_uid: Annotated[StrictStr, Field(description="The unique identifier of the tenant in Security Cloud Control.")],
|
|
1444
|
+
_request_timeout: Union[
|
|
1445
|
+
None,
|
|
1446
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1447
|
+
Tuple[
|
|
1448
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1449
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1450
|
+
]
|
|
1451
|
+
] = None,
|
|
1452
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1453
|
+
_content_type: Optional[StrictStr] = None,
|
|
1454
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1455
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1456
|
+
) -> MspManagedTenant:
|
|
1457
|
+
"""Get Security Cloud Control tenant managed by MSP Portal
|
|
1458
|
+
|
|
1459
|
+
Get a Security Cloud Control tenant managed by the MSP Portal.
|
|
1460
|
+
|
|
1461
|
+
:param tenant_uid: The unique identifier of the tenant in Security Cloud Control. (required)
|
|
1462
|
+
:type tenant_uid: str
|
|
1463
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1464
|
+
number provided, it will be total request
|
|
1465
|
+
timeout. It can also be a pair (tuple) of
|
|
1466
|
+
(connection, read) timeouts.
|
|
1467
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1468
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1469
|
+
request; this effectively ignores the
|
|
1470
|
+
authentication in the spec for a single request.
|
|
1471
|
+
:type _request_auth: dict, optional
|
|
1472
|
+
:param _content_type: force content-type for the request.
|
|
1473
|
+
:type _content_type: str, Optional
|
|
1474
|
+
:param _headers: set to override the headers for a single
|
|
1475
|
+
request; this effectively ignores the headers
|
|
1476
|
+
in the spec for a single request.
|
|
1477
|
+
:type _headers: dict, optional
|
|
1478
|
+
:param _host_index: set to override the host_index for a single
|
|
1479
|
+
request; this effectively ignores the host_index
|
|
1480
|
+
in the spec for a single request.
|
|
1481
|
+
:type _host_index: int, optional
|
|
1482
|
+
:return: Returns the result object.
|
|
1483
|
+
""" # noqa: E501
|
|
1484
|
+
|
|
1485
|
+
_param = self._get_msp_managed_tenant_serialize(
|
|
1486
|
+
tenant_uid=tenant_uid,
|
|
1487
|
+
_request_auth=_request_auth,
|
|
1488
|
+
_content_type=_content_type,
|
|
1489
|
+
_headers=_headers,
|
|
1490
|
+
_host_index=_host_index
|
|
1491
|
+
)
|
|
1492
|
+
|
|
1493
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1494
|
+
'200': "MspManagedTenant",
|
|
1495
|
+
'400': "CommonApiError",
|
|
1496
|
+
'401': "AuthenticationError",
|
|
1497
|
+
'403': "CommonApiError",
|
|
1498
|
+
'404': "CommonApiError",
|
|
1499
|
+
'500': "CommonApiError",
|
|
1500
|
+
}
|
|
1501
|
+
response_data = self.api_client.call_api(
|
|
1502
|
+
*_param,
|
|
1503
|
+
_request_timeout=_request_timeout
|
|
1504
|
+
)
|
|
1505
|
+
response_data.read()
|
|
1506
|
+
return self.api_client.response_deserialize(
|
|
1507
|
+
response_data=response_data,
|
|
1508
|
+
response_types_map=_response_types_map,
|
|
1509
|
+
).data
|
|
1510
|
+
|
|
1511
|
+
|
|
1512
|
+
@validate_call
|
|
1513
|
+
def get_msp_managed_tenant_with_http_info(
|
|
1514
|
+
self,
|
|
1515
|
+
tenant_uid: Annotated[StrictStr, Field(description="The unique identifier of the tenant in Security Cloud Control.")],
|
|
1516
|
+
_request_timeout: Union[
|
|
1517
|
+
None,
|
|
1518
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1519
|
+
Tuple[
|
|
1520
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1521
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1522
|
+
]
|
|
1523
|
+
] = None,
|
|
1524
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1525
|
+
_content_type: Optional[StrictStr] = None,
|
|
1526
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1527
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1528
|
+
) -> ApiResponse[MspManagedTenant]:
|
|
1529
|
+
"""Get Security Cloud Control tenant managed by MSP Portal
|
|
1530
|
+
|
|
1531
|
+
Get a Security Cloud Control tenant managed by the MSP Portal.
|
|
1532
|
+
|
|
1533
|
+
:param tenant_uid: The unique identifier of the tenant in Security Cloud Control. (required)
|
|
1534
|
+
:type tenant_uid: str
|
|
1535
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1536
|
+
number provided, it will be total request
|
|
1537
|
+
timeout. It can also be a pair (tuple) of
|
|
1538
|
+
(connection, read) timeouts.
|
|
1539
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1540
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1541
|
+
request; this effectively ignores the
|
|
1542
|
+
authentication in the spec for a single request.
|
|
1543
|
+
:type _request_auth: dict, optional
|
|
1544
|
+
:param _content_type: force content-type for the request.
|
|
1545
|
+
:type _content_type: str, Optional
|
|
1546
|
+
:param _headers: set to override the headers for a single
|
|
1547
|
+
request; this effectively ignores the headers
|
|
1548
|
+
in the spec for a single request.
|
|
1549
|
+
:type _headers: dict, optional
|
|
1550
|
+
:param _host_index: set to override the host_index for a single
|
|
1551
|
+
request; this effectively ignores the host_index
|
|
1552
|
+
in the spec for a single request.
|
|
1553
|
+
:type _host_index: int, optional
|
|
1554
|
+
:return: Returns the result object.
|
|
1555
|
+
""" # noqa: E501
|
|
1556
|
+
|
|
1557
|
+
_param = self._get_msp_managed_tenant_serialize(
|
|
1558
|
+
tenant_uid=tenant_uid,
|
|
1559
|
+
_request_auth=_request_auth,
|
|
1560
|
+
_content_type=_content_type,
|
|
1561
|
+
_headers=_headers,
|
|
1562
|
+
_host_index=_host_index
|
|
1563
|
+
)
|
|
1564
|
+
|
|
1565
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1566
|
+
'200': "MspManagedTenant",
|
|
1567
|
+
'400': "CommonApiError",
|
|
1568
|
+
'401': "AuthenticationError",
|
|
1569
|
+
'403': "CommonApiError",
|
|
1570
|
+
'404': "CommonApiError",
|
|
1571
|
+
'500': "CommonApiError",
|
|
1572
|
+
}
|
|
1573
|
+
response_data = self.api_client.call_api(
|
|
1574
|
+
*_param,
|
|
1575
|
+
_request_timeout=_request_timeout
|
|
1576
|
+
)
|
|
1577
|
+
response_data.read()
|
|
1578
|
+
return self.api_client.response_deserialize(
|
|
1579
|
+
response_data=response_data,
|
|
1580
|
+
response_types_map=_response_types_map,
|
|
1581
|
+
)
|
|
1582
|
+
|
|
1583
|
+
|
|
1584
|
+
@validate_call
|
|
1585
|
+
def get_msp_managed_tenant_without_preload_content(
|
|
1586
|
+
self,
|
|
1587
|
+
tenant_uid: Annotated[StrictStr, Field(description="The unique identifier of the tenant in Security Cloud Control.")],
|
|
1588
|
+
_request_timeout: Union[
|
|
1589
|
+
None,
|
|
1590
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1591
|
+
Tuple[
|
|
1592
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1593
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1594
|
+
]
|
|
1595
|
+
] = None,
|
|
1596
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1597
|
+
_content_type: Optional[StrictStr] = None,
|
|
1598
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1599
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1600
|
+
) -> RESTResponseType:
|
|
1601
|
+
"""Get Security Cloud Control tenant managed by MSP Portal
|
|
1602
|
+
|
|
1603
|
+
Get a Security Cloud Control tenant managed by the MSP Portal.
|
|
1604
|
+
|
|
1605
|
+
:param tenant_uid: The unique identifier of the tenant in Security Cloud Control. (required)
|
|
1606
|
+
:type tenant_uid: str
|
|
1607
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1608
|
+
number provided, it will be total request
|
|
1609
|
+
timeout. It can also be a pair (tuple) of
|
|
1610
|
+
(connection, read) timeouts.
|
|
1611
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1612
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1613
|
+
request; this effectively ignores the
|
|
1614
|
+
authentication in the spec for a single request.
|
|
1615
|
+
:type _request_auth: dict, optional
|
|
1616
|
+
:param _content_type: force content-type for the request.
|
|
1617
|
+
:type _content_type: str, Optional
|
|
1618
|
+
:param _headers: set to override the headers for a single
|
|
1619
|
+
request; this effectively ignores the headers
|
|
1620
|
+
in the spec for a single request.
|
|
1621
|
+
:type _headers: dict, optional
|
|
1622
|
+
:param _host_index: set to override the host_index for a single
|
|
1623
|
+
request; this effectively ignores the host_index
|
|
1624
|
+
in the spec for a single request.
|
|
1625
|
+
:type _host_index: int, optional
|
|
1626
|
+
:return: Returns the result object.
|
|
1627
|
+
""" # noqa: E501
|
|
1628
|
+
|
|
1629
|
+
_param = self._get_msp_managed_tenant_serialize(
|
|
1630
|
+
tenant_uid=tenant_uid,
|
|
1631
|
+
_request_auth=_request_auth,
|
|
1632
|
+
_content_type=_content_type,
|
|
1633
|
+
_headers=_headers,
|
|
1634
|
+
_host_index=_host_index
|
|
1635
|
+
)
|
|
1636
|
+
|
|
1637
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1638
|
+
'200': "MspManagedTenant",
|
|
1639
|
+
'400': "CommonApiError",
|
|
1640
|
+
'401': "AuthenticationError",
|
|
1641
|
+
'403': "CommonApiError",
|
|
1642
|
+
'404': "CommonApiError",
|
|
1643
|
+
'500': "CommonApiError",
|
|
1644
|
+
}
|
|
1645
|
+
response_data = self.api_client.call_api(
|
|
1646
|
+
*_param,
|
|
1647
|
+
_request_timeout=_request_timeout
|
|
1648
|
+
)
|
|
1649
|
+
return response_data.response
|
|
1650
|
+
|
|
1651
|
+
|
|
1652
|
+
def _get_msp_managed_tenant_serialize(
|
|
1653
|
+
self,
|
|
1654
|
+
tenant_uid,
|
|
1655
|
+
_request_auth,
|
|
1656
|
+
_content_type,
|
|
1657
|
+
_headers,
|
|
1658
|
+
_host_index,
|
|
1659
|
+
) -> RequestSerialized:
|
|
1660
|
+
|
|
1661
|
+
_host = None
|
|
1662
|
+
|
|
1663
|
+
_collection_formats: Dict[str, str] = {
|
|
1664
|
+
}
|
|
1665
|
+
|
|
1666
|
+
_path_params: Dict[str, str] = {}
|
|
1667
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1668
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1669
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1670
|
+
_files: Dict[str, str] = {}
|
|
1671
|
+
_body_params: Optional[bytes] = None
|
|
1672
|
+
|
|
1673
|
+
# process the path parameters
|
|
1674
|
+
if tenant_uid is not None:
|
|
1675
|
+
_path_params['tenantUid'] = tenant_uid
|
|
1676
|
+
# process the query parameters
|
|
1677
|
+
# process the header parameters
|
|
1678
|
+
# process the form parameters
|
|
1679
|
+
# process the body parameter
|
|
1680
|
+
|
|
1681
|
+
|
|
1682
|
+
# set the HTTP header `Accept`
|
|
1683
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1684
|
+
[
|
|
1685
|
+
'application/json'
|
|
1686
|
+
]
|
|
1687
|
+
)
|
|
1688
|
+
|
|
1689
|
+
|
|
1690
|
+
# authentication setting
|
|
1691
|
+
_auth_settings: List[str] = [
|
|
1692
|
+
'bearerAuth'
|
|
1693
|
+
]
|
|
1694
|
+
|
|
1695
|
+
return self.api_client.param_serialize(
|
|
1696
|
+
method='GET',
|
|
1697
|
+
resource_path='/v1/msp/tenants/{tenantUid}',
|
|
1698
|
+
path_params=_path_params,
|
|
1699
|
+
query_params=_query_params,
|
|
1700
|
+
header_params=_header_params,
|
|
1701
|
+
body=_body_params,
|
|
1702
|
+
post_params=_form_params,
|
|
1703
|
+
files=_files,
|
|
1704
|
+
auth_settings=_auth_settings,
|
|
1705
|
+
collection_formats=_collection_formats,
|
|
1706
|
+
_host=_host,
|
|
1707
|
+
_request_auth=_request_auth
|
|
1708
|
+
)
|
|
1709
|
+
|
|
1710
|
+
|
|
1711
|
+
|
|
1712
|
+
|
|
1713
|
+
@validate_call
|
|
1714
|
+
def get_msp_managed_tenants(
|
|
1715
|
+
self,
|
|
1716
|
+
limit: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="The number of results to retrieve.")] = None,
|
|
1717
|
+
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,
|
|
1718
|
+
q: Annotated[Optional[StrictStr], Field(description="The query to execute. Use the Lucene Query Syntax to construct your query.")] = None,
|
|
1719
|
+
_request_timeout: Union[
|
|
1720
|
+
None,
|
|
1721
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1722
|
+
Tuple[
|
|
1723
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1724
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1725
|
+
]
|
|
1726
|
+
] = None,
|
|
1727
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1728
|
+
_content_type: Optional[StrictStr] = None,
|
|
1729
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1730
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1731
|
+
) -> MspManagedTenantPage:
|
|
1732
|
+
"""Get Security Cloud Control tenants managed by MSP Portal
|
|
1733
|
+
|
|
1734
|
+
Get a list of Security Cloud Control tenants managed by the MSP Portal.
|
|
1735
|
+
|
|
1736
|
+
:param limit: The number of results to retrieve.
|
|
1737
|
+
:type limit: str
|
|
1738
|
+
: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.
|
|
1739
|
+
:type offset: str
|
|
1740
|
+
:param q: The query to execute. Use the Lucene Query Syntax to construct your query.
|
|
1741
|
+
:type q: str
|
|
1742
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1743
|
+
number provided, it will be total request
|
|
1744
|
+
timeout. It can also be a pair (tuple) of
|
|
1745
|
+
(connection, read) timeouts.
|
|
1746
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1747
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1748
|
+
request; this effectively ignores the
|
|
1749
|
+
authentication in the spec for a single request.
|
|
1750
|
+
:type _request_auth: dict, optional
|
|
1751
|
+
:param _content_type: force content-type for the request.
|
|
1752
|
+
:type _content_type: str, Optional
|
|
1753
|
+
:param _headers: set to override the headers for a single
|
|
1754
|
+
request; this effectively ignores the headers
|
|
1755
|
+
in the spec for a single request.
|
|
1756
|
+
:type _headers: dict, optional
|
|
1757
|
+
:param _host_index: set to override the host_index for a single
|
|
1758
|
+
request; this effectively ignores the host_index
|
|
1759
|
+
in the spec for a single request.
|
|
1760
|
+
:type _host_index: int, optional
|
|
1761
|
+
:return: Returns the result object.
|
|
1762
|
+
""" # noqa: E501
|
|
1763
|
+
|
|
1764
|
+
_param = self._get_msp_managed_tenants_serialize(
|
|
1765
|
+
limit=limit,
|
|
1766
|
+
offset=offset,
|
|
1767
|
+
q=q,
|
|
1768
|
+
_request_auth=_request_auth,
|
|
1769
|
+
_content_type=_content_type,
|
|
1770
|
+
_headers=_headers,
|
|
1771
|
+
_host_index=_host_index
|
|
1772
|
+
)
|
|
1773
|
+
|
|
1774
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1775
|
+
'200': "MspManagedTenantPage",
|
|
1776
|
+
'400': "CommonApiError",
|
|
1777
|
+
'401': "AuthenticationError",
|
|
1778
|
+
'403': "CommonApiError",
|
|
1779
|
+
'500': "CommonApiError",
|
|
1780
|
+
}
|
|
1781
|
+
response_data = self.api_client.call_api(
|
|
1782
|
+
*_param,
|
|
1783
|
+
_request_timeout=_request_timeout
|
|
1784
|
+
)
|
|
1785
|
+
response_data.read()
|
|
1786
|
+
return self.api_client.response_deserialize(
|
|
1787
|
+
response_data=response_data,
|
|
1788
|
+
response_types_map=_response_types_map,
|
|
1789
|
+
).data
|
|
1790
|
+
|
|
1791
|
+
|
|
1792
|
+
@validate_call
|
|
1793
|
+
def get_msp_managed_tenants_with_http_info(
|
|
1794
|
+
self,
|
|
1795
|
+
limit: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="The number of results to retrieve.")] = None,
|
|
1796
|
+
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,
|
|
1797
|
+
q: Annotated[Optional[StrictStr], Field(description="The query to execute. Use the Lucene Query Syntax to construct your query.")] = None,
|
|
1798
|
+
_request_timeout: Union[
|
|
1799
|
+
None,
|
|
1800
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1801
|
+
Tuple[
|
|
1802
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1803
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1804
|
+
]
|
|
1805
|
+
] = None,
|
|
1806
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1807
|
+
_content_type: Optional[StrictStr] = None,
|
|
1808
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1809
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1810
|
+
) -> ApiResponse[MspManagedTenantPage]:
|
|
1811
|
+
"""Get Security Cloud Control tenants managed by MSP Portal
|
|
1812
|
+
|
|
1813
|
+
Get a list of Security Cloud Control tenants managed by the MSP Portal.
|
|
1814
|
+
|
|
1815
|
+
:param limit: The number of results to retrieve.
|
|
1816
|
+
:type limit: str
|
|
1817
|
+
: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.
|
|
1818
|
+
:type offset: str
|
|
1819
|
+
:param q: The query to execute. Use the Lucene Query Syntax to construct your query.
|
|
1820
|
+
:type q: str
|
|
1821
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1822
|
+
number provided, it will be total request
|
|
1823
|
+
timeout. It can also be a pair (tuple) of
|
|
1824
|
+
(connection, read) timeouts.
|
|
1825
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1826
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1827
|
+
request; this effectively ignores the
|
|
1828
|
+
authentication in the spec for a single request.
|
|
1829
|
+
:type _request_auth: dict, optional
|
|
1830
|
+
:param _content_type: force content-type for the request.
|
|
1831
|
+
:type _content_type: str, Optional
|
|
1832
|
+
:param _headers: set to override the headers for a single
|
|
1833
|
+
request; this effectively ignores the headers
|
|
1834
|
+
in the spec for a single request.
|
|
1835
|
+
:type _headers: dict, optional
|
|
1836
|
+
:param _host_index: set to override the host_index for a single
|
|
1837
|
+
request; this effectively ignores the host_index
|
|
1838
|
+
in the spec for a single request.
|
|
1839
|
+
:type _host_index: int, optional
|
|
1840
|
+
:return: Returns the result object.
|
|
1841
|
+
""" # noqa: E501
|
|
1842
|
+
|
|
1843
|
+
_param = self._get_msp_managed_tenants_serialize(
|
|
1844
|
+
limit=limit,
|
|
1845
|
+
offset=offset,
|
|
1846
|
+
q=q,
|
|
1847
|
+
_request_auth=_request_auth,
|
|
1848
|
+
_content_type=_content_type,
|
|
1849
|
+
_headers=_headers,
|
|
1850
|
+
_host_index=_host_index
|
|
1851
|
+
)
|
|
1852
|
+
|
|
1853
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1854
|
+
'200': "MspManagedTenantPage",
|
|
1855
|
+
'400': "CommonApiError",
|
|
1856
|
+
'401': "AuthenticationError",
|
|
1857
|
+
'403': "CommonApiError",
|
|
1858
|
+
'500': "CommonApiError",
|
|
1859
|
+
}
|
|
1860
|
+
response_data = self.api_client.call_api(
|
|
1861
|
+
*_param,
|
|
1862
|
+
_request_timeout=_request_timeout
|
|
1863
|
+
)
|
|
1864
|
+
response_data.read()
|
|
1865
|
+
return self.api_client.response_deserialize(
|
|
1866
|
+
response_data=response_data,
|
|
1867
|
+
response_types_map=_response_types_map,
|
|
1868
|
+
)
|
|
1869
|
+
|
|
1870
|
+
|
|
1871
|
+
@validate_call
|
|
1872
|
+
def get_msp_managed_tenants_without_preload_content(
|
|
1873
|
+
self,
|
|
1874
|
+
limit: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="The number of results to retrieve.")] = None,
|
|
1875
|
+
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,
|
|
1876
|
+
q: Annotated[Optional[StrictStr], Field(description="The query to execute. Use the Lucene Query Syntax to construct your query.")] = None,
|
|
1877
|
+
_request_timeout: Union[
|
|
1878
|
+
None,
|
|
1879
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1880
|
+
Tuple[
|
|
1881
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1882
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1883
|
+
]
|
|
1884
|
+
] = None,
|
|
1885
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1886
|
+
_content_type: Optional[StrictStr] = None,
|
|
1887
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1888
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1889
|
+
) -> RESTResponseType:
|
|
1890
|
+
"""Get Security Cloud Control tenants managed by MSP Portal
|
|
1891
|
+
|
|
1892
|
+
Get a list of Security Cloud Control tenants managed by the MSP Portal.
|
|
1893
|
+
|
|
1894
|
+
:param limit: The number of results to retrieve.
|
|
1895
|
+
:type limit: str
|
|
1896
|
+
: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.
|
|
1897
|
+
:type offset: str
|
|
1898
|
+
:param q: The query to execute. Use the Lucene Query Syntax to construct your query.
|
|
1899
|
+
:type q: str
|
|
1900
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1901
|
+
number provided, it will be total request
|
|
1902
|
+
timeout. It can also be a pair (tuple) of
|
|
1903
|
+
(connection, read) timeouts.
|
|
1904
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1905
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1906
|
+
request; this effectively ignores the
|
|
1907
|
+
authentication in the spec for a single request.
|
|
1908
|
+
:type _request_auth: dict, optional
|
|
1909
|
+
:param _content_type: force content-type for the request.
|
|
1910
|
+
:type _content_type: str, Optional
|
|
1911
|
+
:param _headers: set to override the headers for a single
|
|
1912
|
+
request; this effectively ignores the headers
|
|
1913
|
+
in the spec for a single request.
|
|
1914
|
+
:type _headers: dict, optional
|
|
1915
|
+
:param _host_index: set to override the host_index for a single
|
|
1916
|
+
request; this effectively ignores the host_index
|
|
1917
|
+
in the spec for a single request.
|
|
1918
|
+
:type _host_index: int, optional
|
|
1919
|
+
:return: Returns the result object.
|
|
1920
|
+
""" # noqa: E501
|
|
1921
|
+
|
|
1922
|
+
_param = self._get_msp_managed_tenants_serialize(
|
|
1923
|
+
limit=limit,
|
|
1924
|
+
offset=offset,
|
|
1925
|
+
q=q,
|
|
1926
|
+
_request_auth=_request_auth,
|
|
1927
|
+
_content_type=_content_type,
|
|
1928
|
+
_headers=_headers,
|
|
1929
|
+
_host_index=_host_index
|
|
1930
|
+
)
|
|
1931
|
+
|
|
1932
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1933
|
+
'200': "MspManagedTenantPage",
|
|
1934
|
+
'400': "CommonApiError",
|
|
1935
|
+
'401': "AuthenticationError",
|
|
1936
|
+
'403': "CommonApiError",
|
|
1937
|
+
'500': "CommonApiError",
|
|
1938
|
+
}
|
|
1939
|
+
response_data = self.api_client.call_api(
|
|
1940
|
+
*_param,
|
|
1941
|
+
_request_timeout=_request_timeout
|
|
1942
|
+
)
|
|
1943
|
+
return response_data.response
|
|
1944
|
+
|
|
1945
|
+
|
|
1946
|
+
def _get_msp_managed_tenants_serialize(
|
|
1947
|
+
self,
|
|
1948
|
+
limit,
|
|
1949
|
+
offset,
|
|
1950
|
+
q,
|
|
1951
|
+
_request_auth,
|
|
1952
|
+
_content_type,
|
|
1953
|
+
_headers,
|
|
1954
|
+
_host_index,
|
|
1955
|
+
) -> RequestSerialized:
|
|
1956
|
+
|
|
1957
|
+
_host = None
|
|
1958
|
+
|
|
1959
|
+
_collection_formats: Dict[str, str] = {
|
|
1960
|
+
}
|
|
1961
|
+
|
|
1962
|
+
_path_params: Dict[str, str] = {}
|
|
1963
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1964
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1965
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1966
|
+
_files: Dict[str, str] = {}
|
|
1967
|
+
_body_params: Optional[bytes] = None
|
|
1968
|
+
|
|
1969
|
+
# process the path parameters
|
|
1970
|
+
# process the query parameters
|
|
1971
|
+
if limit is not None:
|
|
1972
|
+
|
|
1973
|
+
_query_params.append(('limit', limit))
|
|
1974
|
+
|
|
1975
|
+
if offset is not None:
|
|
1976
|
+
|
|
1977
|
+
_query_params.append(('offset', offset))
|
|
1978
|
+
|
|
1979
|
+
if q is not None:
|
|
1980
|
+
|
|
1981
|
+
_query_params.append(('q', q))
|
|
1982
|
+
|
|
1983
|
+
# process the header parameters
|
|
1984
|
+
# process the form parameters
|
|
1985
|
+
# process the body parameter
|
|
1986
|
+
|
|
1987
|
+
|
|
1988
|
+
# set the HTTP header `Accept`
|
|
1989
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1990
|
+
[
|
|
1991
|
+
'application/json'
|
|
1992
|
+
]
|
|
1993
|
+
)
|
|
1994
|
+
|
|
1995
|
+
|
|
1996
|
+
# authentication setting
|
|
1997
|
+
_auth_settings: List[str] = [
|
|
1998
|
+
'bearerAuth'
|
|
1999
|
+
]
|
|
2000
|
+
|
|
2001
|
+
return self.api_client.param_serialize(
|
|
2002
|
+
method='GET',
|
|
2003
|
+
resource_path='/v1/msp/tenants',
|
|
2004
|
+
path_params=_path_params,
|
|
2005
|
+
query_params=_query_params,
|
|
2006
|
+
header_params=_header_params,
|
|
2007
|
+
body=_body_params,
|
|
2008
|
+
post_params=_form_params,
|
|
2009
|
+
files=_files,
|
|
2010
|
+
auth_settings=_auth_settings,
|
|
2011
|
+
collection_formats=_collection_formats,
|
|
2012
|
+
_host=_host,
|
|
2013
|
+
_request_auth=_request_auth
|
|
2014
|
+
)
|
|
2015
|
+
|
|
2016
|
+
|
|
2017
|
+
|
|
2018
|
+
|
|
2019
|
+
@validate_call
|
|
2020
|
+
def provision_cd_fmc_for_tenant_in_msp_portal(
|
|
2021
|
+
self,
|
|
2022
|
+
tenant_uid: Annotated[StrictStr, Field(description="Unique identifier of the tenant that cdFMC provisioning will be enabled for.")],
|
|
2023
|
+
_request_timeout: Union[
|
|
2024
|
+
None,
|
|
2025
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2026
|
+
Tuple[
|
|
2027
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2028
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2029
|
+
]
|
|
2030
|
+
] = None,
|
|
2031
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2032
|
+
_content_type: Optional[StrictStr] = None,
|
|
2033
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2034
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2035
|
+
) -> CdoTransaction:
|
|
2036
|
+
"""Provision cdFMC for Security Cloud Control tenant in MSP Portal
|
|
2037
|
+
|
|
2038
|
+
This is an asynchronous operation to provision a cdFMC for a tenant associated with the MSP Portal. This operation does not wait for the cdFMC to be provisioned on the target tenant, and will be marked as successful once the provisioning has been successfully triggered. To monitor the transaction on the target tenant, use the UID in the `TRANSACTION_UID_IN_TARGET_TENANT` key in the transaction details.
|
|
2039
|
+
|
|
2040
|
+
:param tenant_uid: Unique identifier of the tenant that cdFMC provisioning will be enabled for. (required)
|
|
2041
|
+
:type tenant_uid: str
|
|
2042
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2043
|
+
number provided, it will be total request
|
|
2044
|
+
timeout. It can also be a pair (tuple) of
|
|
2045
|
+
(connection, read) timeouts.
|
|
2046
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2047
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2048
|
+
request; this effectively ignores the
|
|
2049
|
+
authentication in the spec for a single request.
|
|
2050
|
+
:type _request_auth: dict, optional
|
|
2051
|
+
:param _content_type: force content-type for the request.
|
|
2052
|
+
:type _content_type: str, Optional
|
|
2053
|
+
:param _headers: set to override the headers for a single
|
|
2054
|
+
request; this effectively ignores the headers
|
|
2055
|
+
in the spec for a single request.
|
|
2056
|
+
:type _headers: dict, optional
|
|
2057
|
+
:param _host_index: set to override the host_index for a single
|
|
2058
|
+
request; this effectively ignores the host_index
|
|
2059
|
+
in the spec for a single request.
|
|
2060
|
+
:type _host_index: int, optional
|
|
2061
|
+
:return: Returns the result object.
|
|
2062
|
+
""" # noqa: E501
|
|
2063
|
+
|
|
2064
|
+
_param = self._provision_cd_fmc_for_tenant_in_msp_portal_serialize(
|
|
2065
|
+
tenant_uid=tenant_uid,
|
|
2066
|
+
_request_auth=_request_auth,
|
|
2067
|
+
_content_type=_content_type,
|
|
2068
|
+
_headers=_headers,
|
|
2069
|
+
_host_index=_host_index
|
|
2070
|
+
)
|
|
2071
|
+
|
|
2072
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2073
|
+
'202': "CdoTransaction",
|
|
2074
|
+
'500': "CommonApiError",
|
|
2075
|
+
}
|
|
2076
|
+
response_data = self.api_client.call_api(
|
|
2077
|
+
*_param,
|
|
2078
|
+
_request_timeout=_request_timeout
|
|
2079
|
+
)
|
|
2080
|
+
response_data.read()
|
|
2081
|
+
return self.api_client.response_deserialize(
|
|
2082
|
+
response_data=response_data,
|
|
2083
|
+
response_types_map=_response_types_map,
|
|
2084
|
+
).data
|
|
2085
|
+
|
|
2086
|
+
|
|
2087
|
+
@validate_call
|
|
2088
|
+
def provision_cd_fmc_for_tenant_in_msp_portal_with_http_info(
|
|
2089
|
+
self,
|
|
2090
|
+
tenant_uid: Annotated[StrictStr, Field(description="Unique identifier of the tenant that cdFMC provisioning will be enabled for.")],
|
|
2091
|
+
_request_timeout: Union[
|
|
2092
|
+
None,
|
|
2093
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2094
|
+
Tuple[
|
|
2095
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2096
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2097
|
+
]
|
|
2098
|
+
] = None,
|
|
2099
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2100
|
+
_content_type: Optional[StrictStr] = None,
|
|
2101
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2102
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2103
|
+
) -> ApiResponse[CdoTransaction]:
|
|
2104
|
+
"""Provision cdFMC for Security Cloud Control tenant in MSP Portal
|
|
2105
|
+
|
|
2106
|
+
This is an asynchronous operation to provision a cdFMC for a tenant associated with the MSP Portal. This operation does not wait for the cdFMC to be provisioned on the target tenant, and will be marked as successful once the provisioning has been successfully triggered. To monitor the transaction on the target tenant, use the UID in the `TRANSACTION_UID_IN_TARGET_TENANT` key in the transaction details.
|
|
2107
|
+
|
|
2108
|
+
:param tenant_uid: Unique identifier of the tenant that cdFMC provisioning will be enabled for. (required)
|
|
2109
|
+
:type tenant_uid: str
|
|
2110
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2111
|
+
number provided, it will be total request
|
|
2112
|
+
timeout. It can also be a pair (tuple) of
|
|
2113
|
+
(connection, read) timeouts.
|
|
2114
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2115
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2116
|
+
request; this effectively ignores the
|
|
2117
|
+
authentication in the spec for a single request.
|
|
2118
|
+
:type _request_auth: dict, optional
|
|
2119
|
+
:param _content_type: force content-type for the request.
|
|
2120
|
+
:type _content_type: str, Optional
|
|
2121
|
+
:param _headers: set to override the headers for a single
|
|
2122
|
+
request; this effectively ignores the headers
|
|
2123
|
+
in the spec for a single request.
|
|
2124
|
+
:type _headers: dict, optional
|
|
2125
|
+
:param _host_index: set to override the host_index for a single
|
|
2126
|
+
request; this effectively ignores the host_index
|
|
2127
|
+
in the spec for a single request.
|
|
2128
|
+
:type _host_index: int, optional
|
|
2129
|
+
:return: Returns the result object.
|
|
2130
|
+
""" # noqa: E501
|
|
2131
|
+
|
|
2132
|
+
_param = self._provision_cd_fmc_for_tenant_in_msp_portal_serialize(
|
|
2133
|
+
tenant_uid=tenant_uid,
|
|
2134
|
+
_request_auth=_request_auth,
|
|
2135
|
+
_content_type=_content_type,
|
|
2136
|
+
_headers=_headers,
|
|
2137
|
+
_host_index=_host_index
|
|
2138
|
+
)
|
|
2139
|
+
|
|
2140
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2141
|
+
'202': "CdoTransaction",
|
|
2142
|
+
'500': "CommonApiError",
|
|
2143
|
+
}
|
|
2144
|
+
response_data = self.api_client.call_api(
|
|
2145
|
+
*_param,
|
|
2146
|
+
_request_timeout=_request_timeout
|
|
2147
|
+
)
|
|
2148
|
+
response_data.read()
|
|
2149
|
+
return self.api_client.response_deserialize(
|
|
2150
|
+
response_data=response_data,
|
|
2151
|
+
response_types_map=_response_types_map,
|
|
2152
|
+
)
|
|
2153
|
+
|
|
2154
|
+
|
|
2155
|
+
@validate_call
|
|
2156
|
+
def provision_cd_fmc_for_tenant_in_msp_portal_without_preload_content(
|
|
2157
|
+
self,
|
|
2158
|
+
tenant_uid: Annotated[StrictStr, Field(description="Unique identifier of the tenant that cdFMC provisioning will be enabled for.")],
|
|
2159
|
+
_request_timeout: Union[
|
|
2160
|
+
None,
|
|
2161
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2162
|
+
Tuple[
|
|
2163
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2164
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2165
|
+
]
|
|
2166
|
+
] = None,
|
|
2167
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2168
|
+
_content_type: Optional[StrictStr] = None,
|
|
2169
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2170
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2171
|
+
) -> RESTResponseType:
|
|
2172
|
+
"""Provision cdFMC for Security Cloud Control tenant in MSP Portal
|
|
2173
|
+
|
|
2174
|
+
This is an asynchronous operation to provision a cdFMC for a tenant associated with the MSP Portal. This operation does not wait for the cdFMC to be provisioned on the target tenant, and will be marked as successful once the provisioning has been successfully triggered. To monitor the transaction on the target tenant, use the UID in the `TRANSACTION_UID_IN_TARGET_TENANT` key in the transaction details.
|
|
2175
|
+
|
|
2176
|
+
:param tenant_uid: Unique identifier of the tenant that cdFMC provisioning will be enabled for. (required)
|
|
2177
|
+
:type tenant_uid: str
|
|
2178
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2179
|
+
number provided, it will be total request
|
|
2180
|
+
timeout. It can also be a pair (tuple) of
|
|
2181
|
+
(connection, read) timeouts.
|
|
2182
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2183
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2184
|
+
request; this effectively ignores the
|
|
2185
|
+
authentication in the spec for a single request.
|
|
2186
|
+
:type _request_auth: dict, optional
|
|
2187
|
+
:param _content_type: force content-type for the request.
|
|
2188
|
+
:type _content_type: str, Optional
|
|
2189
|
+
:param _headers: set to override the headers for a single
|
|
2190
|
+
request; this effectively ignores the headers
|
|
2191
|
+
in the spec for a single request.
|
|
2192
|
+
:type _headers: dict, optional
|
|
2193
|
+
:param _host_index: set to override the host_index for a single
|
|
2194
|
+
request; this effectively ignores the host_index
|
|
2195
|
+
in the spec for a single request.
|
|
2196
|
+
:type _host_index: int, optional
|
|
2197
|
+
:return: Returns the result object.
|
|
2198
|
+
""" # noqa: E501
|
|
2199
|
+
|
|
2200
|
+
_param = self._provision_cd_fmc_for_tenant_in_msp_portal_serialize(
|
|
2201
|
+
tenant_uid=tenant_uid,
|
|
2202
|
+
_request_auth=_request_auth,
|
|
2203
|
+
_content_type=_content_type,
|
|
2204
|
+
_headers=_headers,
|
|
2205
|
+
_host_index=_host_index
|
|
2206
|
+
)
|
|
2207
|
+
|
|
2208
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2209
|
+
'202': "CdoTransaction",
|
|
2210
|
+
'500': "CommonApiError",
|
|
2211
|
+
}
|
|
2212
|
+
response_data = self.api_client.call_api(
|
|
2213
|
+
*_param,
|
|
2214
|
+
_request_timeout=_request_timeout
|
|
2215
|
+
)
|
|
2216
|
+
return response_data.response
|
|
2217
|
+
|
|
2218
|
+
|
|
2219
|
+
def _provision_cd_fmc_for_tenant_in_msp_portal_serialize(
|
|
2220
|
+
self,
|
|
2221
|
+
tenant_uid,
|
|
2222
|
+
_request_auth,
|
|
2223
|
+
_content_type,
|
|
2224
|
+
_headers,
|
|
2225
|
+
_host_index,
|
|
2226
|
+
) -> RequestSerialized:
|
|
2227
|
+
|
|
2228
|
+
_host = None
|
|
2229
|
+
|
|
2230
|
+
_collection_formats: Dict[str, str] = {
|
|
2231
|
+
}
|
|
2232
|
+
|
|
2233
|
+
_path_params: Dict[str, str] = {}
|
|
2234
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2235
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2236
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2237
|
+
_files: Dict[str, str] = {}
|
|
2238
|
+
_body_params: Optional[bytes] = None
|
|
2239
|
+
|
|
2240
|
+
# process the path parameters
|
|
2241
|
+
if tenant_uid is not None:
|
|
2242
|
+
_path_params['tenantUid'] = tenant_uid
|
|
2243
|
+
# process the query parameters
|
|
2244
|
+
# process the header parameters
|
|
2245
|
+
# process the form parameters
|
|
2246
|
+
# process the body parameter
|
|
2247
|
+
|
|
2248
|
+
|
|
2249
|
+
# set the HTTP header `Accept`
|
|
2250
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2251
|
+
[
|
|
2252
|
+
'application/json'
|
|
2253
|
+
]
|
|
2254
|
+
)
|
|
2255
|
+
|
|
2256
|
+
|
|
2257
|
+
# authentication setting
|
|
2258
|
+
_auth_settings: List[str] = [
|
|
2259
|
+
'bearerAuth'
|
|
2260
|
+
]
|
|
2261
|
+
|
|
2262
|
+
return self.api_client.param_serialize(
|
|
2263
|
+
method='POST',
|
|
2264
|
+
resource_path='/v1/msp/tenants/{tenantUid}/cdfmc',
|
|
2265
|
+
path_params=_path_params,
|
|
2266
|
+
query_params=_query_params,
|
|
2267
|
+
header_params=_header_params,
|
|
2268
|
+
body=_body_params,
|
|
2269
|
+
post_params=_form_params,
|
|
2270
|
+
files=_files,
|
|
2271
|
+
auth_settings=_auth_settings,
|
|
2272
|
+
collection_formats=_collection_formats,
|
|
2273
|
+
_host=_host,
|
|
2274
|
+
_request_auth=_request_auth
|
|
2275
|
+
)
|
|
2276
|
+
|
|
2277
|
+
|
|
2278
|
+
|
|
2279
|
+
|
|
2280
|
+
@validate_call
|
|
2281
|
+
def remove_tenant_from_msp_portal(
|
|
2282
|
+
self,
|
|
2283
|
+
tenant_uid: Annotated[StrictStr, Field(description="The unique identifier, represented as a UUID, of the tenant in Security Cloud Control.")],
|
|
2284
|
+
_request_timeout: Union[
|
|
2285
|
+
None,
|
|
2286
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2287
|
+
Tuple[
|
|
2288
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2289
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2290
|
+
]
|
|
2291
|
+
] = None,
|
|
2292
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2293
|
+
_content_type: Optional[StrictStr] = None,
|
|
2294
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2295
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2296
|
+
) -> None:
|
|
2297
|
+
"""Remove tenant from MSP Portal
|
|
2298
|
+
|
|
2299
|
+
Removes a tenant currently associated with the MSP Portal. Note: this endpoint can only be executed by a super-admin in the MSP Portal.
|
|
2300
|
+
|
|
2301
|
+
:param tenant_uid: The unique identifier, represented as a UUID, of the tenant in Security Cloud Control. (required)
|
|
2302
|
+
:type tenant_uid: str
|
|
2303
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2304
|
+
number provided, it will be total request
|
|
2305
|
+
timeout. It can also be a pair (tuple) of
|
|
2306
|
+
(connection, read) timeouts.
|
|
2307
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2308
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2309
|
+
request; this effectively ignores the
|
|
2310
|
+
authentication in the spec for a single request.
|
|
2311
|
+
:type _request_auth: dict, optional
|
|
2312
|
+
:param _content_type: force content-type for the request.
|
|
2313
|
+
:type _content_type: str, Optional
|
|
2314
|
+
:param _headers: set to override the headers for a single
|
|
2315
|
+
request; this effectively ignores the headers
|
|
2316
|
+
in the spec for a single request.
|
|
2317
|
+
:type _headers: dict, optional
|
|
2318
|
+
:param _host_index: set to override the host_index for a single
|
|
2319
|
+
request; this effectively ignores the host_index
|
|
2320
|
+
in the spec for a single request.
|
|
2321
|
+
:type _host_index: int, optional
|
|
2322
|
+
:return: Returns the result object.
|
|
2323
|
+
""" # noqa: E501
|
|
2324
|
+
|
|
2325
|
+
_param = self._remove_tenant_from_msp_portal_serialize(
|
|
2326
|
+
tenant_uid=tenant_uid,
|
|
2327
|
+
_request_auth=_request_auth,
|
|
2328
|
+
_content_type=_content_type,
|
|
2329
|
+
_headers=_headers,
|
|
2330
|
+
_host_index=_host_index
|
|
2331
|
+
)
|
|
2332
|
+
|
|
2333
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2334
|
+
'204': None,
|
|
2335
|
+
'400': "CommonApiError",
|
|
2336
|
+
'401': "AuthenticationError",
|
|
2337
|
+
'403': "CommonApiError",
|
|
2338
|
+
'500': "CommonApiError",
|
|
2339
|
+
}
|
|
2340
|
+
response_data = self.api_client.call_api(
|
|
2341
|
+
*_param,
|
|
2342
|
+
_request_timeout=_request_timeout
|
|
2343
|
+
)
|
|
2344
|
+
response_data.read()
|
|
2345
|
+
return self.api_client.response_deserialize(
|
|
2346
|
+
response_data=response_data,
|
|
2347
|
+
response_types_map=_response_types_map,
|
|
2348
|
+
).data
|
|
2349
|
+
|
|
2350
|
+
|
|
2351
|
+
@validate_call
|
|
2352
|
+
def remove_tenant_from_msp_portal_with_http_info(
|
|
2353
|
+
self,
|
|
2354
|
+
tenant_uid: Annotated[StrictStr, Field(description="The unique identifier, represented as a UUID, of the tenant in Security Cloud Control.")],
|
|
2355
|
+
_request_timeout: Union[
|
|
2356
|
+
None,
|
|
2357
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2358
|
+
Tuple[
|
|
2359
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2360
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2361
|
+
]
|
|
2362
|
+
] = None,
|
|
2363
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2364
|
+
_content_type: Optional[StrictStr] = None,
|
|
2365
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2366
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2367
|
+
) -> ApiResponse[None]:
|
|
2368
|
+
"""Remove tenant from MSP Portal
|
|
2369
|
+
|
|
2370
|
+
Removes a tenant currently associated with the MSP Portal. Note: this endpoint can only be executed by a super-admin in the MSP Portal.
|
|
2371
|
+
|
|
2372
|
+
:param tenant_uid: The unique identifier, represented as a UUID, of the tenant in Security Cloud Control. (required)
|
|
2373
|
+
:type tenant_uid: str
|
|
2374
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2375
|
+
number provided, it will be total request
|
|
2376
|
+
timeout. It can also be a pair (tuple) of
|
|
2377
|
+
(connection, read) timeouts.
|
|
2378
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2379
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2380
|
+
request; this effectively ignores the
|
|
2381
|
+
authentication in the spec for a single request.
|
|
2382
|
+
:type _request_auth: dict, optional
|
|
2383
|
+
:param _content_type: force content-type for the request.
|
|
2384
|
+
:type _content_type: str, Optional
|
|
2385
|
+
:param _headers: set to override the headers for a single
|
|
2386
|
+
request; this effectively ignores the headers
|
|
2387
|
+
in the spec for a single request.
|
|
2388
|
+
:type _headers: dict, optional
|
|
2389
|
+
:param _host_index: set to override the host_index for a single
|
|
2390
|
+
request; this effectively ignores the host_index
|
|
2391
|
+
in the spec for a single request.
|
|
2392
|
+
:type _host_index: int, optional
|
|
2393
|
+
:return: Returns the result object.
|
|
2394
|
+
""" # noqa: E501
|
|
2395
|
+
|
|
2396
|
+
_param = self._remove_tenant_from_msp_portal_serialize(
|
|
2397
|
+
tenant_uid=tenant_uid,
|
|
2398
|
+
_request_auth=_request_auth,
|
|
2399
|
+
_content_type=_content_type,
|
|
2400
|
+
_headers=_headers,
|
|
2401
|
+
_host_index=_host_index
|
|
2402
|
+
)
|
|
2403
|
+
|
|
2404
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2405
|
+
'204': None,
|
|
2406
|
+
'400': "CommonApiError",
|
|
2407
|
+
'401': "AuthenticationError",
|
|
2408
|
+
'403': "CommonApiError",
|
|
2409
|
+
'500': "CommonApiError",
|
|
2410
|
+
}
|
|
2411
|
+
response_data = self.api_client.call_api(
|
|
2412
|
+
*_param,
|
|
2413
|
+
_request_timeout=_request_timeout
|
|
2414
|
+
)
|
|
2415
|
+
response_data.read()
|
|
2416
|
+
return self.api_client.response_deserialize(
|
|
2417
|
+
response_data=response_data,
|
|
2418
|
+
response_types_map=_response_types_map,
|
|
2419
|
+
)
|
|
2420
|
+
|
|
2421
|
+
|
|
2422
|
+
@validate_call
|
|
2423
|
+
def remove_tenant_from_msp_portal_without_preload_content(
|
|
2424
|
+
self,
|
|
2425
|
+
tenant_uid: Annotated[StrictStr, Field(description="The unique identifier, represented as a UUID, of the tenant in Security Cloud Control.")],
|
|
2426
|
+
_request_timeout: Union[
|
|
2427
|
+
None,
|
|
2428
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2429
|
+
Tuple[
|
|
2430
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2431
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2432
|
+
]
|
|
2433
|
+
] = None,
|
|
2434
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2435
|
+
_content_type: Optional[StrictStr] = None,
|
|
2436
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2437
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2438
|
+
) -> RESTResponseType:
|
|
2439
|
+
"""Remove tenant from MSP Portal
|
|
2440
|
+
|
|
2441
|
+
Removes a tenant currently associated with the MSP Portal. Note: this endpoint can only be executed by a super-admin in the MSP Portal.
|
|
2442
|
+
|
|
2443
|
+
:param tenant_uid: The unique identifier, represented as a UUID, of the tenant in Security Cloud Control. (required)
|
|
2444
|
+
:type tenant_uid: str
|
|
2445
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2446
|
+
number provided, it will be total request
|
|
2447
|
+
timeout. It can also be a pair (tuple) of
|
|
2448
|
+
(connection, read) timeouts.
|
|
2449
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2450
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2451
|
+
request; this effectively ignores the
|
|
2452
|
+
authentication in the spec for a single request.
|
|
2453
|
+
:type _request_auth: dict, optional
|
|
2454
|
+
:param _content_type: force content-type for the request.
|
|
2455
|
+
:type _content_type: str, Optional
|
|
2456
|
+
:param _headers: set to override the headers for a single
|
|
2457
|
+
request; this effectively ignores the headers
|
|
2458
|
+
in the spec for a single request.
|
|
2459
|
+
:type _headers: dict, optional
|
|
2460
|
+
:param _host_index: set to override the host_index for a single
|
|
2461
|
+
request; this effectively ignores the host_index
|
|
2462
|
+
in the spec for a single request.
|
|
2463
|
+
:type _host_index: int, optional
|
|
2464
|
+
:return: Returns the result object.
|
|
2465
|
+
""" # noqa: E501
|
|
2466
|
+
|
|
2467
|
+
_param = self._remove_tenant_from_msp_portal_serialize(
|
|
2468
|
+
tenant_uid=tenant_uid,
|
|
2469
|
+
_request_auth=_request_auth,
|
|
2470
|
+
_content_type=_content_type,
|
|
2471
|
+
_headers=_headers,
|
|
2472
|
+
_host_index=_host_index
|
|
2473
|
+
)
|
|
2474
|
+
|
|
2475
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2476
|
+
'204': None,
|
|
2477
|
+
'400': "CommonApiError",
|
|
2478
|
+
'401': "AuthenticationError",
|
|
2479
|
+
'403': "CommonApiError",
|
|
2480
|
+
'500': "CommonApiError",
|
|
2481
|
+
}
|
|
2482
|
+
response_data = self.api_client.call_api(
|
|
2483
|
+
*_param,
|
|
2484
|
+
_request_timeout=_request_timeout
|
|
2485
|
+
)
|
|
2486
|
+
return response_data.response
|
|
2487
|
+
|
|
2488
|
+
|
|
2489
|
+
def _remove_tenant_from_msp_portal_serialize(
|
|
2490
|
+
self,
|
|
2491
|
+
tenant_uid,
|
|
2492
|
+
_request_auth,
|
|
2493
|
+
_content_type,
|
|
2494
|
+
_headers,
|
|
2495
|
+
_host_index,
|
|
2496
|
+
) -> RequestSerialized:
|
|
2497
|
+
|
|
2498
|
+
_host = None
|
|
2499
|
+
|
|
2500
|
+
_collection_formats: Dict[str, str] = {
|
|
2501
|
+
}
|
|
2502
|
+
|
|
2503
|
+
_path_params: Dict[str, str] = {}
|
|
2504
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2505
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2506
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2507
|
+
_files: Dict[str, str] = {}
|
|
2508
|
+
_body_params: Optional[bytes] = None
|
|
2509
|
+
|
|
2510
|
+
# process the path parameters
|
|
2511
|
+
if tenant_uid is not None:
|
|
2512
|
+
_path_params['tenantUid'] = tenant_uid
|
|
2513
|
+
# process the query parameters
|
|
2514
|
+
# process the header parameters
|
|
2515
|
+
# process the form parameters
|
|
2516
|
+
# process the body parameter
|
|
2517
|
+
|
|
2518
|
+
|
|
2519
|
+
# set the HTTP header `Accept`
|
|
2520
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2521
|
+
[
|
|
2522
|
+
'application/json'
|
|
2523
|
+
]
|
|
2524
|
+
)
|
|
2525
|
+
|
|
2526
|
+
|
|
2527
|
+
# authentication setting
|
|
2528
|
+
_auth_settings: List[str] = [
|
|
2529
|
+
'bearerAuth'
|
|
2530
|
+
]
|
|
2531
|
+
|
|
2532
|
+
return self.api_client.param_serialize(
|
|
2533
|
+
method='DELETE',
|
|
2534
|
+
resource_path='/v1/msp/tenants/{tenantUid}',
|
|
2535
|
+
path_params=_path_params,
|
|
2536
|
+
query_params=_query_params,
|
|
2537
|
+
header_params=_header_params,
|
|
2538
|
+
body=_body_params,
|
|
2539
|
+
post_params=_form_params,
|
|
2540
|
+
files=_files,
|
|
2541
|
+
auth_settings=_auth_settings,
|
|
2542
|
+
collection_formats=_collection_formats,
|
|
2543
|
+
_host=_host,
|
|
2544
|
+
_request_auth=_request_auth
|
|
2545
|
+
)
|
|
2546
|
+
|
|
2547
|
+
|