across-server-openapi-python 0.0.1__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.
- across/__init__.py +0 -0
- across/sdk/__init__.py +0 -0
- across/sdk/v1/__init__.py +251 -0
- across/sdk/v1/abstract_credential_storage.py +16 -0
- across/sdk/v1/api/__init__.py +20 -0
- across/sdk/v1/api/auth_api.py +1097 -0
- across/sdk/v1/api/filter_api.py +623 -0
- across/sdk/v1/api/group_api.py +586 -0
- across/sdk/v1/api/group_invite_api.py +1165 -0
- across/sdk/v1/api/group_role_api.py +2070 -0
- across/sdk/v1/api/instrument_api.py +633 -0
- across/sdk/v1/api/internal_api.py +571 -0
- across/sdk/v1/api/observation_api.py +940 -0
- across/sdk/v1/api/observatory_api.py +670 -0
- across/sdk/v1/api/permission_api.py +285 -0
- across/sdk/v1/api/role_api.py +552 -0
- across/sdk/v1/api/schedule_api.py +1914 -0
- across/sdk/v1/api/service_account_api.py +2353 -0
- across/sdk/v1/api/telescope_api.py +667 -0
- across/sdk/v1/api/tle_api.py +317 -0
- across/sdk/v1/api/tools_api.py +812 -0
- across/sdk/v1/api/user_api.py +2263 -0
- across/sdk/v1/api_client.py +801 -0
- across/sdk/v1/api_client_wrapper.py +239 -0
- across/sdk/v1/api_response.py +21 -0
- across/sdk/v1/configuration.py +605 -0
- across/sdk/v1/exceptions.py +216 -0
- across/sdk/v1/models/__init__.py +103 -0
- across/sdk/v1/models/access_token_response.py +89 -0
- across/sdk/v1/models/across_server_routes_v1_group_invite_schemas_group_invite.py +104 -0
- across/sdk/v1/models/across_server_routes_v1_group_role_schemas_group_role.py +124 -0
- across/sdk/v1/models/across_server_routes_v1_group_role_schemas_service_account.py +106 -0
- across/sdk/v1/models/across_server_routes_v1_group_role_schemas_user.py +95 -0
- across/sdk/v1/models/across_server_routes_v1_group_schemas_group.py +111 -0
- across/sdk/v1/models/across_server_routes_v1_group_schemas_user.py +105 -0
- across/sdk/v1/models/across_server_routes_v1_role_schemas_user.py +96 -0
- across/sdk/v1/models/across_server_routes_v1_system_service_account_schemas_service_account.py +90 -0
- across/sdk/v1/models/across_server_routes_v1_system_service_account_schemas_service_account_secret.py +92 -0
- across/sdk/v1/models/across_server_routes_v1_user_schemas_group.py +101 -0
- across/sdk/v1/models/across_server_routes_v1_user_schemas_group_invite.py +99 -0
- across/sdk/v1/models/across_server_routes_v1_user_schemas_group_role.py +99 -0
- across/sdk/v1/models/across_server_routes_v1_user_schemas_user.py +135 -0
- across/sdk/v1/models/across_server_routes_v1_user_service_account_schemas_service_account.py +111 -0
- across/sdk/v1/models/across_server_routes_v1_user_service_account_schemas_service_account_secret.py +118 -0
- across/sdk/v1/models/alt_az_constraint.py +130 -0
- across/sdk/v1/models/bandpass.py +149 -0
- across/sdk/v1/models/bandpass_type.py +155 -0
- across/sdk/v1/models/constrained_date.py +93 -0
- across/sdk/v1/models/constraint_reason.py +89 -0
- across/sdk/v1/models/constraint_type.py +43 -0
- across/sdk/v1/models/coordinate.py +100 -0
- across/sdk/v1/models/date_range.py +90 -0
- across/sdk/v1/models/depth_unit.py +39 -0
- across/sdk/v1/models/earth_limb_constraint.py +124 -0
- across/sdk/v1/models/energy_bandpass.py +121 -0
- across/sdk/v1/models/energy_unit.py +40 -0
- across/sdk/v1/models/ephemeris_type.py +39 -0
- across/sdk/v1/models/filter.py +135 -0
- across/sdk/v1/models/frequency_bandpass.py +121 -0
- across/sdk/v1/models/frequency_unit.py +40 -0
- across/sdk/v1/models/grant_type.py +37 -0
- across/sdk/v1/models/ground_parameters.py +91 -0
- across/sdk/v1/models/group_invite_create.py +87 -0
- across/sdk/v1/models/group_invite_group_details.py +94 -0
- across/sdk/v1/models/group_read.py +91 -0
- across/sdk/v1/models/group_role_create.py +89 -0
- across/sdk/v1/models/group_role_read.py +99 -0
- across/sdk/v1/models/http_validation_error.py +95 -0
- across/sdk/v1/models/id_name_schema.py +96 -0
- across/sdk/v1/models/instrument.py +163 -0
- across/sdk/v1/models/instrument_constraints_inner.py +237 -0
- across/sdk/v1/models/ivoa_obs_category.py +39 -0
- across/sdk/v1/models/ivoa_obs_tracking_type.py +38 -0
- across/sdk/v1/models/jpl_parameters.py +87 -0
- across/sdk/v1/models/moon_angle_constraint.py +124 -0
- across/sdk/v1/models/nullable_date_range.py +100 -0
- across/sdk/v1/models/observation.py +248 -0
- across/sdk/v1/models/observation_create.py +249 -0
- across/sdk/v1/models/observation_status.py +40 -0
- across/sdk/v1/models/observation_type.py +39 -0
- across/sdk/v1/models/observatory.py +145 -0
- across/sdk/v1/models/observatory_ephemeris_type.py +96 -0
- across/sdk/v1/models/observatory_type.py +37 -0
- across/sdk/v1/models/page_observation.py +116 -0
- across/sdk/v1/models/page_schedule.py +116 -0
- across/sdk/v1/models/parameters.py +164 -0
- across/sdk/v1/models/permission.py +89 -0
- across/sdk/v1/models/point.py +89 -0
- across/sdk/v1/models/role.py +100 -0
- across/sdk/v1/models/role_base.py +89 -0
- across/sdk/v1/models/saa_polygon_constraint.py +101 -0
- across/sdk/v1/models/schedule.py +144 -0
- across/sdk/v1/models/schedule_cadence.py +99 -0
- across/sdk/v1/models/schedule_create.py +123 -0
- across/sdk/v1/models/schedule_create_many.py +97 -0
- across/sdk/v1/models/schedule_fidelity.py +37 -0
- across/sdk/v1/models/schedule_status.py +38 -0
- across/sdk/v1/models/service_account_create.py +101 -0
- across/sdk/v1/models/service_account_secret.py +103 -0
- across/sdk/v1/models/service_account_update.py +106 -0
- across/sdk/v1/models/spice_parameters.py +89 -0
- across/sdk/v1/models/sun_angle_constraint.py +124 -0
- across/sdk/v1/models/system_service_account.py +121 -0
- across/sdk/v1/models/system_service_account_secret.py +123 -0
- across/sdk/v1/models/telescope.py +135 -0
- across/sdk/v1/models/telescope_instrument.py +163 -0
- across/sdk/v1/models/tle.py +99 -0
- across/sdk/v1/models/tle_create.py +94 -0
- across/sdk/v1/models/tle_parameters.py +89 -0
- across/sdk/v1/models/unit_value.py +94 -0
- across/sdk/v1/models/user_create.py +93 -0
- across/sdk/v1/models/user_info.py +95 -0
- across/sdk/v1/models/user_update.py +106 -0
- across/sdk/v1/models/validation_error.py +99 -0
- across/sdk/v1/models/validation_error_loc_inner.py +138 -0
- across/sdk/v1/models/visibility_result.py +97 -0
- across/sdk/v1/models/visibility_type.py +38 -0
- across/sdk/v1/models/visibility_window.py +99 -0
- across/sdk/v1/models/wavelength_bandpass.py +142 -0
- across/sdk/v1/models/wavelength_unit.py +39 -0
- across/sdk/v1/models/window.py +96 -0
- across/sdk/v1/py.typed +0 -0
- across/sdk/v1/rest.py +258 -0
- across_server_openapi_python-0.0.1.dist-info/METADATA +326 -0
- across_server_openapi_python-0.0.1.dist-info/RECORD +128 -0
- across_server_openapi_python-0.0.1.dist-info/WHEEL +5 -0
- across_server_openapi_python-0.0.1.dist-info/licenses/LICENSE +42 -0
- across_server_openapi_python-0.0.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,2353 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
ACROSS Server
|
|
5
|
+
|
|
6
|
+
Server providing tools and utilities for various NASA missions to aid in coordination of large observation efforts.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.3.2
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
import warnings
|
|
15
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
16
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
17
|
+
from typing_extensions import Annotated
|
|
18
|
+
|
|
19
|
+
from pydantic import StrictStr
|
|
20
|
+
from typing import List
|
|
21
|
+
from across.sdk.v1.models.across_server_routes_v1_user_service_account_schemas_service_account import AcrossServerRoutesV1UserServiceAccountSchemasServiceAccount
|
|
22
|
+
from across.sdk.v1.models.service_account_create import ServiceAccountCreate
|
|
23
|
+
from across.sdk.v1.models.service_account_secret import ServiceAccountSecret
|
|
24
|
+
from across.sdk.v1.models.service_account_update import ServiceAccountUpdate
|
|
25
|
+
|
|
26
|
+
from across.sdk.v1.api_client import ApiClient, RequestSerialized
|
|
27
|
+
from across.sdk.v1.api_response import ApiResponse
|
|
28
|
+
from across.sdk.v1.rest import RESTResponseType
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class ServiceAccountApi:
|
|
32
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
33
|
+
Ref: https://openapi-generator.tech
|
|
34
|
+
|
|
35
|
+
Do not edit the class manually.
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
def __init__(self, api_client=None) -> None:
|
|
39
|
+
if api_client is None:
|
|
40
|
+
api_client = ApiClient.get_default()
|
|
41
|
+
self.api_client = api_client
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
@validate_call
|
|
45
|
+
def assign_to_service_account(
|
|
46
|
+
self,
|
|
47
|
+
service_account_id: StrictStr,
|
|
48
|
+
group_role_id: StrictStr,
|
|
49
|
+
user_id: StrictStr,
|
|
50
|
+
_request_timeout: Union[
|
|
51
|
+
None,
|
|
52
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
53
|
+
Tuple[
|
|
54
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
55
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
56
|
+
]
|
|
57
|
+
] = None,
|
|
58
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
59
|
+
_content_type: Optional[StrictStr] = None,
|
|
60
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
61
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
62
|
+
) -> AcrossServerRoutesV1UserServiceAccountSchemasServiceAccount:
|
|
63
|
+
"""Assign group role
|
|
64
|
+
|
|
65
|
+
Assign a group role to a service account.
|
|
66
|
+
|
|
67
|
+
:param service_account_id: (required)
|
|
68
|
+
:type service_account_id: str
|
|
69
|
+
:param group_role_id: (required)
|
|
70
|
+
:type group_role_id: str
|
|
71
|
+
:param user_id: (required)
|
|
72
|
+
:type user_id: str
|
|
73
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
74
|
+
number provided, it will be total request
|
|
75
|
+
timeout. It can also be a pair (tuple) of
|
|
76
|
+
(connection, read) timeouts.
|
|
77
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
78
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
79
|
+
request; this effectively ignores the
|
|
80
|
+
authentication in the spec for a single request.
|
|
81
|
+
:type _request_auth: dict, optional
|
|
82
|
+
:param _content_type: force content-type for the request.
|
|
83
|
+
:type _content_type: str, Optional
|
|
84
|
+
:param _headers: set to override the headers for a single
|
|
85
|
+
request; this effectively ignores the headers
|
|
86
|
+
in the spec for a single request.
|
|
87
|
+
:type _headers: dict, optional
|
|
88
|
+
:param _host_index: set to override the host_index for a single
|
|
89
|
+
request; this effectively ignores the host_index
|
|
90
|
+
in the spec for a single request.
|
|
91
|
+
:type _host_index: int, optional
|
|
92
|
+
:return: Returns the result object.
|
|
93
|
+
""" # noqa: E501
|
|
94
|
+
|
|
95
|
+
_param = self._assign_to_service_account_serialize(
|
|
96
|
+
service_account_id=service_account_id,
|
|
97
|
+
group_role_id=group_role_id,
|
|
98
|
+
user_id=user_id,
|
|
99
|
+
_request_auth=_request_auth,
|
|
100
|
+
_content_type=_content_type,
|
|
101
|
+
_headers=_headers,
|
|
102
|
+
_host_index=_host_index
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
106
|
+
'200': "AcrossServerRoutesV1UserServiceAccountSchemasServiceAccount",
|
|
107
|
+
'404': None,
|
|
108
|
+
'422': "HTTPValidationError",
|
|
109
|
+
}
|
|
110
|
+
response_data = self.api_client.call_api(
|
|
111
|
+
*_param,
|
|
112
|
+
_request_timeout=_request_timeout
|
|
113
|
+
)
|
|
114
|
+
response_data.read()
|
|
115
|
+
return self.api_client.response_deserialize(
|
|
116
|
+
response_data=response_data,
|
|
117
|
+
response_types_map=_response_types_map,
|
|
118
|
+
).data
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
@validate_call
|
|
122
|
+
def assign_to_service_account_with_http_info(
|
|
123
|
+
self,
|
|
124
|
+
service_account_id: StrictStr,
|
|
125
|
+
group_role_id: StrictStr,
|
|
126
|
+
user_id: StrictStr,
|
|
127
|
+
_request_timeout: Union[
|
|
128
|
+
None,
|
|
129
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
130
|
+
Tuple[
|
|
131
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
132
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
133
|
+
]
|
|
134
|
+
] = None,
|
|
135
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
136
|
+
_content_type: Optional[StrictStr] = None,
|
|
137
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
138
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
139
|
+
) -> ApiResponse[AcrossServerRoutesV1UserServiceAccountSchemasServiceAccount]:
|
|
140
|
+
"""Assign group role
|
|
141
|
+
|
|
142
|
+
Assign a group role to a service account.
|
|
143
|
+
|
|
144
|
+
:param service_account_id: (required)
|
|
145
|
+
:type service_account_id: str
|
|
146
|
+
:param group_role_id: (required)
|
|
147
|
+
:type group_role_id: str
|
|
148
|
+
:param user_id: (required)
|
|
149
|
+
:type user_id: str
|
|
150
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
151
|
+
number provided, it will be total request
|
|
152
|
+
timeout. It can also be a pair (tuple) of
|
|
153
|
+
(connection, read) timeouts.
|
|
154
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
155
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
156
|
+
request; this effectively ignores the
|
|
157
|
+
authentication in the spec for a single request.
|
|
158
|
+
:type _request_auth: dict, optional
|
|
159
|
+
:param _content_type: force content-type for the request.
|
|
160
|
+
:type _content_type: str, Optional
|
|
161
|
+
:param _headers: set to override the headers for a single
|
|
162
|
+
request; this effectively ignores the headers
|
|
163
|
+
in the spec for a single request.
|
|
164
|
+
:type _headers: dict, optional
|
|
165
|
+
:param _host_index: set to override the host_index for a single
|
|
166
|
+
request; this effectively ignores the host_index
|
|
167
|
+
in the spec for a single request.
|
|
168
|
+
:type _host_index: int, optional
|
|
169
|
+
:return: Returns the result object.
|
|
170
|
+
""" # noqa: E501
|
|
171
|
+
|
|
172
|
+
_param = self._assign_to_service_account_serialize(
|
|
173
|
+
service_account_id=service_account_id,
|
|
174
|
+
group_role_id=group_role_id,
|
|
175
|
+
user_id=user_id,
|
|
176
|
+
_request_auth=_request_auth,
|
|
177
|
+
_content_type=_content_type,
|
|
178
|
+
_headers=_headers,
|
|
179
|
+
_host_index=_host_index
|
|
180
|
+
)
|
|
181
|
+
|
|
182
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
183
|
+
'200': "AcrossServerRoutesV1UserServiceAccountSchemasServiceAccount",
|
|
184
|
+
'404': None,
|
|
185
|
+
'422': "HTTPValidationError",
|
|
186
|
+
}
|
|
187
|
+
response_data = self.api_client.call_api(
|
|
188
|
+
*_param,
|
|
189
|
+
_request_timeout=_request_timeout
|
|
190
|
+
)
|
|
191
|
+
response_data.read()
|
|
192
|
+
return self.api_client.response_deserialize(
|
|
193
|
+
response_data=response_data,
|
|
194
|
+
response_types_map=_response_types_map,
|
|
195
|
+
)
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
@validate_call
|
|
199
|
+
def assign_to_service_account_without_preload_content(
|
|
200
|
+
self,
|
|
201
|
+
service_account_id: StrictStr,
|
|
202
|
+
group_role_id: StrictStr,
|
|
203
|
+
user_id: StrictStr,
|
|
204
|
+
_request_timeout: Union[
|
|
205
|
+
None,
|
|
206
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
207
|
+
Tuple[
|
|
208
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
209
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
210
|
+
]
|
|
211
|
+
] = None,
|
|
212
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
213
|
+
_content_type: Optional[StrictStr] = None,
|
|
214
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
215
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
216
|
+
) -> RESTResponseType:
|
|
217
|
+
"""Assign group role
|
|
218
|
+
|
|
219
|
+
Assign a group role to a service account.
|
|
220
|
+
|
|
221
|
+
:param service_account_id: (required)
|
|
222
|
+
:type service_account_id: str
|
|
223
|
+
:param group_role_id: (required)
|
|
224
|
+
:type group_role_id: str
|
|
225
|
+
:param user_id: (required)
|
|
226
|
+
:type user_id: str
|
|
227
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
228
|
+
number provided, it will be total request
|
|
229
|
+
timeout. It can also be a pair (tuple) of
|
|
230
|
+
(connection, read) timeouts.
|
|
231
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
232
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
233
|
+
request; this effectively ignores the
|
|
234
|
+
authentication in the spec for a single request.
|
|
235
|
+
:type _request_auth: dict, optional
|
|
236
|
+
:param _content_type: force content-type for the request.
|
|
237
|
+
:type _content_type: str, Optional
|
|
238
|
+
:param _headers: set to override the headers for a single
|
|
239
|
+
request; this effectively ignores the headers
|
|
240
|
+
in the spec for a single request.
|
|
241
|
+
:type _headers: dict, optional
|
|
242
|
+
:param _host_index: set to override the host_index for a single
|
|
243
|
+
request; this effectively ignores the host_index
|
|
244
|
+
in the spec for a single request.
|
|
245
|
+
:type _host_index: int, optional
|
|
246
|
+
:return: Returns the result object.
|
|
247
|
+
""" # noqa: E501
|
|
248
|
+
|
|
249
|
+
_param = self._assign_to_service_account_serialize(
|
|
250
|
+
service_account_id=service_account_id,
|
|
251
|
+
group_role_id=group_role_id,
|
|
252
|
+
user_id=user_id,
|
|
253
|
+
_request_auth=_request_auth,
|
|
254
|
+
_content_type=_content_type,
|
|
255
|
+
_headers=_headers,
|
|
256
|
+
_host_index=_host_index
|
|
257
|
+
)
|
|
258
|
+
|
|
259
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
260
|
+
'200': "AcrossServerRoutesV1UserServiceAccountSchemasServiceAccount",
|
|
261
|
+
'404': None,
|
|
262
|
+
'422': "HTTPValidationError",
|
|
263
|
+
}
|
|
264
|
+
response_data = self.api_client.call_api(
|
|
265
|
+
*_param,
|
|
266
|
+
_request_timeout=_request_timeout
|
|
267
|
+
)
|
|
268
|
+
return response_data.response
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
def _assign_to_service_account_serialize(
|
|
272
|
+
self,
|
|
273
|
+
service_account_id,
|
|
274
|
+
group_role_id,
|
|
275
|
+
user_id,
|
|
276
|
+
_request_auth,
|
|
277
|
+
_content_type,
|
|
278
|
+
_headers,
|
|
279
|
+
_host_index,
|
|
280
|
+
) -> RequestSerialized:
|
|
281
|
+
|
|
282
|
+
_host = None
|
|
283
|
+
|
|
284
|
+
_collection_formats: Dict[str, str] = {
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
_path_params: Dict[str, str] = {}
|
|
288
|
+
_query_params: List[Tuple[str, str]] = []
|
|
289
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
290
|
+
_form_params: List[Tuple[str, str]] = []
|
|
291
|
+
_files: Dict[
|
|
292
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
293
|
+
] = {}
|
|
294
|
+
_body_params: Optional[bytes] = None
|
|
295
|
+
|
|
296
|
+
# process the path parameters
|
|
297
|
+
if service_account_id is not None:
|
|
298
|
+
_path_params['service_account_id'] = service_account_id
|
|
299
|
+
if group_role_id is not None:
|
|
300
|
+
_path_params['group_role_id'] = group_role_id
|
|
301
|
+
if user_id is not None:
|
|
302
|
+
_path_params['user_id'] = user_id
|
|
303
|
+
# process the query parameters
|
|
304
|
+
# process the header parameters
|
|
305
|
+
# process the form parameters
|
|
306
|
+
# process the body parameter
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
# set the HTTP header `Accept`
|
|
310
|
+
if 'Accept' not in _header_params:
|
|
311
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
312
|
+
[
|
|
313
|
+
'application/json'
|
|
314
|
+
]
|
|
315
|
+
)
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
# authentication setting
|
|
319
|
+
_auth_settings: List[str] = [
|
|
320
|
+
'Authorization'
|
|
321
|
+
]
|
|
322
|
+
|
|
323
|
+
return self.api_client.param_serialize(
|
|
324
|
+
method='POST',
|
|
325
|
+
resource_path='/user/{user_id}/service-account/{service_account_id}/group-role/{group_role_id}',
|
|
326
|
+
path_params=_path_params,
|
|
327
|
+
query_params=_query_params,
|
|
328
|
+
header_params=_header_params,
|
|
329
|
+
body=_body_params,
|
|
330
|
+
post_params=_form_params,
|
|
331
|
+
files=_files,
|
|
332
|
+
auth_settings=_auth_settings,
|
|
333
|
+
collection_formats=_collection_formats,
|
|
334
|
+
_host=_host,
|
|
335
|
+
_request_auth=_request_auth
|
|
336
|
+
)
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
@validate_call
|
|
342
|
+
def create_user_service_account(
|
|
343
|
+
self,
|
|
344
|
+
user_id: StrictStr,
|
|
345
|
+
service_account_create: ServiceAccountCreate,
|
|
346
|
+
_request_timeout: Union[
|
|
347
|
+
None,
|
|
348
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
349
|
+
Tuple[
|
|
350
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
351
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
352
|
+
]
|
|
353
|
+
] = None,
|
|
354
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
355
|
+
_content_type: Optional[StrictStr] = None,
|
|
356
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
357
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
358
|
+
) -> ServiceAccountSecret:
|
|
359
|
+
"""Create a service account
|
|
360
|
+
|
|
361
|
+
Create a new service account for an ACROSS user.
|
|
362
|
+
|
|
363
|
+
:param user_id: (required)
|
|
364
|
+
:type user_id: str
|
|
365
|
+
:param service_account_create: (required)
|
|
366
|
+
:type service_account_create: ServiceAccountCreate
|
|
367
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
368
|
+
number provided, it will be total request
|
|
369
|
+
timeout. It can also be a pair (tuple) of
|
|
370
|
+
(connection, read) timeouts.
|
|
371
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
372
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
373
|
+
request; this effectively ignores the
|
|
374
|
+
authentication in the spec for a single request.
|
|
375
|
+
:type _request_auth: dict, optional
|
|
376
|
+
:param _content_type: force content-type for the request.
|
|
377
|
+
:type _content_type: str, Optional
|
|
378
|
+
:param _headers: set to override the headers for a single
|
|
379
|
+
request; this effectively ignores the headers
|
|
380
|
+
in the spec for a single request.
|
|
381
|
+
:type _headers: dict, optional
|
|
382
|
+
:param _host_index: set to override the host_index for a single
|
|
383
|
+
request; this effectively ignores the host_index
|
|
384
|
+
in the spec for a single request.
|
|
385
|
+
:type _host_index: int, optional
|
|
386
|
+
:return: Returns the result object.
|
|
387
|
+
""" # noqa: E501
|
|
388
|
+
|
|
389
|
+
_param = self._create_user_service_account_serialize(
|
|
390
|
+
user_id=user_id,
|
|
391
|
+
service_account_create=service_account_create,
|
|
392
|
+
_request_auth=_request_auth,
|
|
393
|
+
_content_type=_content_type,
|
|
394
|
+
_headers=_headers,
|
|
395
|
+
_host_index=_host_index
|
|
396
|
+
)
|
|
397
|
+
|
|
398
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
399
|
+
'201': "ServiceAccountSecret",
|
|
400
|
+
'404': None,
|
|
401
|
+
'422': "HTTPValidationError",
|
|
402
|
+
}
|
|
403
|
+
response_data = self.api_client.call_api(
|
|
404
|
+
*_param,
|
|
405
|
+
_request_timeout=_request_timeout
|
|
406
|
+
)
|
|
407
|
+
response_data.read()
|
|
408
|
+
return self.api_client.response_deserialize(
|
|
409
|
+
response_data=response_data,
|
|
410
|
+
response_types_map=_response_types_map,
|
|
411
|
+
).data
|
|
412
|
+
|
|
413
|
+
|
|
414
|
+
@validate_call
|
|
415
|
+
def create_user_service_account_with_http_info(
|
|
416
|
+
self,
|
|
417
|
+
user_id: StrictStr,
|
|
418
|
+
service_account_create: ServiceAccountCreate,
|
|
419
|
+
_request_timeout: Union[
|
|
420
|
+
None,
|
|
421
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
422
|
+
Tuple[
|
|
423
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
424
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
425
|
+
]
|
|
426
|
+
] = None,
|
|
427
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
428
|
+
_content_type: Optional[StrictStr] = None,
|
|
429
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
430
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
431
|
+
) -> ApiResponse[ServiceAccountSecret]:
|
|
432
|
+
"""Create a service account
|
|
433
|
+
|
|
434
|
+
Create a new service account for an ACROSS user.
|
|
435
|
+
|
|
436
|
+
:param user_id: (required)
|
|
437
|
+
:type user_id: str
|
|
438
|
+
:param service_account_create: (required)
|
|
439
|
+
:type service_account_create: ServiceAccountCreate
|
|
440
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
441
|
+
number provided, it will be total request
|
|
442
|
+
timeout. It can also be a pair (tuple) of
|
|
443
|
+
(connection, read) timeouts.
|
|
444
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
445
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
446
|
+
request; this effectively ignores the
|
|
447
|
+
authentication in the spec for a single request.
|
|
448
|
+
:type _request_auth: dict, optional
|
|
449
|
+
:param _content_type: force content-type for the request.
|
|
450
|
+
:type _content_type: str, Optional
|
|
451
|
+
:param _headers: set to override the headers for a single
|
|
452
|
+
request; this effectively ignores the headers
|
|
453
|
+
in the spec for a single request.
|
|
454
|
+
:type _headers: dict, optional
|
|
455
|
+
:param _host_index: set to override the host_index for a single
|
|
456
|
+
request; this effectively ignores the host_index
|
|
457
|
+
in the spec for a single request.
|
|
458
|
+
:type _host_index: int, optional
|
|
459
|
+
:return: Returns the result object.
|
|
460
|
+
""" # noqa: E501
|
|
461
|
+
|
|
462
|
+
_param = self._create_user_service_account_serialize(
|
|
463
|
+
user_id=user_id,
|
|
464
|
+
service_account_create=service_account_create,
|
|
465
|
+
_request_auth=_request_auth,
|
|
466
|
+
_content_type=_content_type,
|
|
467
|
+
_headers=_headers,
|
|
468
|
+
_host_index=_host_index
|
|
469
|
+
)
|
|
470
|
+
|
|
471
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
472
|
+
'201': "ServiceAccountSecret",
|
|
473
|
+
'404': None,
|
|
474
|
+
'422': "HTTPValidationError",
|
|
475
|
+
}
|
|
476
|
+
response_data = self.api_client.call_api(
|
|
477
|
+
*_param,
|
|
478
|
+
_request_timeout=_request_timeout
|
|
479
|
+
)
|
|
480
|
+
response_data.read()
|
|
481
|
+
return self.api_client.response_deserialize(
|
|
482
|
+
response_data=response_data,
|
|
483
|
+
response_types_map=_response_types_map,
|
|
484
|
+
)
|
|
485
|
+
|
|
486
|
+
|
|
487
|
+
@validate_call
|
|
488
|
+
def create_user_service_account_without_preload_content(
|
|
489
|
+
self,
|
|
490
|
+
user_id: StrictStr,
|
|
491
|
+
service_account_create: ServiceAccountCreate,
|
|
492
|
+
_request_timeout: Union[
|
|
493
|
+
None,
|
|
494
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
495
|
+
Tuple[
|
|
496
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
497
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
498
|
+
]
|
|
499
|
+
] = None,
|
|
500
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
501
|
+
_content_type: Optional[StrictStr] = None,
|
|
502
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
503
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
504
|
+
) -> RESTResponseType:
|
|
505
|
+
"""Create a service account
|
|
506
|
+
|
|
507
|
+
Create a new service account for an ACROSS user.
|
|
508
|
+
|
|
509
|
+
:param user_id: (required)
|
|
510
|
+
:type user_id: str
|
|
511
|
+
:param service_account_create: (required)
|
|
512
|
+
:type service_account_create: ServiceAccountCreate
|
|
513
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
514
|
+
number provided, it will be total request
|
|
515
|
+
timeout. It can also be a pair (tuple) of
|
|
516
|
+
(connection, read) timeouts.
|
|
517
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
518
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
519
|
+
request; this effectively ignores the
|
|
520
|
+
authentication in the spec for a single request.
|
|
521
|
+
:type _request_auth: dict, optional
|
|
522
|
+
:param _content_type: force content-type for the request.
|
|
523
|
+
:type _content_type: str, Optional
|
|
524
|
+
:param _headers: set to override the headers for a single
|
|
525
|
+
request; this effectively ignores the headers
|
|
526
|
+
in the spec for a single request.
|
|
527
|
+
:type _headers: dict, optional
|
|
528
|
+
:param _host_index: set to override the host_index for a single
|
|
529
|
+
request; this effectively ignores the host_index
|
|
530
|
+
in the spec for a single request.
|
|
531
|
+
:type _host_index: int, optional
|
|
532
|
+
:return: Returns the result object.
|
|
533
|
+
""" # noqa: E501
|
|
534
|
+
|
|
535
|
+
_param = self._create_user_service_account_serialize(
|
|
536
|
+
user_id=user_id,
|
|
537
|
+
service_account_create=service_account_create,
|
|
538
|
+
_request_auth=_request_auth,
|
|
539
|
+
_content_type=_content_type,
|
|
540
|
+
_headers=_headers,
|
|
541
|
+
_host_index=_host_index
|
|
542
|
+
)
|
|
543
|
+
|
|
544
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
545
|
+
'201': "ServiceAccountSecret",
|
|
546
|
+
'404': None,
|
|
547
|
+
'422': "HTTPValidationError",
|
|
548
|
+
}
|
|
549
|
+
response_data = self.api_client.call_api(
|
|
550
|
+
*_param,
|
|
551
|
+
_request_timeout=_request_timeout
|
|
552
|
+
)
|
|
553
|
+
return response_data.response
|
|
554
|
+
|
|
555
|
+
|
|
556
|
+
def _create_user_service_account_serialize(
|
|
557
|
+
self,
|
|
558
|
+
user_id,
|
|
559
|
+
service_account_create,
|
|
560
|
+
_request_auth,
|
|
561
|
+
_content_type,
|
|
562
|
+
_headers,
|
|
563
|
+
_host_index,
|
|
564
|
+
) -> RequestSerialized:
|
|
565
|
+
|
|
566
|
+
_host = None
|
|
567
|
+
|
|
568
|
+
_collection_formats: Dict[str, str] = {
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
_path_params: Dict[str, str] = {}
|
|
572
|
+
_query_params: List[Tuple[str, str]] = []
|
|
573
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
574
|
+
_form_params: List[Tuple[str, str]] = []
|
|
575
|
+
_files: Dict[
|
|
576
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
577
|
+
] = {}
|
|
578
|
+
_body_params: Optional[bytes] = None
|
|
579
|
+
|
|
580
|
+
# process the path parameters
|
|
581
|
+
if user_id is not None:
|
|
582
|
+
_path_params['user_id'] = user_id
|
|
583
|
+
# process the query parameters
|
|
584
|
+
# process the header parameters
|
|
585
|
+
# process the form parameters
|
|
586
|
+
# process the body parameter
|
|
587
|
+
if service_account_create is not None:
|
|
588
|
+
_body_params = service_account_create
|
|
589
|
+
|
|
590
|
+
|
|
591
|
+
# set the HTTP header `Accept`
|
|
592
|
+
if 'Accept' not in _header_params:
|
|
593
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
594
|
+
[
|
|
595
|
+
'application/json'
|
|
596
|
+
]
|
|
597
|
+
)
|
|
598
|
+
|
|
599
|
+
# set the HTTP header `Content-Type`
|
|
600
|
+
if _content_type:
|
|
601
|
+
_header_params['Content-Type'] = _content_type
|
|
602
|
+
else:
|
|
603
|
+
_default_content_type = (
|
|
604
|
+
self.api_client.select_header_content_type(
|
|
605
|
+
[
|
|
606
|
+
'application/json'
|
|
607
|
+
]
|
|
608
|
+
)
|
|
609
|
+
)
|
|
610
|
+
if _default_content_type is not None:
|
|
611
|
+
_header_params['Content-Type'] = _default_content_type
|
|
612
|
+
|
|
613
|
+
# authentication setting
|
|
614
|
+
_auth_settings: List[str] = [
|
|
615
|
+
'Authorization'
|
|
616
|
+
]
|
|
617
|
+
|
|
618
|
+
return self.api_client.param_serialize(
|
|
619
|
+
method='POST',
|
|
620
|
+
resource_path='/user/{user_id}/service_account/',
|
|
621
|
+
path_params=_path_params,
|
|
622
|
+
query_params=_query_params,
|
|
623
|
+
header_params=_header_params,
|
|
624
|
+
body=_body_params,
|
|
625
|
+
post_params=_form_params,
|
|
626
|
+
files=_files,
|
|
627
|
+
auth_settings=_auth_settings,
|
|
628
|
+
collection_formats=_collection_formats,
|
|
629
|
+
_host=_host,
|
|
630
|
+
_request_auth=_request_auth
|
|
631
|
+
)
|
|
632
|
+
|
|
633
|
+
|
|
634
|
+
|
|
635
|
+
|
|
636
|
+
@validate_call
|
|
637
|
+
def delete_user_service_account(
|
|
638
|
+
self,
|
|
639
|
+
service_account_id: StrictStr,
|
|
640
|
+
user_id: StrictStr,
|
|
641
|
+
_request_timeout: Union[
|
|
642
|
+
None,
|
|
643
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
644
|
+
Tuple[
|
|
645
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
646
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
647
|
+
]
|
|
648
|
+
] = None,
|
|
649
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
650
|
+
_content_type: Optional[StrictStr] = None,
|
|
651
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
652
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
653
|
+
) -> None:
|
|
654
|
+
"""Delete a service_account
|
|
655
|
+
|
|
656
|
+
Expire a service account, the account will still exist for log/record purposes, but it will not be usable anymore.
|
|
657
|
+
|
|
658
|
+
:param service_account_id: (required)
|
|
659
|
+
:type service_account_id: str
|
|
660
|
+
:param user_id: (required)
|
|
661
|
+
:type user_id: str
|
|
662
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
663
|
+
number provided, it will be total request
|
|
664
|
+
timeout. It can also be a pair (tuple) of
|
|
665
|
+
(connection, read) timeouts.
|
|
666
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
667
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
668
|
+
request; this effectively ignores the
|
|
669
|
+
authentication in the spec for a single request.
|
|
670
|
+
:type _request_auth: dict, optional
|
|
671
|
+
:param _content_type: force content-type for the request.
|
|
672
|
+
:type _content_type: str, Optional
|
|
673
|
+
:param _headers: set to override the headers for a single
|
|
674
|
+
request; this effectively ignores the headers
|
|
675
|
+
in the spec for a single request.
|
|
676
|
+
:type _headers: dict, optional
|
|
677
|
+
:param _host_index: set to override the host_index for a single
|
|
678
|
+
request; this effectively ignores the host_index
|
|
679
|
+
in the spec for a single request.
|
|
680
|
+
:type _host_index: int, optional
|
|
681
|
+
:return: Returns the result object.
|
|
682
|
+
""" # noqa: E501
|
|
683
|
+
|
|
684
|
+
_param = self._delete_user_service_account_serialize(
|
|
685
|
+
service_account_id=service_account_id,
|
|
686
|
+
user_id=user_id,
|
|
687
|
+
_request_auth=_request_auth,
|
|
688
|
+
_content_type=_content_type,
|
|
689
|
+
_headers=_headers,
|
|
690
|
+
_host_index=_host_index
|
|
691
|
+
)
|
|
692
|
+
|
|
693
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
694
|
+
'204': None,
|
|
695
|
+
'404': None,
|
|
696
|
+
'422': "HTTPValidationError",
|
|
697
|
+
}
|
|
698
|
+
response_data = self.api_client.call_api(
|
|
699
|
+
*_param,
|
|
700
|
+
_request_timeout=_request_timeout
|
|
701
|
+
)
|
|
702
|
+
response_data.read()
|
|
703
|
+
return self.api_client.response_deserialize(
|
|
704
|
+
response_data=response_data,
|
|
705
|
+
response_types_map=_response_types_map,
|
|
706
|
+
).data
|
|
707
|
+
|
|
708
|
+
|
|
709
|
+
@validate_call
|
|
710
|
+
def delete_user_service_account_with_http_info(
|
|
711
|
+
self,
|
|
712
|
+
service_account_id: StrictStr,
|
|
713
|
+
user_id: StrictStr,
|
|
714
|
+
_request_timeout: Union[
|
|
715
|
+
None,
|
|
716
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
717
|
+
Tuple[
|
|
718
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
719
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
720
|
+
]
|
|
721
|
+
] = None,
|
|
722
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
723
|
+
_content_type: Optional[StrictStr] = None,
|
|
724
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
725
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
726
|
+
) -> ApiResponse[None]:
|
|
727
|
+
"""Delete a service_account
|
|
728
|
+
|
|
729
|
+
Expire a service account, the account will still exist for log/record purposes, but it will not be usable anymore.
|
|
730
|
+
|
|
731
|
+
:param service_account_id: (required)
|
|
732
|
+
:type service_account_id: str
|
|
733
|
+
:param user_id: (required)
|
|
734
|
+
:type user_id: str
|
|
735
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
736
|
+
number provided, it will be total request
|
|
737
|
+
timeout. It can also be a pair (tuple) of
|
|
738
|
+
(connection, read) timeouts.
|
|
739
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
740
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
741
|
+
request; this effectively ignores the
|
|
742
|
+
authentication in the spec for a single request.
|
|
743
|
+
:type _request_auth: dict, optional
|
|
744
|
+
:param _content_type: force content-type for the request.
|
|
745
|
+
:type _content_type: str, Optional
|
|
746
|
+
:param _headers: set to override the headers for a single
|
|
747
|
+
request; this effectively ignores the headers
|
|
748
|
+
in the spec for a single request.
|
|
749
|
+
:type _headers: dict, optional
|
|
750
|
+
:param _host_index: set to override the host_index for a single
|
|
751
|
+
request; this effectively ignores the host_index
|
|
752
|
+
in the spec for a single request.
|
|
753
|
+
:type _host_index: int, optional
|
|
754
|
+
:return: Returns the result object.
|
|
755
|
+
""" # noqa: E501
|
|
756
|
+
|
|
757
|
+
_param = self._delete_user_service_account_serialize(
|
|
758
|
+
service_account_id=service_account_id,
|
|
759
|
+
user_id=user_id,
|
|
760
|
+
_request_auth=_request_auth,
|
|
761
|
+
_content_type=_content_type,
|
|
762
|
+
_headers=_headers,
|
|
763
|
+
_host_index=_host_index
|
|
764
|
+
)
|
|
765
|
+
|
|
766
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
767
|
+
'204': None,
|
|
768
|
+
'404': None,
|
|
769
|
+
'422': "HTTPValidationError",
|
|
770
|
+
}
|
|
771
|
+
response_data = self.api_client.call_api(
|
|
772
|
+
*_param,
|
|
773
|
+
_request_timeout=_request_timeout
|
|
774
|
+
)
|
|
775
|
+
response_data.read()
|
|
776
|
+
return self.api_client.response_deserialize(
|
|
777
|
+
response_data=response_data,
|
|
778
|
+
response_types_map=_response_types_map,
|
|
779
|
+
)
|
|
780
|
+
|
|
781
|
+
|
|
782
|
+
@validate_call
|
|
783
|
+
def delete_user_service_account_without_preload_content(
|
|
784
|
+
self,
|
|
785
|
+
service_account_id: StrictStr,
|
|
786
|
+
user_id: StrictStr,
|
|
787
|
+
_request_timeout: Union[
|
|
788
|
+
None,
|
|
789
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
790
|
+
Tuple[
|
|
791
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
792
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
793
|
+
]
|
|
794
|
+
] = None,
|
|
795
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
796
|
+
_content_type: Optional[StrictStr] = None,
|
|
797
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
798
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
799
|
+
) -> RESTResponseType:
|
|
800
|
+
"""Delete a service_account
|
|
801
|
+
|
|
802
|
+
Expire a service account, the account will still exist for log/record purposes, but it will not be usable anymore.
|
|
803
|
+
|
|
804
|
+
:param service_account_id: (required)
|
|
805
|
+
:type service_account_id: str
|
|
806
|
+
:param user_id: (required)
|
|
807
|
+
:type user_id: str
|
|
808
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
809
|
+
number provided, it will be total request
|
|
810
|
+
timeout. It can also be a pair (tuple) of
|
|
811
|
+
(connection, read) timeouts.
|
|
812
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
813
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
814
|
+
request; this effectively ignores the
|
|
815
|
+
authentication in the spec for a single request.
|
|
816
|
+
:type _request_auth: dict, optional
|
|
817
|
+
:param _content_type: force content-type for the request.
|
|
818
|
+
:type _content_type: str, Optional
|
|
819
|
+
:param _headers: set to override the headers for a single
|
|
820
|
+
request; this effectively ignores the headers
|
|
821
|
+
in the spec for a single request.
|
|
822
|
+
:type _headers: dict, optional
|
|
823
|
+
:param _host_index: set to override the host_index for a single
|
|
824
|
+
request; this effectively ignores the host_index
|
|
825
|
+
in the spec for a single request.
|
|
826
|
+
:type _host_index: int, optional
|
|
827
|
+
:return: Returns the result object.
|
|
828
|
+
""" # noqa: E501
|
|
829
|
+
|
|
830
|
+
_param = self._delete_user_service_account_serialize(
|
|
831
|
+
service_account_id=service_account_id,
|
|
832
|
+
user_id=user_id,
|
|
833
|
+
_request_auth=_request_auth,
|
|
834
|
+
_content_type=_content_type,
|
|
835
|
+
_headers=_headers,
|
|
836
|
+
_host_index=_host_index
|
|
837
|
+
)
|
|
838
|
+
|
|
839
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
840
|
+
'204': None,
|
|
841
|
+
'404': None,
|
|
842
|
+
'422': "HTTPValidationError",
|
|
843
|
+
}
|
|
844
|
+
response_data = self.api_client.call_api(
|
|
845
|
+
*_param,
|
|
846
|
+
_request_timeout=_request_timeout
|
|
847
|
+
)
|
|
848
|
+
return response_data.response
|
|
849
|
+
|
|
850
|
+
|
|
851
|
+
def _delete_user_service_account_serialize(
|
|
852
|
+
self,
|
|
853
|
+
service_account_id,
|
|
854
|
+
user_id,
|
|
855
|
+
_request_auth,
|
|
856
|
+
_content_type,
|
|
857
|
+
_headers,
|
|
858
|
+
_host_index,
|
|
859
|
+
) -> RequestSerialized:
|
|
860
|
+
|
|
861
|
+
_host = None
|
|
862
|
+
|
|
863
|
+
_collection_formats: Dict[str, str] = {
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
_path_params: Dict[str, str] = {}
|
|
867
|
+
_query_params: List[Tuple[str, str]] = []
|
|
868
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
869
|
+
_form_params: List[Tuple[str, str]] = []
|
|
870
|
+
_files: Dict[
|
|
871
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
872
|
+
] = {}
|
|
873
|
+
_body_params: Optional[bytes] = None
|
|
874
|
+
|
|
875
|
+
# process the path parameters
|
|
876
|
+
if service_account_id is not None:
|
|
877
|
+
_path_params['service_account_id'] = service_account_id
|
|
878
|
+
if user_id is not None:
|
|
879
|
+
_path_params['user_id'] = user_id
|
|
880
|
+
# process the query parameters
|
|
881
|
+
# process the header parameters
|
|
882
|
+
# process the form parameters
|
|
883
|
+
# process the body parameter
|
|
884
|
+
|
|
885
|
+
|
|
886
|
+
# set the HTTP header `Accept`
|
|
887
|
+
if 'Accept' not in _header_params:
|
|
888
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
889
|
+
[
|
|
890
|
+
'application/json'
|
|
891
|
+
]
|
|
892
|
+
)
|
|
893
|
+
|
|
894
|
+
|
|
895
|
+
# authentication setting
|
|
896
|
+
_auth_settings: List[str] = [
|
|
897
|
+
'Authorization'
|
|
898
|
+
]
|
|
899
|
+
|
|
900
|
+
return self.api_client.param_serialize(
|
|
901
|
+
method='DELETE',
|
|
902
|
+
resource_path='/user/{user_id}/service_account/{service_account_id}',
|
|
903
|
+
path_params=_path_params,
|
|
904
|
+
query_params=_query_params,
|
|
905
|
+
header_params=_header_params,
|
|
906
|
+
body=_body_params,
|
|
907
|
+
post_params=_form_params,
|
|
908
|
+
files=_files,
|
|
909
|
+
auth_settings=_auth_settings,
|
|
910
|
+
collection_formats=_collection_formats,
|
|
911
|
+
_host=_host,
|
|
912
|
+
_request_auth=_request_auth
|
|
913
|
+
)
|
|
914
|
+
|
|
915
|
+
|
|
916
|
+
|
|
917
|
+
|
|
918
|
+
@validate_call
|
|
919
|
+
def get_service_accounts(
|
|
920
|
+
self,
|
|
921
|
+
user_id: StrictStr,
|
|
922
|
+
_request_timeout: Union[
|
|
923
|
+
None,
|
|
924
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
925
|
+
Tuple[
|
|
926
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
927
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
928
|
+
]
|
|
929
|
+
] = None,
|
|
930
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
931
|
+
_content_type: Optional[StrictStr] = None,
|
|
932
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
933
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
934
|
+
) -> List[AcrossServerRoutesV1UserServiceAccountSchemasServiceAccount]:
|
|
935
|
+
"""Read service accounts
|
|
936
|
+
|
|
937
|
+
Read many service accounts
|
|
938
|
+
|
|
939
|
+
:param user_id: (required)
|
|
940
|
+
:type user_id: str
|
|
941
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
942
|
+
number provided, it will be total request
|
|
943
|
+
timeout. It can also be a pair (tuple) of
|
|
944
|
+
(connection, read) timeouts.
|
|
945
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
946
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
947
|
+
request; this effectively ignores the
|
|
948
|
+
authentication in the spec for a single request.
|
|
949
|
+
:type _request_auth: dict, optional
|
|
950
|
+
:param _content_type: force content-type for the request.
|
|
951
|
+
:type _content_type: str, Optional
|
|
952
|
+
:param _headers: set to override the headers for a single
|
|
953
|
+
request; this effectively ignores the headers
|
|
954
|
+
in the spec for a single request.
|
|
955
|
+
:type _headers: dict, optional
|
|
956
|
+
:param _host_index: set to override the host_index for a single
|
|
957
|
+
request; this effectively ignores the host_index
|
|
958
|
+
in the spec for a single request.
|
|
959
|
+
:type _host_index: int, optional
|
|
960
|
+
:return: Returns the result object.
|
|
961
|
+
""" # noqa: E501
|
|
962
|
+
|
|
963
|
+
_param = self._get_service_accounts_serialize(
|
|
964
|
+
user_id=user_id,
|
|
965
|
+
_request_auth=_request_auth,
|
|
966
|
+
_content_type=_content_type,
|
|
967
|
+
_headers=_headers,
|
|
968
|
+
_host_index=_host_index
|
|
969
|
+
)
|
|
970
|
+
|
|
971
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
972
|
+
'200': "List[AcrossServerRoutesV1UserServiceAccountSchemasServiceAccount]",
|
|
973
|
+
'404': None,
|
|
974
|
+
'422': "HTTPValidationError",
|
|
975
|
+
}
|
|
976
|
+
response_data = self.api_client.call_api(
|
|
977
|
+
*_param,
|
|
978
|
+
_request_timeout=_request_timeout
|
|
979
|
+
)
|
|
980
|
+
response_data.read()
|
|
981
|
+
return self.api_client.response_deserialize(
|
|
982
|
+
response_data=response_data,
|
|
983
|
+
response_types_map=_response_types_map,
|
|
984
|
+
).data
|
|
985
|
+
|
|
986
|
+
|
|
987
|
+
@validate_call
|
|
988
|
+
def get_service_accounts_with_http_info(
|
|
989
|
+
self,
|
|
990
|
+
user_id: StrictStr,
|
|
991
|
+
_request_timeout: Union[
|
|
992
|
+
None,
|
|
993
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
994
|
+
Tuple[
|
|
995
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
996
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
997
|
+
]
|
|
998
|
+
] = None,
|
|
999
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1000
|
+
_content_type: Optional[StrictStr] = None,
|
|
1001
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1002
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1003
|
+
) -> ApiResponse[List[AcrossServerRoutesV1UserServiceAccountSchemasServiceAccount]]:
|
|
1004
|
+
"""Read service accounts
|
|
1005
|
+
|
|
1006
|
+
Read many service accounts
|
|
1007
|
+
|
|
1008
|
+
:param user_id: (required)
|
|
1009
|
+
:type user_id: str
|
|
1010
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1011
|
+
number provided, it will be total request
|
|
1012
|
+
timeout. It can also be a pair (tuple) of
|
|
1013
|
+
(connection, read) timeouts.
|
|
1014
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1015
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1016
|
+
request; this effectively ignores the
|
|
1017
|
+
authentication in the spec for a single request.
|
|
1018
|
+
:type _request_auth: dict, optional
|
|
1019
|
+
:param _content_type: force content-type for the request.
|
|
1020
|
+
:type _content_type: str, Optional
|
|
1021
|
+
:param _headers: set to override the headers for a single
|
|
1022
|
+
request; this effectively ignores the headers
|
|
1023
|
+
in the spec for a single request.
|
|
1024
|
+
:type _headers: dict, optional
|
|
1025
|
+
:param _host_index: set to override the host_index for a single
|
|
1026
|
+
request; this effectively ignores the host_index
|
|
1027
|
+
in the spec for a single request.
|
|
1028
|
+
:type _host_index: int, optional
|
|
1029
|
+
:return: Returns the result object.
|
|
1030
|
+
""" # noqa: E501
|
|
1031
|
+
|
|
1032
|
+
_param = self._get_service_accounts_serialize(
|
|
1033
|
+
user_id=user_id,
|
|
1034
|
+
_request_auth=_request_auth,
|
|
1035
|
+
_content_type=_content_type,
|
|
1036
|
+
_headers=_headers,
|
|
1037
|
+
_host_index=_host_index
|
|
1038
|
+
)
|
|
1039
|
+
|
|
1040
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1041
|
+
'200': "List[AcrossServerRoutesV1UserServiceAccountSchemasServiceAccount]",
|
|
1042
|
+
'404': None,
|
|
1043
|
+
'422': "HTTPValidationError",
|
|
1044
|
+
}
|
|
1045
|
+
response_data = self.api_client.call_api(
|
|
1046
|
+
*_param,
|
|
1047
|
+
_request_timeout=_request_timeout
|
|
1048
|
+
)
|
|
1049
|
+
response_data.read()
|
|
1050
|
+
return self.api_client.response_deserialize(
|
|
1051
|
+
response_data=response_data,
|
|
1052
|
+
response_types_map=_response_types_map,
|
|
1053
|
+
)
|
|
1054
|
+
|
|
1055
|
+
|
|
1056
|
+
@validate_call
|
|
1057
|
+
def get_service_accounts_without_preload_content(
|
|
1058
|
+
self,
|
|
1059
|
+
user_id: StrictStr,
|
|
1060
|
+
_request_timeout: Union[
|
|
1061
|
+
None,
|
|
1062
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1063
|
+
Tuple[
|
|
1064
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1065
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1066
|
+
]
|
|
1067
|
+
] = None,
|
|
1068
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1069
|
+
_content_type: Optional[StrictStr] = None,
|
|
1070
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1071
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1072
|
+
) -> RESTResponseType:
|
|
1073
|
+
"""Read service accounts
|
|
1074
|
+
|
|
1075
|
+
Read many service accounts
|
|
1076
|
+
|
|
1077
|
+
:param user_id: (required)
|
|
1078
|
+
:type user_id: str
|
|
1079
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1080
|
+
number provided, it will be total request
|
|
1081
|
+
timeout. It can also be a pair (tuple) of
|
|
1082
|
+
(connection, read) timeouts.
|
|
1083
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1084
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1085
|
+
request; this effectively ignores the
|
|
1086
|
+
authentication in the spec for a single request.
|
|
1087
|
+
:type _request_auth: dict, optional
|
|
1088
|
+
:param _content_type: force content-type for the request.
|
|
1089
|
+
:type _content_type: str, Optional
|
|
1090
|
+
:param _headers: set to override the headers for a single
|
|
1091
|
+
request; this effectively ignores the headers
|
|
1092
|
+
in the spec for a single request.
|
|
1093
|
+
:type _headers: dict, optional
|
|
1094
|
+
:param _host_index: set to override the host_index for a single
|
|
1095
|
+
request; this effectively ignores the host_index
|
|
1096
|
+
in the spec for a single request.
|
|
1097
|
+
:type _host_index: int, optional
|
|
1098
|
+
:return: Returns the result object.
|
|
1099
|
+
""" # noqa: E501
|
|
1100
|
+
|
|
1101
|
+
_param = self._get_service_accounts_serialize(
|
|
1102
|
+
user_id=user_id,
|
|
1103
|
+
_request_auth=_request_auth,
|
|
1104
|
+
_content_type=_content_type,
|
|
1105
|
+
_headers=_headers,
|
|
1106
|
+
_host_index=_host_index
|
|
1107
|
+
)
|
|
1108
|
+
|
|
1109
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1110
|
+
'200': "List[AcrossServerRoutesV1UserServiceAccountSchemasServiceAccount]",
|
|
1111
|
+
'404': None,
|
|
1112
|
+
'422': "HTTPValidationError",
|
|
1113
|
+
}
|
|
1114
|
+
response_data = self.api_client.call_api(
|
|
1115
|
+
*_param,
|
|
1116
|
+
_request_timeout=_request_timeout
|
|
1117
|
+
)
|
|
1118
|
+
return response_data.response
|
|
1119
|
+
|
|
1120
|
+
|
|
1121
|
+
def _get_service_accounts_serialize(
|
|
1122
|
+
self,
|
|
1123
|
+
user_id,
|
|
1124
|
+
_request_auth,
|
|
1125
|
+
_content_type,
|
|
1126
|
+
_headers,
|
|
1127
|
+
_host_index,
|
|
1128
|
+
) -> RequestSerialized:
|
|
1129
|
+
|
|
1130
|
+
_host = None
|
|
1131
|
+
|
|
1132
|
+
_collection_formats: Dict[str, str] = {
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1135
|
+
_path_params: Dict[str, str] = {}
|
|
1136
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1137
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1138
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1139
|
+
_files: Dict[
|
|
1140
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1141
|
+
] = {}
|
|
1142
|
+
_body_params: Optional[bytes] = None
|
|
1143
|
+
|
|
1144
|
+
# process the path parameters
|
|
1145
|
+
if user_id is not None:
|
|
1146
|
+
_path_params['user_id'] = user_id
|
|
1147
|
+
# process the query parameters
|
|
1148
|
+
# process the header parameters
|
|
1149
|
+
# process the form parameters
|
|
1150
|
+
# process the body parameter
|
|
1151
|
+
|
|
1152
|
+
|
|
1153
|
+
# set the HTTP header `Accept`
|
|
1154
|
+
if 'Accept' not in _header_params:
|
|
1155
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1156
|
+
[
|
|
1157
|
+
'application/json'
|
|
1158
|
+
]
|
|
1159
|
+
)
|
|
1160
|
+
|
|
1161
|
+
|
|
1162
|
+
# authentication setting
|
|
1163
|
+
_auth_settings: List[str] = [
|
|
1164
|
+
'Authorization'
|
|
1165
|
+
]
|
|
1166
|
+
|
|
1167
|
+
return self.api_client.param_serialize(
|
|
1168
|
+
method='GET',
|
|
1169
|
+
resource_path='/user/{user_id}/service_account/',
|
|
1170
|
+
path_params=_path_params,
|
|
1171
|
+
query_params=_query_params,
|
|
1172
|
+
header_params=_header_params,
|
|
1173
|
+
body=_body_params,
|
|
1174
|
+
post_params=_form_params,
|
|
1175
|
+
files=_files,
|
|
1176
|
+
auth_settings=_auth_settings,
|
|
1177
|
+
collection_formats=_collection_formats,
|
|
1178
|
+
_host=_host,
|
|
1179
|
+
_request_auth=_request_auth
|
|
1180
|
+
)
|
|
1181
|
+
|
|
1182
|
+
|
|
1183
|
+
|
|
1184
|
+
|
|
1185
|
+
@validate_call
|
|
1186
|
+
def get_user_service_account(
|
|
1187
|
+
self,
|
|
1188
|
+
service_account_id: StrictStr,
|
|
1189
|
+
user_id: StrictStr,
|
|
1190
|
+
_request_timeout: Union[
|
|
1191
|
+
None,
|
|
1192
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1193
|
+
Tuple[
|
|
1194
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1195
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1196
|
+
]
|
|
1197
|
+
] = None,
|
|
1198
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1199
|
+
_content_type: Optional[StrictStr] = None,
|
|
1200
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1201
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1202
|
+
) -> AcrossServerRoutesV1UserServiceAccountSchemasServiceAccount:
|
|
1203
|
+
"""Read a service account
|
|
1204
|
+
|
|
1205
|
+
Read a service account by an ID.
|
|
1206
|
+
|
|
1207
|
+
:param service_account_id: (required)
|
|
1208
|
+
:type service_account_id: str
|
|
1209
|
+
:param user_id: (required)
|
|
1210
|
+
:type user_id: str
|
|
1211
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1212
|
+
number provided, it will be total request
|
|
1213
|
+
timeout. It can also be a pair (tuple) of
|
|
1214
|
+
(connection, read) timeouts.
|
|
1215
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1216
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1217
|
+
request; this effectively ignores the
|
|
1218
|
+
authentication in the spec for a single request.
|
|
1219
|
+
:type _request_auth: dict, optional
|
|
1220
|
+
:param _content_type: force content-type for the request.
|
|
1221
|
+
:type _content_type: str, Optional
|
|
1222
|
+
:param _headers: set to override the headers for a single
|
|
1223
|
+
request; this effectively ignores the headers
|
|
1224
|
+
in the spec for a single request.
|
|
1225
|
+
:type _headers: dict, optional
|
|
1226
|
+
:param _host_index: set to override the host_index for a single
|
|
1227
|
+
request; this effectively ignores the host_index
|
|
1228
|
+
in the spec for a single request.
|
|
1229
|
+
:type _host_index: int, optional
|
|
1230
|
+
:return: Returns the result object.
|
|
1231
|
+
""" # noqa: E501
|
|
1232
|
+
|
|
1233
|
+
_param = self._get_user_service_account_serialize(
|
|
1234
|
+
service_account_id=service_account_id,
|
|
1235
|
+
user_id=user_id,
|
|
1236
|
+
_request_auth=_request_auth,
|
|
1237
|
+
_content_type=_content_type,
|
|
1238
|
+
_headers=_headers,
|
|
1239
|
+
_host_index=_host_index
|
|
1240
|
+
)
|
|
1241
|
+
|
|
1242
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1243
|
+
'200': "AcrossServerRoutesV1UserServiceAccountSchemasServiceAccount",
|
|
1244
|
+
'404': None,
|
|
1245
|
+
'422': "HTTPValidationError",
|
|
1246
|
+
}
|
|
1247
|
+
response_data = self.api_client.call_api(
|
|
1248
|
+
*_param,
|
|
1249
|
+
_request_timeout=_request_timeout
|
|
1250
|
+
)
|
|
1251
|
+
response_data.read()
|
|
1252
|
+
return self.api_client.response_deserialize(
|
|
1253
|
+
response_data=response_data,
|
|
1254
|
+
response_types_map=_response_types_map,
|
|
1255
|
+
).data
|
|
1256
|
+
|
|
1257
|
+
|
|
1258
|
+
@validate_call
|
|
1259
|
+
def get_user_service_account_with_http_info(
|
|
1260
|
+
self,
|
|
1261
|
+
service_account_id: StrictStr,
|
|
1262
|
+
user_id: StrictStr,
|
|
1263
|
+
_request_timeout: Union[
|
|
1264
|
+
None,
|
|
1265
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1266
|
+
Tuple[
|
|
1267
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1268
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1269
|
+
]
|
|
1270
|
+
] = None,
|
|
1271
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1272
|
+
_content_type: Optional[StrictStr] = None,
|
|
1273
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1274
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1275
|
+
) -> ApiResponse[AcrossServerRoutesV1UserServiceAccountSchemasServiceAccount]:
|
|
1276
|
+
"""Read a service account
|
|
1277
|
+
|
|
1278
|
+
Read a service account by an ID.
|
|
1279
|
+
|
|
1280
|
+
:param service_account_id: (required)
|
|
1281
|
+
:type service_account_id: str
|
|
1282
|
+
:param user_id: (required)
|
|
1283
|
+
:type user_id: str
|
|
1284
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1285
|
+
number provided, it will be total request
|
|
1286
|
+
timeout. It can also be a pair (tuple) of
|
|
1287
|
+
(connection, read) timeouts.
|
|
1288
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1289
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1290
|
+
request; this effectively ignores the
|
|
1291
|
+
authentication in the spec for a single request.
|
|
1292
|
+
:type _request_auth: dict, optional
|
|
1293
|
+
:param _content_type: force content-type for the request.
|
|
1294
|
+
:type _content_type: str, Optional
|
|
1295
|
+
:param _headers: set to override the headers for a single
|
|
1296
|
+
request; this effectively ignores the headers
|
|
1297
|
+
in the spec for a single request.
|
|
1298
|
+
:type _headers: dict, optional
|
|
1299
|
+
:param _host_index: set to override the host_index for a single
|
|
1300
|
+
request; this effectively ignores the host_index
|
|
1301
|
+
in the spec for a single request.
|
|
1302
|
+
:type _host_index: int, optional
|
|
1303
|
+
:return: Returns the result object.
|
|
1304
|
+
""" # noqa: E501
|
|
1305
|
+
|
|
1306
|
+
_param = self._get_user_service_account_serialize(
|
|
1307
|
+
service_account_id=service_account_id,
|
|
1308
|
+
user_id=user_id,
|
|
1309
|
+
_request_auth=_request_auth,
|
|
1310
|
+
_content_type=_content_type,
|
|
1311
|
+
_headers=_headers,
|
|
1312
|
+
_host_index=_host_index
|
|
1313
|
+
)
|
|
1314
|
+
|
|
1315
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1316
|
+
'200': "AcrossServerRoutesV1UserServiceAccountSchemasServiceAccount",
|
|
1317
|
+
'404': None,
|
|
1318
|
+
'422': "HTTPValidationError",
|
|
1319
|
+
}
|
|
1320
|
+
response_data = self.api_client.call_api(
|
|
1321
|
+
*_param,
|
|
1322
|
+
_request_timeout=_request_timeout
|
|
1323
|
+
)
|
|
1324
|
+
response_data.read()
|
|
1325
|
+
return self.api_client.response_deserialize(
|
|
1326
|
+
response_data=response_data,
|
|
1327
|
+
response_types_map=_response_types_map,
|
|
1328
|
+
)
|
|
1329
|
+
|
|
1330
|
+
|
|
1331
|
+
@validate_call
|
|
1332
|
+
def get_user_service_account_without_preload_content(
|
|
1333
|
+
self,
|
|
1334
|
+
service_account_id: StrictStr,
|
|
1335
|
+
user_id: StrictStr,
|
|
1336
|
+
_request_timeout: Union[
|
|
1337
|
+
None,
|
|
1338
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1339
|
+
Tuple[
|
|
1340
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1341
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1342
|
+
]
|
|
1343
|
+
] = None,
|
|
1344
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1345
|
+
_content_type: Optional[StrictStr] = None,
|
|
1346
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1347
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1348
|
+
) -> RESTResponseType:
|
|
1349
|
+
"""Read a service account
|
|
1350
|
+
|
|
1351
|
+
Read a service account by an ID.
|
|
1352
|
+
|
|
1353
|
+
:param service_account_id: (required)
|
|
1354
|
+
:type service_account_id: str
|
|
1355
|
+
:param user_id: (required)
|
|
1356
|
+
:type user_id: str
|
|
1357
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1358
|
+
number provided, it will be total request
|
|
1359
|
+
timeout. It can also be a pair (tuple) of
|
|
1360
|
+
(connection, read) timeouts.
|
|
1361
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1362
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1363
|
+
request; this effectively ignores the
|
|
1364
|
+
authentication in the spec for a single request.
|
|
1365
|
+
:type _request_auth: dict, optional
|
|
1366
|
+
:param _content_type: force content-type for the request.
|
|
1367
|
+
:type _content_type: str, Optional
|
|
1368
|
+
:param _headers: set to override the headers for a single
|
|
1369
|
+
request; this effectively ignores the headers
|
|
1370
|
+
in the spec for a single request.
|
|
1371
|
+
:type _headers: dict, optional
|
|
1372
|
+
:param _host_index: set to override the host_index for a single
|
|
1373
|
+
request; this effectively ignores the host_index
|
|
1374
|
+
in the spec for a single request.
|
|
1375
|
+
:type _host_index: int, optional
|
|
1376
|
+
:return: Returns the result object.
|
|
1377
|
+
""" # noqa: E501
|
|
1378
|
+
|
|
1379
|
+
_param = self._get_user_service_account_serialize(
|
|
1380
|
+
service_account_id=service_account_id,
|
|
1381
|
+
user_id=user_id,
|
|
1382
|
+
_request_auth=_request_auth,
|
|
1383
|
+
_content_type=_content_type,
|
|
1384
|
+
_headers=_headers,
|
|
1385
|
+
_host_index=_host_index
|
|
1386
|
+
)
|
|
1387
|
+
|
|
1388
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1389
|
+
'200': "AcrossServerRoutesV1UserServiceAccountSchemasServiceAccount",
|
|
1390
|
+
'404': None,
|
|
1391
|
+
'422': "HTTPValidationError",
|
|
1392
|
+
}
|
|
1393
|
+
response_data = self.api_client.call_api(
|
|
1394
|
+
*_param,
|
|
1395
|
+
_request_timeout=_request_timeout
|
|
1396
|
+
)
|
|
1397
|
+
return response_data.response
|
|
1398
|
+
|
|
1399
|
+
|
|
1400
|
+
def _get_user_service_account_serialize(
|
|
1401
|
+
self,
|
|
1402
|
+
service_account_id,
|
|
1403
|
+
user_id,
|
|
1404
|
+
_request_auth,
|
|
1405
|
+
_content_type,
|
|
1406
|
+
_headers,
|
|
1407
|
+
_host_index,
|
|
1408
|
+
) -> RequestSerialized:
|
|
1409
|
+
|
|
1410
|
+
_host = None
|
|
1411
|
+
|
|
1412
|
+
_collection_formats: Dict[str, str] = {
|
|
1413
|
+
}
|
|
1414
|
+
|
|
1415
|
+
_path_params: Dict[str, str] = {}
|
|
1416
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1417
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1418
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1419
|
+
_files: Dict[
|
|
1420
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1421
|
+
] = {}
|
|
1422
|
+
_body_params: Optional[bytes] = None
|
|
1423
|
+
|
|
1424
|
+
# process the path parameters
|
|
1425
|
+
if service_account_id is not None:
|
|
1426
|
+
_path_params['service_account_id'] = service_account_id
|
|
1427
|
+
if user_id is not None:
|
|
1428
|
+
_path_params['user_id'] = user_id
|
|
1429
|
+
# process the query parameters
|
|
1430
|
+
# process the header parameters
|
|
1431
|
+
# process the form parameters
|
|
1432
|
+
# process the body parameter
|
|
1433
|
+
|
|
1434
|
+
|
|
1435
|
+
# set the HTTP header `Accept`
|
|
1436
|
+
if 'Accept' not in _header_params:
|
|
1437
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1438
|
+
[
|
|
1439
|
+
'application/json'
|
|
1440
|
+
]
|
|
1441
|
+
)
|
|
1442
|
+
|
|
1443
|
+
|
|
1444
|
+
# authentication setting
|
|
1445
|
+
_auth_settings: List[str] = [
|
|
1446
|
+
'Authorization'
|
|
1447
|
+
]
|
|
1448
|
+
|
|
1449
|
+
return self.api_client.param_serialize(
|
|
1450
|
+
method='GET',
|
|
1451
|
+
resource_path='/user/{user_id}/service_account/{service_account_id}',
|
|
1452
|
+
path_params=_path_params,
|
|
1453
|
+
query_params=_query_params,
|
|
1454
|
+
header_params=_header_params,
|
|
1455
|
+
body=_body_params,
|
|
1456
|
+
post_params=_form_params,
|
|
1457
|
+
files=_files,
|
|
1458
|
+
auth_settings=_auth_settings,
|
|
1459
|
+
collection_formats=_collection_formats,
|
|
1460
|
+
_host=_host,
|
|
1461
|
+
_request_auth=_request_auth
|
|
1462
|
+
)
|
|
1463
|
+
|
|
1464
|
+
|
|
1465
|
+
|
|
1466
|
+
|
|
1467
|
+
@validate_call
|
|
1468
|
+
def remove_from_service_account(
|
|
1469
|
+
self,
|
|
1470
|
+
service_account_id: StrictStr,
|
|
1471
|
+
group_role_id: StrictStr,
|
|
1472
|
+
user_id: StrictStr,
|
|
1473
|
+
_request_timeout: Union[
|
|
1474
|
+
None,
|
|
1475
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1476
|
+
Tuple[
|
|
1477
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1478
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1479
|
+
]
|
|
1480
|
+
] = None,
|
|
1481
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1482
|
+
_content_type: Optional[StrictStr] = None,
|
|
1483
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1484
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1485
|
+
) -> AcrossServerRoutesV1UserServiceAccountSchemasServiceAccount:
|
|
1486
|
+
"""Remove group role
|
|
1487
|
+
|
|
1488
|
+
Remove a group role from a service account.
|
|
1489
|
+
|
|
1490
|
+
:param service_account_id: (required)
|
|
1491
|
+
:type service_account_id: str
|
|
1492
|
+
:param group_role_id: (required)
|
|
1493
|
+
:type group_role_id: str
|
|
1494
|
+
:param user_id: (required)
|
|
1495
|
+
:type user_id: str
|
|
1496
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1497
|
+
number provided, it will be total request
|
|
1498
|
+
timeout. It can also be a pair (tuple) of
|
|
1499
|
+
(connection, read) timeouts.
|
|
1500
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1501
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1502
|
+
request; this effectively ignores the
|
|
1503
|
+
authentication in the spec for a single request.
|
|
1504
|
+
:type _request_auth: dict, optional
|
|
1505
|
+
:param _content_type: force content-type for the request.
|
|
1506
|
+
:type _content_type: str, Optional
|
|
1507
|
+
:param _headers: set to override the headers for a single
|
|
1508
|
+
request; this effectively ignores the headers
|
|
1509
|
+
in the spec for a single request.
|
|
1510
|
+
:type _headers: dict, optional
|
|
1511
|
+
:param _host_index: set to override the host_index for a single
|
|
1512
|
+
request; this effectively ignores the host_index
|
|
1513
|
+
in the spec for a single request.
|
|
1514
|
+
:type _host_index: int, optional
|
|
1515
|
+
:return: Returns the result object.
|
|
1516
|
+
""" # noqa: E501
|
|
1517
|
+
|
|
1518
|
+
_param = self._remove_from_service_account_serialize(
|
|
1519
|
+
service_account_id=service_account_id,
|
|
1520
|
+
group_role_id=group_role_id,
|
|
1521
|
+
user_id=user_id,
|
|
1522
|
+
_request_auth=_request_auth,
|
|
1523
|
+
_content_type=_content_type,
|
|
1524
|
+
_headers=_headers,
|
|
1525
|
+
_host_index=_host_index
|
|
1526
|
+
)
|
|
1527
|
+
|
|
1528
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1529
|
+
'200': "AcrossServerRoutesV1UserServiceAccountSchemasServiceAccount",
|
|
1530
|
+
'404': None,
|
|
1531
|
+
'422': "HTTPValidationError",
|
|
1532
|
+
}
|
|
1533
|
+
response_data = self.api_client.call_api(
|
|
1534
|
+
*_param,
|
|
1535
|
+
_request_timeout=_request_timeout
|
|
1536
|
+
)
|
|
1537
|
+
response_data.read()
|
|
1538
|
+
return self.api_client.response_deserialize(
|
|
1539
|
+
response_data=response_data,
|
|
1540
|
+
response_types_map=_response_types_map,
|
|
1541
|
+
).data
|
|
1542
|
+
|
|
1543
|
+
|
|
1544
|
+
@validate_call
|
|
1545
|
+
def remove_from_service_account_with_http_info(
|
|
1546
|
+
self,
|
|
1547
|
+
service_account_id: StrictStr,
|
|
1548
|
+
group_role_id: StrictStr,
|
|
1549
|
+
user_id: StrictStr,
|
|
1550
|
+
_request_timeout: Union[
|
|
1551
|
+
None,
|
|
1552
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1553
|
+
Tuple[
|
|
1554
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1555
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1556
|
+
]
|
|
1557
|
+
] = None,
|
|
1558
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1559
|
+
_content_type: Optional[StrictStr] = None,
|
|
1560
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1561
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1562
|
+
) -> ApiResponse[AcrossServerRoutesV1UserServiceAccountSchemasServiceAccount]:
|
|
1563
|
+
"""Remove group role
|
|
1564
|
+
|
|
1565
|
+
Remove a group role from a service account.
|
|
1566
|
+
|
|
1567
|
+
:param service_account_id: (required)
|
|
1568
|
+
:type service_account_id: str
|
|
1569
|
+
:param group_role_id: (required)
|
|
1570
|
+
:type group_role_id: str
|
|
1571
|
+
:param user_id: (required)
|
|
1572
|
+
:type user_id: str
|
|
1573
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1574
|
+
number provided, it will be total request
|
|
1575
|
+
timeout. It can also be a pair (tuple) of
|
|
1576
|
+
(connection, read) timeouts.
|
|
1577
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1578
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1579
|
+
request; this effectively ignores the
|
|
1580
|
+
authentication in the spec for a single request.
|
|
1581
|
+
:type _request_auth: dict, optional
|
|
1582
|
+
:param _content_type: force content-type for the request.
|
|
1583
|
+
:type _content_type: str, Optional
|
|
1584
|
+
:param _headers: set to override the headers for a single
|
|
1585
|
+
request; this effectively ignores the headers
|
|
1586
|
+
in the spec for a single request.
|
|
1587
|
+
:type _headers: dict, optional
|
|
1588
|
+
:param _host_index: set to override the host_index for a single
|
|
1589
|
+
request; this effectively ignores the host_index
|
|
1590
|
+
in the spec for a single request.
|
|
1591
|
+
:type _host_index: int, optional
|
|
1592
|
+
:return: Returns the result object.
|
|
1593
|
+
""" # noqa: E501
|
|
1594
|
+
|
|
1595
|
+
_param = self._remove_from_service_account_serialize(
|
|
1596
|
+
service_account_id=service_account_id,
|
|
1597
|
+
group_role_id=group_role_id,
|
|
1598
|
+
user_id=user_id,
|
|
1599
|
+
_request_auth=_request_auth,
|
|
1600
|
+
_content_type=_content_type,
|
|
1601
|
+
_headers=_headers,
|
|
1602
|
+
_host_index=_host_index
|
|
1603
|
+
)
|
|
1604
|
+
|
|
1605
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1606
|
+
'200': "AcrossServerRoutesV1UserServiceAccountSchemasServiceAccount",
|
|
1607
|
+
'404': None,
|
|
1608
|
+
'422': "HTTPValidationError",
|
|
1609
|
+
}
|
|
1610
|
+
response_data = self.api_client.call_api(
|
|
1611
|
+
*_param,
|
|
1612
|
+
_request_timeout=_request_timeout
|
|
1613
|
+
)
|
|
1614
|
+
response_data.read()
|
|
1615
|
+
return self.api_client.response_deserialize(
|
|
1616
|
+
response_data=response_data,
|
|
1617
|
+
response_types_map=_response_types_map,
|
|
1618
|
+
)
|
|
1619
|
+
|
|
1620
|
+
|
|
1621
|
+
@validate_call
|
|
1622
|
+
def remove_from_service_account_without_preload_content(
|
|
1623
|
+
self,
|
|
1624
|
+
service_account_id: StrictStr,
|
|
1625
|
+
group_role_id: StrictStr,
|
|
1626
|
+
user_id: StrictStr,
|
|
1627
|
+
_request_timeout: Union[
|
|
1628
|
+
None,
|
|
1629
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1630
|
+
Tuple[
|
|
1631
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1632
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1633
|
+
]
|
|
1634
|
+
] = None,
|
|
1635
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1636
|
+
_content_type: Optional[StrictStr] = None,
|
|
1637
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1638
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1639
|
+
) -> RESTResponseType:
|
|
1640
|
+
"""Remove group role
|
|
1641
|
+
|
|
1642
|
+
Remove a group role from a service account.
|
|
1643
|
+
|
|
1644
|
+
:param service_account_id: (required)
|
|
1645
|
+
:type service_account_id: str
|
|
1646
|
+
:param group_role_id: (required)
|
|
1647
|
+
:type group_role_id: str
|
|
1648
|
+
:param user_id: (required)
|
|
1649
|
+
:type user_id: str
|
|
1650
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1651
|
+
number provided, it will be total request
|
|
1652
|
+
timeout. It can also be a pair (tuple) of
|
|
1653
|
+
(connection, read) timeouts.
|
|
1654
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1655
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1656
|
+
request; this effectively ignores the
|
|
1657
|
+
authentication in the spec for a single request.
|
|
1658
|
+
:type _request_auth: dict, optional
|
|
1659
|
+
:param _content_type: force content-type for the request.
|
|
1660
|
+
:type _content_type: str, Optional
|
|
1661
|
+
:param _headers: set to override the headers for a single
|
|
1662
|
+
request; this effectively ignores the headers
|
|
1663
|
+
in the spec for a single request.
|
|
1664
|
+
:type _headers: dict, optional
|
|
1665
|
+
:param _host_index: set to override the host_index for a single
|
|
1666
|
+
request; this effectively ignores the host_index
|
|
1667
|
+
in the spec for a single request.
|
|
1668
|
+
:type _host_index: int, optional
|
|
1669
|
+
:return: Returns the result object.
|
|
1670
|
+
""" # noqa: E501
|
|
1671
|
+
|
|
1672
|
+
_param = self._remove_from_service_account_serialize(
|
|
1673
|
+
service_account_id=service_account_id,
|
|
1674
|
+
group_role_id=group_role_id,
|
|
1675
|
+
user_id=user_id,
|
|
1676
|
+
_request_auth=_request_auth,
|
|
1677
|
+
_content_type=_content_type,
|
|
1678
|
+
_headers=_headers,
|
|
1679
|
+
_host_index=_host_index
|
|
1680
|
+
)
|
|
1681
|
+
|
|
1682
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1683
|
+
'200': "AcrossServerRoutesV1UserServiceAccountSchemasServiceAccount",
|
|
1684
|
+
'404': None,
|
|
1685
|
+
'422': "HTTPValidationError",
|
|
1686
|
+
}
|
|
1687
|
+
response_data = self.api_client.call_api(
|
|
1688
|
+
*_param,
|
|
1689
|
+
_request_timeout=_request_timeout
|
|
1690
|
+
)
|
|
1691
|
+
return response_data.response
|
|
1692
|
+
|
|
1693
|
+
|
|
1694
|
+
def _remove_from_service_account_serialize(
|
|
1695
|
+
self,
|
|
1696
|
+
service_account_id,
|
|
1697
|
+
group_role_id,
|
|
1698
|
+
user_id,
|
|
1699
|
+
_request_auth,
|
|
1700
|
+
_content_type,
|
|
1701
|
+
_headers,
|
|
1702
|
+
_host_index,
|
|
1703
|
+
) -> RequestSerialized:
|
|
1704
|
+
|
|
1705
|
+
_host = None
|
|
1706
|
+
|
|
1707
|
+
_collection_formats: Dict[str, str] = {
|
|
1708
|
+
}
|
|
1709
|
+
|
|
1710
|
+
_path_params: Dict[str, str] = {}
|
|
1711
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1712
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1713
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1714
|
+
_files: Dict[
|
|
1715
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1716
|
+
] = {}
|
|
1717
|
+
_body_params: Optional[bytes] = None
|
|
1718
|
+
|
|
1719
|
+
# process the path parameters
|
|
1720
|
+
if service_account_id is not None:
|
|
1721
|
+
_path_params['service_account_id'] = service_account_id
|
|
1722
|
+
if group_role_id is not None:
|
|
1723
|
+
_path_params['group_role_id'] = group_role_id
|
|
1724
|
+
if user_id is not None:
|
|
1725
|
+
_path_params['user_id'] = user_id
|
|
1726
|
+
# process the query parameters
|
|
1727
|
+
# process the header parameters
|
|
1728
|
+
# process the form parameters
|
|
1729
|
+
# process the body parameter
|
|
1730
|
+
|
|
1731
|
+
|
|
1732
|
+
# set the HTTP header `Accept`
|
|
1733
|
+
if 'Accept' not in _header_params:
|
|
1734
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1735
|
+
[
|
|
1736
|
+
'application/json'
|
|
1737
|
+
]
|
|
1738
|
+
)
|
|
1739
|
+
|
|
1740
|
+
|
|
1741
|
+
# authentication setting
|
|
1742
|
+
_auth_settings: List[str] = [
|
|
1743
|
+
'Authorization'
|
|
1744
|
+
]
|
|
1745
|
+
|
|
1746
|
+
return self.api_client.param_serialize(
|
|
1747
|
+
method='DELETE',
|
|
1748
|
+
resource_path='/user/{user_id}/service-account/{service_account_id}/group-role/{group_role_id}',
|
|
1749
|
+
path_params=_path_params,
|
|
1750
|
+
query_params=_query_params,
|
|
1751
|
+
header_params=_header_params,
|
|
1752
|
+
body=_body_params,
|
|
1753
|
+
post_params=_form_params,
|
|
1754
|
+
files=_files,
|
|
1755
|
+
auth_settings=_auth_settings,
|
|
1756
|
+
collection_formats=_collection_formats,
|
|
1757
|
+
_host=_host,
|
|
1758
|
+
_request_auth=_request_auth
|
|
1759
|
+
)
|
|
1760
|
+
|
|
1761
|
+
|
|
1762
|
+
|
|
1763
|
+
|
|
1764
|
+
@validate_call
|
|
1765
|
+
def update_user_service_account(
|
|
1766
|
+
self,
|
|
1767
|
+
service_account_id: StrictStr,
|
|
1768
|
+
user_id: StrictStr,
|
|
1769
|
+
service_account_update: ServiceAccountUpdate,
|
|
1770
|
+
_request_timeout: Union[
|
|
1771
|
+
None,
|
|
1772
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1773
|
+
Tuple[
|
|
1774
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1775
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1776
|
+
]
|
|
1777
|
+
] = None,
|
|
1778
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1779
|
+
_content_type: Optional[StrictStr] = None,
|
|
1780
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1781
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1782
|
+
) -> AcrossServerRoutesV1UserServiceAccountSchemasServiceAccount:
|
|
1783
|
+
"""Update a service account
|
|
1784
|
+
|
|
1785
|
+
Update a service account's information.
|
|
1786
|
+
|
|
1787
|
+
:param service_account_id: (required)
|
|
1788
|
+
:type service_account_id: str
|
|
1789
|
+
:param user_id: (required)
|
|
1790
|
+
:type user_id: str
|
|
1791
|
+
:param service_account_update: (required)
|
|
1792
|
+
:type service_account_update: ServiceAccountUpdate
|
|
1793
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1794
|
+
number provided, it will be total request
|
|
1795
|
+
timeout. It can also be a pair (tuple) of
|
|
1796
|
+
(connection, read) timeouts.
|
|
1797
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1798
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1799
|
+
request; this effectively ignores the
|
|
1800
|
+
authentication in the spec for a single request.
|
|
1801
|
+
:type _request_auth: dict, optional
|
|
1802
|
+
:param _content_type: force content-type for the request.
|
|
1803
|
+
:type _content_type: str, Optional
|
|
1804
|
+
:param _headers: set to override the headers for a single
|
|
1805
|
+
request; this effectively ignores the headers
|
|
1806
|
+
in the spec for a single request.
|
|
1807
|
+
:type _headers: dict, optional
|
|
1808
|
+
:param _host_index: set to override the host_index for a single
|
|
1809
|
+
request; this effectively ignores the host_index
|
|
1810
|
+
in the spec for a single request.
|
|
1811
|
+
:type _host_index: int, optional
|
|
1812
|
+
:return: Returns the result object.
|
|
1813
|
+
""" # noqa: E501
|
|
1814
|
+
|
|
1815
|
+
_param = self._update_user_service_account_serialize(
|
|
1816
|
+
service_account_id=service_account_id,
|
|
1817
|
+
user_id=user_id,
|
|
1818
|
+
service_account_update=service_account_update,
|
|
1819
|
+
_request_auth=_request_auth,
|
|
1820
|
+
_content_type=_content_type,
|
|
1821
|
+
_headers=_headers,
|
|
1822
|
+
_host_index=_host_index
|
|
1823
|
+
)
|
|
1824
|
+
|
|
1825
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1826
|
+
'200': "AcrossServerRoutesV1UserServiceAccountSchemasServiceAccount",
|
|
1827
|
+
'404': None,
|
|
1828
|
+
'422': "HTTPValidationError",
|
|
1829
|
+
}
|
|
1830
|
+
response_data = self.api_client.call_api(
|
|
1831
|
+
*_param,
|
|
1832
|
+
_request_timeout=_request_timeout
|
|
1833
|
+
)
|
|
1834
|
+
response_data.read()
|
|
1835
|
+
return self.api_client.response_deserialize(
|
|
1836
|
+
response_data=response_data,
|
|
1837
|
+
response_types_map=_response_types_map,
|
|
1838
|
+
).data
|
|
1839
|
+
|
|
1840
|
+
|
|
1841
|
+
@validate_call
|
|
1842
|
+
def update_user_service_account_with_http_info(
|
|
1843
|
+
self,
|
|
1844
|
+
service_account_id: StrictStr,
|
|
1845
|
+
user_id: StrictStr,
|
|
1846
|
+
service_account_update: ServiceAccountUpdate,
|
|
1847
|
+
_request_timeout: Union[
|
|
1848
|
+
None,
|
|
1849
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1850
|
+
Tuple[
|
|
1851
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1852
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1853
|
+
]
|
|
1854
|
+
] = None,
|
|
1855
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1856
|
+
_content_type: Optional[StrictStr] = None,
|
|
1857
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1858
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1859
|
+
) -> ApiResponse[AcrossServerRoutesV1UserServiceAccountSchemasServiceAccount]:
|
|
1860
|
+
"""Update a service account
|
|
1861
|
+
|
|
1862
|
+
Update a service account's information.
|
|
1863
|
+
|
|
1864
|
+
:param service_account_id: (required)
|
|
1865
|
+
:type service_account_id: str
|
|
1866
|
+
:param user_id: (required)
|
|
1867
|
+
:type user_id: str
|
|
1868
|
+
:param service_account_update: (required)
|
|
1869
|
+
:type service_account_update: ServiceAccountUpdate
|
|
1870
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1871
|
+
number provided, it will be total request
|
|
1872
|
+
timeout. It can also be a pair (tuple) of
|
|
1873
|
+
(connection, read) timeouts.
|
|
1874
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1875
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1876
|
+
request; this effectively ignores the
|
|
1877
|
+
authentication in the spec for a single request.
|
|
1878
|
+
:type _request_auth: dict, optional
|
|
1879
|
+
:param _content_type: force content-type for the request.
|
|
1880
|
+
:type _content_type: str, Optional
|
|
1881
|
+
:param _headers: set to override the headers for a single
|
|
1882
|
+
request; this effectively ignores the headers
|
|
1883
|
+
in the spec for a single request.
|
|
1884
|
+
:type _headers: dict, optional
|
|
1885
|
+
:param _host_index: set to override the host_index for a single
|
|
1886
|
+
request; this effectively ignores the host_index
|
|
1887
|
+
in the spec for a single request.
|
|
1888
|
+
:type _host_index: int, optional
|
|
1889
|
+
:return: Returns the result object.
|
|
1890
|
+
""" # noqa: E501
|
|
1891
|
+
|
|
1892
|
+
_param = self._update_user_service_account_serialize(
|
|
1893
|
+
service_account_id=service_account_id,
|
|
1894
|
+
user_id=user_id,
|
|
1895
|
+
service_account_update=service_account_update,
|
|
1896
|
+
_request_auth=_request_auth,
|
|
1897
|
+
_content_type=_content_type,
|
|
1898
|
+
_headers=_headers,
|
|
1899
|
+
_host_index=_host_index
|
|
1900
|
+
)
|
|
1901
|
+
|
|
1902
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1903
|
+
'200': "AcrossServerRoutesV1UserServiceAccountSchemasServiceAccount",
|
|
1904
|
+
'404': None,
|
|
1905
|
+
'422': "HTTPValidationError",
|
|
1906
|
+
}
|
|
1907
|
+
response_data = self.api_client.call_api(
|
|
1908
|
+
*_param,
|
|
1909
|
+
_request_timeout=_request_timeout
|
|
1910
|
+
)
|
|
1911
|
+
response_data.read()
|
|
1912
|
+
return self.api_client.response_deserialize(
|
|
1913
|
+
response_data=response_data,
|
|
1914
|
+
response_types_map=_response_types_map,
|
|
1915
|
+
)
|
|
1916
|
+
|
|
1917
|
+
|
|
1918
|
+
@validate_call
|
|
1919
|
+
def update_user_service_account_without_preload_content(
|
|
1920
|
+
self,
|
|
1921
|
+
service_account_id: StrictStr,
|
|
1922
|
+
user_id: StrictStr,
|
|
1923
|
+
service_account_update: ServiceAccountUpdate,
|
|
1924
|
+
_request_timeout: Union[
|
|
1925
|
+
None,
|
|
1926
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1927
|
+
Tuple[
|
|
1928
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1929
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1930
|
+
]
|
|
1931
|
+
] = None,
|
|
1932
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1933
|
+
_content_type: Optional[StrictStr] = None,
|
|
1934
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1935
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1936
|
+
) -> RESTResponseType:
|
|
1937
|
+
"""Update a service account
|
|
1938
|
+
|
|
1939
|
+
Update a service account's information.
|
|
1940
|
+
|
|
1941
|
+
:param service_account_id: (required)
|
|
1942
|
+
:type service_account_id: str
|
|
1943
|
+
:param user_id: (required)
|
|
1944
|
+
:type user_id: str
|
|
1945
|
+
:param service_account_update: (required)
|
|
1946
|
+
:type service_account_update: ServiceAccountUpdate
|
|
1947
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1948
|
+
number provided, it will be total request
|
|
1949
|
+
timeout. It can also be a pair (tuple) of
|
|
1950
|
+
(connection, read) timeouts.
|
|
1951
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1952
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1953
|
+
request; this effectively ignores the
|
|
1954
|
+
authentication in the spec for a single request.
|
|
1955
|
+
:type _request_auth: dict, optional
|
|
1956
|
+
:param _content_type: force content-type for the request.
|
|
1957
|
+
:type _content_type: str, Optional
|
|
1958
|
+
:param _headers: set to override the headers for a single
|
|
1959
|
+
request; this effectively ignores the headers
|
|
1960
|
+
in the spec for a single request.
|
|
1961
|
+
:type _headers: dict, optional
|
|
1962
|
+
:param _host_index: set to override the host_index for a single
|
|
1963
|
+
request; this effectively ignores the host_index
|
|
1964
|
+
in the spec for a single request.
|
|
1965
|
+
:type _host_index: int, optional
|
|
1966
|
+
:return: Returns the result object.
|
|
1967
|
+
""" # noqa: E501
|
|
1968
|
+
|
|
1969
|
+
_param = self._update_user_service_account_serialize(
|
|
1970
|
+
service_account_id=service_account_id,
|
|
1971
|
+
user_id=user_id,
|
|
1972
|
+
service_account_update=service_account_update,
|
|
1973
|
+
_request_auth=_request_auth,
|
|
1974
|
+
_content_type=_content_type,
|
|
1975
|
+
_headers=_headers,
|
|
1976
|
+
_host_index=_host_index
|
|
1977
|
+
)
|
|
1978
|
+
|
|
1979
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1980
|
+
'200': "AcrossServerRoutesV1UserServiceAccountSchemasServiceAccount",
|
|
1981
|
+
'404': None,
|
|
1982
|
+
'422': "HTTPValidationError",
|
|
1983
|
+
}
|
|
1984
|
+
response_data = self.api_client.call_api(
|
|
1985
|
+
*_param,
|
|
1986
|
+
_request_timeout=_request_timeout
|
|
1987
|
+
)
|
|
1988
|
+
return response_data.response
|
|
1989
|
+
|
|
1990
|
+
|
|
1991
|
+
def _update_user_service_account_serialize(
|
|
1992
|
+
self,
|
|
1993
|
+
service_account_id,
|
|
1994
|
+
user_id,
|
|
1995
|
+
service_account_update,
|
|
1996
|
+
_request_auth,
|
|
1997
|
+
_content_type,
|
|
1998
|
+
_headers,
|
|
1999
|
+
_host_index,
|
|
2000
|
+
) -> RequestSerialized:
|
|
2001
|
+
|
|
2002
|
+
_host = None
|
|
2003
|
+
|
|
2004
|
+
_collection_formats: Dict[str, str] = {
|
|
2005
|
+
}
|
|
2006
|
+
|
|
2007
|
+
_path_params: Dict[str, str] = {}
|
|
2008
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2009
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2010
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2011
|
+
_files: Dict[
|
|
2012
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2013
|
+
] = {}
|
|
2014
|
+
_body_params: Optional[bytes] = None
|
|
2015
|
+
|
|
2016
|
+
# process the path parameters
|
|
2017
|
+
if service_account_id is not None:
|
|
2018
|
+
_path_params['service_account_id'] = service_account_id
|
|
2019
|
+
if user_id is not None:
|
|
2020
|
+
_path_params['user_id'] = user_id
|
|
2021
|
+
# process the query parameters
|
|
2022
|
+
# process the header parameters
|
|
2023
|
+
# process the form parameters
|
|
2024
|
+
# process the body parameter
|
|
2025
|
+
if service_account_update is not None:
|
|
2026
|
+
_body_params = service_account_update
|
|
2027
|
+
|
|
2028
|
+
|
|
2029
|
+
# set the HTTP header `Accept`
|
|
2030
|
+
if 'Accept' not in _header_params:
|
|
2031
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2032
|
+
[
|
|
2033
|
+
'application/json'
|
|
2034
|
+
]
|
|
2035
|
+
)
|
|
2036
|
+
|
|
2037
|
+
# set the HTTP header `Content-Type`
|
|
2038
|
+
if _content_type:
|
|
2039
|
+
_header_params['Content-Type'] = _content_type
|
|
2040
|
+
else:
|
|
2041
|
+
_default_content_type = (
|
|
2042
|
+
self.api_client.select_header_content_type(
|
|
2043
|
+
[
|
|
2044
|
+
'application/json'
|
|
2045
|
+
]
|
|
2046
|
+
)
|
|
2047
|
+
)
|
|
2048
|
+
if _default_content_type is not None:
|
|
2049
|
+
_header_params['Content-Type'] = _default_content_type
|
|
2050
|
+
|
|
2051
|
+
# authentication setting
|
|
2052
|
+
_auth_settings: List[str] = [
|
|
2053
|
+
'Authorization'
|
|
2054
|
+
]
|
|
2055
|
+
|
|
2056
|
+
return self.api_client.param_serialize(
|
|
2057
|
+
method='PATCH',
|
|
2058
|
+
resource_path='/user/{user_id}/service_account/{service_account_id}',
|
|
2059
|
+
path_params=_path_params,
|
|
2060
|
+
query_params=_query_params,
|
|
2061
|
+
header_params=_header_params,
|
|
2062
|
+
body=_body_params,
|
|
2063
|
+
post_params=_form_params,
|
|
2064
|
+
files=_files,
|
|
2065
|
+
auth_settings=_auth_settings,
|
|
2066
|
+
collection_formats=_collection_formats,
|
|
2067
|
+
_host=_host,
|
|
2068
|
+
_request_auth=_request_auth
|
|
2069
|
+
)
|
|
2070
|
+
|
|
2071
|
+
|
|
2072
|
+
|
|
2073
|
+
|
|
2074
|
+
@validate_call
|
|
2075
|
+
def user_service_account_rotate_key(
|
|
2076
|
+
self,
|
|
2077
|
+
service_account_id: StrictStr,
|
|
2078
|
+
user_id: StrictStr,
|
|
2079
|
+
_request_timeout: Union[
|
|
2080
|
+
None,
|
|
2081
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2082
|
+
Tuple[
|
|
2083
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2084
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2085
|
+
]
|
|
2086
|
+
] = None,
|
|
2087
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2088
|
+
_content_type: Optional[StrictStr] = None,
|
|
2089
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2090
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2091
|
+
) -> AcrossServerRoutesV1UserServiceAccountSchemasServiceAccount:
|
|
2092
|
+
"""Rotate a service account key
|
|
2093
|
+
|
|
2094
|
+
Rotate service account key and reset expiration based on expiration_duration
|
|
2095
|
+
|
|
2096
|
+
:param service_account_id: (required)
|
|
2097
|
+
:type service_account_id: str
|
|
2098
|
+
:param user_id: (required)
|
|
2099
|
+
:type user_id: str
|
|
2100
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2101
|
+
number provided, it will be total request
|
|
2102
|
+
timeout. It can also be a pair (tuple) of
|
|
2103
|
+
(connection, read) timeouts.
|
|
2104
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2105
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2106
|
+
request; this effectively ignores the
|
|
2107
|
+
authentication in the spec for a single request.
|
|
2108
|
+
:type _request_auth: dict, optional
|
|
2109
|
+
:param _content_type: force content-type for the request.
|
|
2110
|
+
:type _content_type: str, Optional
|
|
2111
|
+
:param _headers: set to override the headers for a single
|
|
2112
|
+
request; this effectively ignores the headers
|
|
2113
|
+
in the spec for a single request.
|
|
2114
|
+
:type _headers: dict, optional
|
|
2115
|
+
:param _host_index: set to override the host_index for a single
|
|
2116
|
+
request; this effectively ignores the host_index
|
|
2117
|
+
in the spec for a single request.
|
|
2118
|
+
:type _host_index: int, optional
|
|
2119
|
+
:return: Returns the result object.
|
|
2120
|
+
""" # noqa: E501
|
|
2121
|
+
|
|
2122
|
+
_param = self._user_service_account_rotate_key_serialize(
|
|
2123
|
+
service_account_id=service_account_id,
|
|
2124
|
+
user_id=user_id,
|
|
2125
|
+
_request_auth=_request_auth,
|
|
2126
|
+
_content_type=_content_type,
|
|
2127
|
+
_headers=_headers,
|
|
2128
|
+
_host_index=_host_index
|
|
2129
|
+
)
|
|
2130
|
+
|
|
2131
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2132
|
+
'200': "AcrossServerRoutesV1UserServiceAccountSchemasServiceAccount",
|
|
2133
|
+
'404': None,
|
|
2134
|
+
'422': "HTTPValidationError",
|
|
2135
|
+
}
|
|
2136
|
+
response_data = self.api_client.call_api(
|
|
2137
|
+
*_param,
|
|
2138
|
+
_request_timeout=_request_timeout
|
|
2139
|
+
)
|
|
2140
|
+
response_data.read()
|
|
2141
|
+
return self.api_client.response_deserialize(
|
|
2142
|
+
response_data=response_data,
|
|
2143
|
+
response_types_map=_response_types_map,
|
|
2144
|
+
).data
|
|
2145
|
+
|
|
2146
|
+
|
|
2147
|
+
@validate_call
|
|
2148
|
+
def user_service_account_rotate_key_with_http_info(
|
|
2149
|
+
self,
|
|
2150
|
+
service_account_id: StrictStr,
|
|
2151
|
+
user_id: StrictStr,
|
|
2152
|
+
_request_timeout: Union[
|
|
2153
|
+
None,
|
|
2154
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2155
|
+
Tuple[
|
|
2156
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2157
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2158
|
+
]
|
|
2159
|
+
] = None,
|
|
2160
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2161
|
+
_content_type: Optional[StrictStr] = None,
|
|
2162
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2163
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2164
|
+
) -> ApiResponse[AcrossServerRoutesV1UserServiceAccountSchemasServiceAccount]:
|
|
2165
|
+
"""Rotate a service account key
|
|
2166
|
+
|
|
2167
|
+
Rotate service account key and reset expiration based on expiration_duration
|
|
2168
|
+
|
|
2169
|
+
:param service_account_id: (required)
|
|
2170
|
+
:type service_account_id: str
|
|
2171
|
+
:param user_id: (required)
|
|
2172
|
+
:type user_id: str
|
|
2173
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2174
|
+
number provided, it will be total request
|
|
2175
|
+
timeout. It can also be a pair (tuple) of
|
|
2176
|
+
(connection, read) timeouts.
|
|
2177
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2178
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2179
|
+
request; this effectively ignores the
|
|
2180
|
+
authentication in the spec for a single request.
|
|
2181
|
+
:type _request_auth: dict, optional
|
|
2182
|
+
:param _content_type: force content-type for the request.
|
|
2183
|
+
:type _content_type: str, Optional
|
|
2184
|
+
:param _headers: set to override the headers for a single
|
|
2185
|
+
request; this effectively ignores the headers
|
|
2186
|
+
in the spec for a single request.
|
|
2187
|
+
:type _headers: dict, optional
|
|
2188
|
+
:param _host_index: set to override the host_index for a single
|
|
2189
|
+
request; this effectively ignores the host_index
|
|
2190
|
+
in the spec for a single request.
|
|
2191
|
+
:type _host_index: int, optional
|
|
2192
|
+
:return: Returns the result object.
|
|
2193
|
+
""" # noqa: E501
|
|
2194
|
+
|
|
2195
|
+
_param = self._user_service_account_rotate_key_serialize(
|
|
2196
|
+
service_account_id=service_account_id,
|
|
2197
|
+
user_id=user_id,
|
|
2198
|
+
_request_auth=_request_auth,
|
|
2199
|
+
_content_type=_content_type,
|
|
2200
|
+
_headers=_headers,
|
|
2201
|
+
_host_index=_host_index
|
|
2202
|
+
)
|
|
2203
|
+
|
|
2204
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2205
|
+
'200': "AcrossServerRoutesV1UserServiceAccountSchemasServiceAccount",
|
|
2206
|
+
'404': None,
|
|
2207
|
+
'422': "HTTPValidationError",
|
|
2208
|
+
}
|
|
2209
|
+
response_data = self.api_client.call_api(
|
|
2210
|
+
*_param,
|
|
2211
|
+
_request_timeout=_request_timeout
|
|
2212
|
+
)
|
|
2213
|
+
response_data.read()
|
|
2214
|
+
return self.api_client.response_deserialize(
|
|
2215
|
+
response_data=response_data,
|
|
2216
|
+
response_types_map=_response_types_map,
|
|
2217
|
+
)
|
|
2218
|
+
|
|
2219
|
+
|
|
2220
|
+
@validate_call
|
|
2221
|
+
def user_service_account_rotate_key_without_preload_content(
|
|
2222
|
+
self,
|
|
2223
|
+
service_account_id: StrictStr,
|
|
2224
|
+
user_id: StrictStr,
|
|
2225
|
+
_request_timeout: Union[
|
|
2226
|
+
None,
|
|
2227
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2228
|
+
Tuple[
|
|
2229
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2230
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2231
|
+
]
|
|
2232
|
+
] = None,
|
|
2233
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2234
|
+
_content_type: Optional[StrictStr] = None,
|
|
2235
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2236
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2237
|
+
) -> RESTResponseType:
|
|
2238
|
+
"""Rotate a service account key
|
|
2239
|
+
|
|
2240
|
+
Rotate service account key and reset expiration based on expiration_duration
|
|
2241
|
+
|
|
2242
|
+
:param service_account_id: (required)
|
|
2243
|
+
:type service_account_id: str
|
|
2244
|
+
:param user_id: (required)
|
|
2245
|
+
:type user_id: str
|
|
2246
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2247
|
+
number provided, it will be total request
|
|
2248
|
+
timeout. It can also be a pair (tuple) of
|
|
2249
|
+
(connection, read) timeouts.
|
|
2250
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2251
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2252
|
+
request; this effectively ignores the
|
|
2253
|
+
authentication in the spec for a single request.
|
|
2254
|
+
:type _request_auth: dict, optional
|
|
2255
|
+
:param _content_type: force content-type for the request.
|
|
2256
|
+
:type _content_type: str, Optional
|
|
2257
|
+
:param _headers: set to override the headers for a single
|
|
2258
|
+
request; this effectively ignores the headers
|
|
2259
|
+
in the spec for a single request.
|
|
2260
|
+
:type _headers: dict, optional
|
|
2261
|
+
:param _host_index: set to override the host_index for a single
|
|
2262
|
+
request; this effectively ignores the host_index
|
|
2263
|
+
in the spec for a single request.
|
|
2264
|
+
:type _host_index: int, optional
|
|
2265
|
+
:return: Returns the result object.
|
|
2266
|
+
""" # noqa: E501
|
|
2267
|
+
|
|
2268
|
+
_param = self._user_service_account_rotate_key_serialize(
|
|
2269
|
+
service_account_id=service_account_id,
|
|
2270
|
+
user_id=user_id,
|
|
2271
|
+
_request_auth=_request_auth,
|
|
2272
|
+
_content_type=_content_type,
|
|
2273
|
+
_headers=_headers,
|
|
2274
|
+
_host_index=_host_index
|
|
2275
|
+
)
|
|
2276
|
+
|
|
2277
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2278
|
+
'200': "AcrossServerRoutesV1UserServiceAccountSchemasServiceAccount",
|
|
2279
|
+
'404': None,
|
|
2280
|
+
'422': "HTTPValidationError",
|
|
2281
|
+
}
|
|
2282
|
+
response_data = self.api_client.call_api(
|
|
2283
|
+
*_param,
|
|
2284
|
+
_request_timeout=_request_timeout
|
|
2285
|
+
)
|
|
2286
|
+
return response_data.response
|
|
2287
|
+
|
|
2288
|
+
|
|
2289
|
+
def _user_service_account_rotate_key_serialize(
|
|
2290
|
+
self,
|
|
2291
|
+
service_account_id,
|
|
2292
|
+
user_id,
|
|
2293
|
+
_request_auth,
|
|
2294
|
+
_content_type,
|
|
2295
|
+
_headers,
|
|
2296
|
+
_host_index,
|
|
2297
|
+
) -> RequestSerialized:
|
|
2298
|
+
|
|
2299
|
+
_host = None
|
|
2300
|
+
|
|
2301
|
+
_collection_formats: Dict[str, str] = {
|
|
2302
|
+
}
|
|
2303
|
+
|
|
2304
|
+
_path_params: Dict[str, str] = {}
|
|
2305
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2306
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2307
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2308
|
+
_files: Dict[
|
|
2309
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2310
|
+
] = {}
|
|
2311
|
+
_body_params: Optional[bytes] = None
|
|
2312
|
+
|
|
2313
|
+
# process the path parameters
|
|
2314
|
+
if service_account_id is not None:
|
|
2315
|
+
_path_params['service_account_id'] = service_account_id
|
|
2316
|
+
if user_id is not None:
|
|
2317
|
+
_path_params['user_id'] = user_id
|
|
2318
|
+
# process the query parameters
|
|
2319
|
+
# process the header parameters
|
|
2320
|
+
# process the form parameters
|
|
2321
|
+
# process the body parameter
|
|
2322
|
+
|
|
2323
|
+
|
|
2324
|
+
# set the HTTP header `Accept`
|
|
2325
|
+
if 'Accept' not in _header_params:
|
|
2326
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2327
|
+
[
|
|
2328
|
+
'application/json'
|
|
2329
|
+
]
|
|
2330
|
+
)
|
|
2331
|
+
|
|
2332
|
+
|
|
2333
|
+
# authentication setting
|
|
2334
|
+
_auth_settings: List[str] = [
|
|
2335
|
+
'Authorization'
|
|
2336
|
+
]
|
|
2337
|
+
|
|
2338
|
+
return self.api_client.param_serialize(
|
|
2339
|
+
method='PATCH',
|
|
2340
|
+
resource_path='/user/{user_id}/service_account/{service_account_id}/rotate_key',
|
|
2341
|
+
path_params=_path_params,
|
|
2342
|
+
query_params=_query_params,
|
|
2343
|
+
header_params=_header_params,
|
|
2344
|
+
body=_body_params,
|
|
2345
|
+
post_params=_form_params,
|
|
2346
|
+
files=_files,
|
|
2347
|
+
auth_settings=_auth_settings,
|
|
2348
|
+
collection_formats=_collection_formats,
|
|
2349
|
+
_host=_host,
|
|
2350
|
+
_request_auth=_request_auth
|
|
2351
|
+
)
|
|
2352
|
+
|
|
2353
|
+
|