h2ogpte 1.6.39__py3-none-any.whl → 1.6.40rc1__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.
- h2ogpte/__init__.py +1 -1
- h2ogpte/errors.py +4 -0
- h2ogpte/h2ogpte.py +443 -23
- h2ogpte/h2ogpte_async.py +449 -27
- h2ogpte/h2ogpte_sync_base.py +5 -0
- h2ogpte/rest_async/__init__.py +13 -1
- h2ogpte/rest_async/api/__init__.py +1 -0
- h2ogpte/rest_async/api/agents_api.py +1181 -22
- h2ogpte/rest_async/api/configurations_api.py +1005 -136
- h2ogpte/rest_async/api/permissions_api.py +296 -0
- h2ogpte/rest_async/api/prompt_templates_api.py +1242 -305
- h2ogpte/rest_async/api/secrets_api.py +1698 -0
- h2ogpte/rest_async/api_client.py +1 -1
- h2ogpte/rest_async/configuration.py +1 -1
- h2ogpte/rest_async/models/__init__.py +11 -0
- h2ogpte/rest_async/models/add_custom_agent_tool201_response_inner.py +87 -0
- h2ogpte/rest_async/models/create_agent_tool_request.py +103 -0
- h2ogpte/rest_async/models/create_secret201_response.py +87 -0
- h2ogpte/rest_async/models/create_secret_request.py +101 -0
- h2ogpte/rest_async/models/list_custom_agent_tools200_response_inner.py +95 -0
- h2ogpte/rest_async/models/prompt_template.py +10 -2
- h2ogpte/rest_async/models/role_info.py +5 -3
- h2ogpte/rest_async/models/set_role_priority_request.py +87 -0
- h2ogpte/rest_async/models/update_custom_agent_tool200_response.py +87 -0
- h2ogpte/rest_async/models/update_custom_agent_tool_request.py +87 -0
- h2ogpte/rest_async/models/update_default_prompt_template_visibility_request.py +87 -0
- h2ogpte/rest_async/models/update_prompt_template_privacy_request.py +87 -0
- h2ogpte/rest_async/models/update_secret_request.py +87 -0
- h2ogpte/rest_sync/__init__.py +13 -1
- h2ogpte/rest_sync/api/__init__.py +1 -0
- h2ogpte/rest_sync/api/agents_api.py +1181 -22
- h2ogpte/rest_sync/api/configurations_api.py +1005 -136
- h2ogpte/rest_sync/api/permissions_api.py +296 -0
- h2ogpte/rest_sync/api/prompt_templates_api.py +1242 -305
- h2ogpte/rest_sync/api/secrets_api.py +1698 -0
- h2ogpte/rest_sync/api_client.py +1 -1
- h2ogpte/rest_sync/configuration.py +1 -1
- h2ogpte/rest_sync/models/__init__.py +11 -0
- h2ogpte/rest_sync/models/add_custom_agent_tool201_response_inner.py +87 -0
- h2ogpte/rest_sync/models/create_agent_tool_request.py +103 -0
- h2ogpte/rest_sync/models/create_secret201_response.py +87 -0
- h2ogpte/rest_sync/models/create_secret_request.py +101 -0
- h2ogpte/rest_sync/models/list_custom_agent_tools200_response_inner.py +95 -0
- h2ogpte/rest_sync/models/prompt_template.py +10 -2
- h2ogpte/rest_sync/models/role_info.py +5 -3
- h2ogpte/rest_sync/models/set_role_priority_request.py +87 -0
- h2ogpte/rest_sync/models/update_custom_agent_tool200_response.py +87 -0
- h2ogpte/rest_sync/models/update_custom_agent_tool_request.py +87 -0
- h2ogpte/rest_sync/models/update_default_prompt_template_visibility_request.py +87 -0
- h2ogpte/rest_sync/models/update_prompt_template_privacy_request.py +87 -0
- h2ogpte/rest_sync/models/update_secret_request.py +87 -0
- h2ogpte/types.py +10 -4
- {h2ogpte-1.6.39.dist-info → h2ogpte-1.6.40rc1.dist-info}/METADATA +1 -1
- {h2ogpte-1.6.39.dist-info → h2ogpte-1.6.40rc1.dist-info}/RECORD +56 -32
- {h2ogpte-1.6.39.dist-info → h2ogpte-1.6.40rc1.dist-info}/WHEEL +0 -0
- {h2ogpte-1.6.39.dist-info → h2ogpte-1.6.40rc1.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,1698 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
h2oGPTe REST API
|
|
5
|
+
|
|
6
|
+
# Overview Users can easily interact with the h2oGPTe API through its REST API, allowing HTTP requests from any programming language. ## Authorization: Getting an API key Sign up/in at Enterprise h2oGPTe and generate one of the following two types of API keys: - **Global API key**: If a Collection is not specified when creating a new API Key, that key is considered to be a global API Key. Use global API Keys to grant full user impersonation and system-wide access to all of your work. Anyone with access to one of your global API Keys can create, delete, or interact with any of your past, current, and future Collections, Documents, Chats, and settings. - **Collection-specific API key**: Use Collection-specific API Keys to grant external access to only Chat with a specified Collection and make related API calls to it. Collection-specific API keys do not allow other API calls, such as creation, deletion, or access to other Collections or Chats. Access Enterprise h2oGPTe through your [H2O Generative AI](https://genai.h2o.ai/appstore) app store account, available with a freemium tier. ## Authorization: Using an API key All h2oGPTe REST API requests must include an API Key in the \"Authorization\" HTTP header, formatted as follows: ``` Authorization: Bearer sk-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ``` ```sh curl -X 'POST' \\ 'https://h2ogpte.genai.h2o.ai/api/v1/collections' \\ -H 'accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'Authorization: Bearer sk-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' \\ -d '{ \"name\": \"The name of my Collection\", \"description\": \"The description of my Collection\", \"embedding_model\": \"BAAI/bge-large-en-v1.5\" }' ``` ## Interactive h2oGPTe API testing This page only showcases the h2oGPTe REST API; you can test it directly in the [Swagger UI](https://h2ogpte.genai.h2o.ai/swagger-ui/). Ensure that you are logged into your Enterprise h2oGPTe account.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: v1.0.0
|
|
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 Field, StrictStr, field_validator
|
|
20
|
+
from typing import Any, Dict, List, Optional
|
|
21
|
+
from typing_extensions import Annotated
|
|
22
|
+
from h2ogpte.rest_sync.models.create_secret201_response import CreateSecret201Response
|
|
23
|
+
from h2ogpte.rest_sync.models.create_secret_request import CreateSecretRequest
|
|
24
|
+
from h2ogpte.rest_sync.models.update_secret_request import UpdateSecretRequest
|
|
25
|
+
|
|
26
|
+
from h2ogpte.rest_sync.api_client import ApiClient, RequestSerialized
|
|
27
|
+
from h2ogpte.rest_sync.api_response import ApiResponse
|
|
28
|
+
from h2ogpte.rest_sync.rest import RESTResponseType
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class SecretsApi:
|
|
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 create_secret(
|
|
46
|
+
self,
|
|
47
|
+
create_secret_request: CreateSecretRequest,
|
|
48
|
+
_request_timeout: Union[
|
|
49
|
+
None,
|
|
50
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
51
|
+
Tuple[
|
|
52
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
53
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
54
|
+
]
|
|
55
|
+
] = None,
|
|
56
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
57
|
+
_content_type: Optional[StrictStr] = None,
|
|
58
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
59
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
60
|
+
) -> CreateSecret201Response:
|
|
61
|
+
"""Create a new secret
|
|
62
|
+
|
|
63
|
+
Creates a new secret in SecureStore.
|
|
64
|
+
|
|
65
|
+
:param create_secret_request: (required)
|
|
66
|
+
:type create_secret_request: CreateSecretRequest
|
|
67
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
68
|
+
number provided, it will be total request
|
|
69
|
+
timeout. It can also be a pair (tuple) of
|
|
70
|
+
(connection, read) timeouts.
|
|
71
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
72
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
73
|
+
request; this effectively ignores the
|
|
74
|
+
authentication in the spec for a single request.
|
|
75
|
+
:type _request_auth: dict, optional
|
|
76
|
+
:param _content_type: force content-type for the request.
|
|
77
|
+
:type _content_type: str, Optional
|
|
78
|
+
:param _headers: set to override the headers for a single
|
|
79
|
+
request; this effectively ignores the headers
|
|
80
|
+
in the spec for a single request.
|
|
81
|
+
:type _headers: dict, optional
|
|
82
|
+
:param _host_index: set to override the host_index for a single
|
|
83
|
+
request; this effectively ignores the host_index
|
|
84
|
+
in the spec for a single request.
|
|
85
|
+
:type _host_index: int, optional
|
|
86
|
+
:return: Returns the result object.
|
|
87
|
+
""" # noqa: E501
|
|
88
|
+
|
|
89
|
+
_param = self._create_secret_serialize(
|
|
90
|
+
create_secret_request=create_secret_request,
|
|
91
|
+
_request_auth=_request_auth,
|
|
92
|
+
_content_type=_content_type,
|
|
93
|
+
_headers=_headers,
|
|
94
|
+
_host_index=_host_index
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
98
|
+
'201': "CreateSecret201Response",
|
|
99
|
+
'401': "EndpointError",
|
|
100
|
+
'409': "EndpointError",
|
|
101
|
+
'500': "EndpointError",
|
|
102
|
+
}
|
|
103
|
+
response_data = self.api_client.call_api(
|
|
104
|
+
*_param,
|
|
105
|
+
_request_timeout=_request_timeout
|
|
106
|
+
)
|
|
107
|
+
response_data.read()
|
|
108
|
+
return self.api_client.response_deserialize(
|
|
109
|
+
response_data=response_data,
|
|
110
|
+
response_types_map=_response_types_map,
|
|
111
|
+
).data
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
@validate_call
|
|
115
|
+
def create_secret_with_http_info(
|
|
116
|
+
self,
|
|
117
|
+
create_secret_request: CreateSecretRequest,
|
|
118
|
+
_request_timeout: Union[
|
|
119
|
+
None,
|
|
120
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
121
|
+
Tuple[
|
|
122
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
123
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
124
|
+
]
|
|
125
|
+
] = None,
|
|
126
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
127
|
+
_content_type: Optional[StrictStr] = None,
|
|
128
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
129
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
130
|
+
) -> ApiResponse[CreateSecret201Response]:
|
|
131
|
+
"""Create a new secret
|
|
132
|
+
|
|
133
|
+
Creates a new secret in SecureStore.
|
|
134
|
+
|
|
135
|
+
:param create_secret_request: (required)
|
|
136
|
+
:type create_secret_request: CreateSecretRequest
|
|
137
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
138
|
+
number provided, it will be total request
|
|
139
|
+
timeout. It can also be a pair (tuple) of
|
|
140
|
+
(connection, read) timeouts.
|
|
141
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
142
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
143
|
+
request; this effectively ignores the
|
|
144
|
+
authentication in the spec for a single request.
|
|
145
|
+
:type _request_auth: dict, optional
|
|
146
|
+
:param _content_type: force content-type for the request.
|
|
147
|
+
:type _content_type: str, Optional
|
|
148
|
+
:param _headers: set to override the headers for a single
|
|
149
|
+
request; this effectively ignores the headers
|
|
150
|
+
in the spec for a single request.
|
|
151
|
+
:type _headers: dict, optional
|
|
152
|
+
:param _host_index: set to override the host_index for a single
|
|
153
|
+
request; this effectively ignores the host_index
|
|
154
|
+
in the spec for a single request.
|
|
155
|
+
:type _host_index: int, optional
|
|
156
|
+
:return: Returns the result object.
|
|
157
|
+
""" # noqa: E501
|
|
158
|
+
|
|
159
|
+
_param = self._create_secret_serialize(
|
|
160
|
+
create_secret_request=create_secret_request,
|
|
161
|
+
_request_auth=_request_auth,
|
|
162
|
+
_content_type=_content_type,
|
|
163
|
+
_headers=_headers,
|
|
164
|
+
_host_index=_host_index
|
|
165
|
+
)
|
|
166
|
+
|
|
167
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
168
|
+
'201': "CreateSecret201Response",
|
|
169
|
+
'401': "EndpointError",
|
|
170
|
+
'409': "EndpointError",
|
|
171
|
+
'500': "EndpointError",
|
|
172
|
+
}
|
|
173
|
+
response_data = self.api_client.call_api(
|
|
174
|
+
*_param,
|
|
175
|
+
_request_timeout=_request_timeout
|
|
176
|
+
)
|
|
177
|
+
response_data.read()
|
|
178
|
+
return self.api_client.response_deserialize(
|
|
179
|
+
response_data=response_data,
|
|
180
|
+
response_types_map=_response_types_map,
|
|
181
|
+
)
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
@validate_call
|
|
185
|
+
def create_secret_without_preload_content(
|
|
186
|
+
self,
|
|
187
|
+
create_secret_request: CreateSecretRequest,
|
|
188
|
+
_request_timeout: Union[
|
|
189
|
+
None,
|
|
190
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
191
|
+
Tuple[
|
|
192
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
193
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
194
|
+
]
|
|
195
|
+
] = None,
|
|
196
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
197
|
+
_content_type: Optional[StrictStr] = None,
|
|
198
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
199
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
200
|
+
) -> RESTResponseType:
|
|
201
|
+
"""Create a new secret
|
|
202
|
+
|
|
203
|
+
Creates a new secret in SecureStore.
|
|
204
|
+
|
|
205
|
+
:param create_secret_request: (required)
|
|
206
|
+
:type create_secret_request: CreateSecretRequest
|
|
207
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
208
|
+
number provided, it will be total request
|
|
209
|
+
timeout. It can also be a pair (tuple) of
|
|
210
|
+
(connection, read) timeouts.
|
|
211
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
212
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
213
|
+
request; this effectively ignores the
|
|
214
|
+
authentication in the spec for a single request.
|
|
215
|
+
:type _request_auth: dict, optional
|
|
216
|
+
:param _content_type: force content-type for the request.
|
|
217
|
+
:type _content_type: str, Optional
|
|
218
|
+
:param _headers: set to override the headers for a single
|
|
219
|
+
request; this effectively ignores the headers
|
|
220
|
+
in the spec for a single request.
|
|
221
|
+
:type _headers: dict, optional
|
|
222
|
+
:param _host_index: set to override the host_index for a single
|
|
223
|
+
request; this effectively ignores the host_index
|
|
224
|
+
in the spec for a single request.
|
|
225
|
+
:type _host_index: int, optional
|
|
226
|
+
:return: Returns the result object.
|
|
227
|
+
""" # noqa: E501
|
|
228
|
+
|
|
229
|
+
_param = self._create_secret_serialize(
|
|
230
|
+
create_secret_request=create_secret_request,
|
|
231
|
+
_request_auth=_request_auth,
|
|
232
|
+
_content_type=_content_type,
|
|
233
|
+
_headers=_headers,
|
|
234
|
+
_host_index=_host_index
|
|
235
|
+
)
|
|
236
|
+
|
|
237
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
238
|
+
'201': "CreateSecret201Response",
|
|
239
|
+
'401': "EndpointError",
|
|
240
|
+
'409': "EndpointError",
|
|
241
|
+
'500': "EndpointError",
|
|
242
|
+
}
|
|
243
|
+
response_data = self.api_client.call_api(
|
|
244
|
+
*_param,
|
|
245
|
+
_request_timeout=_request_timeout
|
|
246
|
+
)
|
|
247
|
+
return response_data.response
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
def _create_secret_serialize(
|
|
251
|
+
self,
|
|
252
|
+
create_secret_request,
|
|
253
|
+
_request_auth,
|
|
254
|
+
_content_type,
|
|
255
|
+
_headers,
|
|
256
|
+
_host_index,
|
|
257
|
+
) -> RequestSerialized:
|
|
258
|
+
|
|
259
|
+
_host = None
|
|
260
|
+
|
|
261
|
+
_collection_formats: Dict[str, str] = {
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
_path_params: Dict[str, str] = {}
|
|
265
|
+
_query_params: List[Tuple[str, str]] = []
|
|
266
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
267
|
+
_form_params: List[Tuple[str, str]] = []
|
|
268
|
+
_files: Dict[
|
|
269
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
270
|
+
] = {}
|
|
271
|
+
_body_params: Optional[bytes] = None
|
|
272
|
+
|
|
273
|
+
# process the path parameters
|
|
274
|
+
# process the query parameters
|
|
275
|
+
# process the header parameters
|
|
276
|
+
# process the form parameters
|
|
277
|
+
# process the body parameter
|
|
278
|
+
if create_secret_request is not None:
|
|
279
|
+
_body_params = create_secret_request
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
# set the HTTP header `Accept`
|
|
283
|
+
if 'Accept' not in _header_params:
|
|
284
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
285
|
+
[
|
|
286
|
+
'application/json'
|
|
287
|
+
]
|
|
288
|
+
)
|
|
289
|
+
|
|
290
|
+
# set the HTTP header `Content-Type`
|
|
291
|
+
if _content_type:
|
|
292
|
+
_header_params['Content-Type'] = _content_type
|
|
293
|
+
else:
|
|
294
|
+
_default_content_type = (
|
|
295
|
+
self.api_client.select_header_content_type(
|
|
296
|
+
[
|
|
297
|
+
'application/json'
|
|
298
|
+
]
|
|
299
|
+
)
|
|
300
|
+
)
|
|
301
|
+
if _default_content_type is not None:
|
|
302
|
+
_header_params['Content-Type'] = _default_content_type
|
|
303
|
+
|
|
304
|
+
# authentication setting
|
|
305
|
+
_auth_settings: List[str] = [
|
|
306
|
+
'bearerAuth'
|
|
307
|
+
]
|
|
308
|
+
|
|
309
|
+
return self.api_client.param_serialize(
|
|
310
|
+
method='POST',
|
|
311
|
+
resource_path='/secrets',
|
|
312
|
+
path_params=_path_params,
|
|
313
|
+
query_params=_query_params,
|
|
314
|
+
header_params=_header_params,
|
|
315
|
+
body=_body_params,
|
|
316
|
+
post_params=_form_params,
|
|
317
|
+
files=_files,
|
|
318
|
+
auth_settings=_auth_settings,
|
|
319
|
+
collection_formats=_collection_formats,
|
|
320
|
+
_host=_host,
|
|
321
|
+
_request_auth=_request_auth
|
|
322
|
+
)
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
@validate_call
|
|
328
|
+
def delete_secret(
|
|
329
|
+
self,
|
|
330
|
+
secret_id: Annotated[StrictStr, Field(description="The ID of the secret to delete")],
|
|
331
|
+
_request_timeout: Union[
|
|
332
|
+
None,
|
|
333
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
334
|
+
Tuple[
|
|
335
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
336
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
337
|
+
]
|
|
338
|
+
] = None,
|
|
339
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
340
|
+
_content_type: Optional[StrictStr] = None,
|
|
341
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
342
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
343
|
+
) -> None:
|
|
344
|
+
"""Delete a secret
|
|
345
|
+
|
|
346
|
+
Deletes a secret from SecureStore by its ID.
|
|
347
|
+
|
|
348
|
+
:param secret_id: The ID of the secret to delete (required)
|
|
349
|
+
:type secret_id: str
|
|
350
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
351
|
+
number provided, it will be total request
|
|
352
|
+
timeout. It can also be a pair (tuple) of
|
|
353
|
+
(connection, read) timeouts.
|
|
354
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
355
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
356
|
+
request; this effectively ignores the
|
|
357
|
+
authentication in the spec for a single request.
|
|
358
|
+
:type _request_auth: dict, optional
|
|
359
|
+
:param _content_type: force content-type for the request.
|
|
360
|
+
:type _content_type: str, Optional
|
|
361
|
+
:param _headers: set to override the headers for a single
|
|
362
|
+
request; this effectively ignores the headers
|
|
363
|
+
in the spec for a single request.
|
|
364
|
+
:type _headers: dict, optional
|
|
365
|
+
:param _host_index: set to override the host_index for a single
|
|
366
|
+
request; this effectively ignores the host_index
|
|
367
|
+
in the spec for a single request.
|
|
368
|
+
:type _host_index: int, optional
|
|
369
|
+
:return: Returns the result object.
|
|
370
|
+
""" # noqa: E501
|
|
371
|
+
|
|
372
|
+
_param = self._delete_secret_serialize(
|
|
373
|
+
secret_id=secret_id,
|
|
374
|
+
_request_auth=_request_auth,
|
|
375
|
+
_content_type=_content_type,
|
|
376
|
+
_headers=_headers,
|
|
377
|
+
_host_index=_host_index
|
|
378
|
+
)
|
|
379
|
+
|
|
380
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
381
|
+
'200': None,
|
|
382
|
+
'401': "EndpointError",
|
|
383
|
+
'404': "EndpointError",
|
|
384
|
+
'500': "EndpointError",
|
|
385
|
+
}
|
|
386
|
+
response_data = self.api_client.call_api(
|
|
387
|
+
*_param,
|
|
388
|
+
_request_timeout=_request_timeout
|
|
389
|
+
)
|
|
390
|
+
response_data.read()
|
|
391
|
+
return self.api_client.response_deserialize(
|
|
392
|
+
response_data=response_data,
|
|
393
|
+
response_types_map=_response_types_map,
|
|
394
|
+
).data
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
@validate_call
|
|
398
|
+
def delete_secret_with_http_info(
|
|
399
|
+
self,
|
|
400
|
+
secret_id: Annotated[StrictStr, Field(description="The ID of the secret to delete")],
|
|
401
|
+
_request_timeout: Union[
|
|
402
|
+
None,
|
|
403
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
404
|
+
Tuple[
|
|
405
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
406
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
407
|
+
]
|
|
408
|
+
] = None,
|
|
409
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
410
|
+
_content_type: Optional[StrictStr] = None,
|
|
411
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
412
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
413
|
+
) -> ApiResponse[None]:
|
|
414
|
+
"""Delete a secret
|
|
415
|
+
|
|
416
|
+
Deletes a secret from SecureStore by its ID.
|
|
417
|
+
|
|
418
|
+
:param secret_id: The ID of the secret to delete (required)
|
|
419
|
+
:type secret_id: str
|
|
420
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
421
|
+
number provided, it will be total request
|
|
422
|
+
timeout. It can also be a pair (tuple) of
|
|
423
|
+
(connection, read) timeouts.
|
|
424
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
425
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
426
|
+
request; this effectively ignores the
|
|
427
|
+
authentication in the spec for a single request.
|
|
428
|
+
:type _request_auth: dict, optional
|
|
429
|
+
:param _content_type: force content-type for the request.
|
|
430
|
+
:type _content_type: str, Optional
|
|
431
|
+
:param _headers: set to override the headers for a single
|
|
432
|
+
request; this effectively ignores the headers
|
|
433
|
+
in the spec for a single request.
|
|
434
|
+
:type _headers: dict, optional
|
|
435
|
+
:param _host_index: set to override the host_index for a single
|
|
436
|
+
request; this effectively ignores the host_index
|
|
437
|
+
in the spec for a single request.
|
|
438
|
+
:type _host_index: int, optional
|
|
439
|
+
:return: Returns the result object.
|
|
440
|
+
""" # noqa: E501
|
|
441
|
+
|
|
442
|
+
_param = self._delete_secret_serialize(
|
|
443
|
+
secret_id=secret_id,
|
|
444
|
+
_request_auth=_request_auth,
|
|
445
|
+
_content_type=_content_type,
|
|
446
|
+
_headers=_headers,
|
|
447
|
+
_host_index=_host_index
|
|
448
|
+
)
|
|
449
|
+
|
|
450
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
451
|
+
'200': None,
|
|
452
|
+
'401': "EndpointError",
|
|
453
|
+
'404': "EndpointError",
|
|
454
|
+
'500': "EndpointError",
|
|
455
|
+
}
|
|
456
|
+
response_data = self.api_client.call_api(
|
|
457
|
+
*_param,
|
|
458
|
+
_request_timeout=_request_timeout
|
|
459
|
+
)
|
|
460
|
+
response_data.read()
|
|
461
|
+
return self.api_client.response_deserialize(
|
|
462
|
+
response_data=response_data,
|
|
463
|
+
response_types_map=_response_types_map,
|
|
464
|
+
)
|
|
465
|
+
|
|
466
|
+
|
|
467
|
+
@validate_call
|
|
468
|
+
def delete_secret_without_preload_content(
|
|
469
|
+
self,
|
|
470
|
+
secret_id: Annotated[StrictStr, Field(description="The ID of the secret to delete")],
|
|
471
|
+
_request_timeout: Union[
|
|
472
|
+
None,
|
|
473
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
474
|
+
Tuple[
|
|
475
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
476
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
477
|
+
]
|
|
478
|
+
] = None,
|
|
479
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
480
|
+
_content_type: Optional[StrictStr] = None,
|
|
481
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
482
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
483
|
+
) -> RESTResponseType:
|
|
484
|
+
"""Delete a secret
|
|
485
|
+
|
|
486
|
+
Deletes a secret from SecureStore by its ID.
|
|
487
|
+
|
|
488
|
+
:param secret_id: The ID of the secret to delete (required)
|
|
489
|
+
:type secret_id: str
|
|
490
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
491
|
+
number provided, it will be total request
|
|
492
|
+
timeout. It can also be a pair (tuple) of
|
|
493
|
+
(connection, read) timeouts.
|
|
494
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
495
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
496
|
+
request; this effectively ignores the
|
|
497
|
+
authentication in the spec for a single request.
|
|
498
|
+
:type _request_auth: dict, optional
|
|
499
|
+
:param _content_type: force content-type for the request.
|
|
500
|
+
:type _content_type: str, Optional
|
|
501
|
+
:param _headers: set to override the headers for a single
|
|
502
|
+
request; this effectively ignores the headers
|
|
503
|
+
in the spec for a single request.
|
|
504
|
+
:type _headers: dict, optional
|
|
505
|
+
:param _host_index: set to override the host_index for a single
|
|
506
|
+
request; this effectively ignores the host_index
|
|
507
|
+
in the spec for a single request.
|
|
508
|
+
:type _host_index: int, optional
|
|
509
|
+
:return: Returns the result object.
|
|
510
|
+
""" # noqa: E501
|
|
511
|
+
|
|
512
|
+
_param = self._delete_secret_serialize(
|
|
513
|
+
secret_id=secret_id,
|
|
514
|
+
_request_auth=_request_auth,
|
|
515
|
+
_content_type=_content_type,
|
|
516
|
+
_headers=_headers,
|
|
517
|
+
_host_index=_host_index
|
|
518
|
+
)
|
|
519
|
+
|
|
520
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
521
|
+
'200': None,
|
|
522
|
+
'401': "EndpointError",
|
|
523
|
+
'404': "EndpointError",
|
|
524
|
+
'500': "EndpointError",
|
|
525
|
+
}
|
|
526
|
+
response_data = self.api_client.call_api(
|
|
527
|
+
*_param,
|
|
528
|
+
_request_timeout=_request_timeout
|
|
529
|
+
)
|
|
530
|
+
return response_data.response
|
|
531
|
+
|
|
532
|
+
|
|
533
|
+
def _delete_secret_serialize(
|
|
534
|
+
self,
|
|
535
|
+
secret_id,
|
|
536
|
+
_request_auth,
|
|
537
|
+
_content_type,
|
|
538
|
+
_headers,
|
|
539
|
+
_host_index,
|
|
540
|
+
) -> RequestSerialized:
|
|
541
|
+
|
|
542
|
+
_host = None
|
|
543
|
+
|
|
544
|
+
_collection_formats: Dict[str, str] = {
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
_path_params: Dict[str, str] = {}
|
|
548
|
+
_query_params: List[Tuple[str, str]] = []
|
|
549
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
550
|
+
_form_params: List[Tuple[str, str]] = []
|
|
551
|
+
_files: Dict[
|
|
552
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
553
|
+
] = {}
|
|
554
|
+
_body_params: Optional[bytes] = None
|
|
555
|
+
|
|
556
|
+
# process the path parameters
|
|
557
|
+
if secret_id is not None:
|
|
558
|
+
_path_params['secret_id'] = secret_id
|
|
559
|
+
# process the query parameters
|
|
560
|
+
# process the header parameters
|
|
561
|
+
# process the form parameters
|
|
562
|
+
# process the body parameter
|
|
563
|
+
|
|
564
|
+
|
|
565
|
+
# set the HTTP header `Accept`
|
|
566
|
+
if 'Accept' not in _header_params:
|
|
567
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
568
|
+
[
|
|
569
|
+
'application/json'
|
|
570
|
+
]
|
|
571
|
+
)
|
|
572
|
+
|
|
573
|
+
|
|
574
|
+
# authentication setting
|
|
575
|
+
_auth_settings: List[str] = [
|
|
576
|
+
'bearerAuth'
|
|
577
|
+
]
|
|
578
|
+
|
|
579
|
+
return self.api_client.param_serialize(
|
|
580
|
+
method='DELETE',
|
|
581
|
+
resource_path='/secrets/{secret_id}',
|
|
582
|
+
path_params=_path_params,
|
|
583
|
+
query_params=_query_params,
|
|
584
|
+
header_params=_header_params,
|
|
585
|
+
body=_body_params,
|
|
586
|
+
post_params=_form_params,
|
|
587
|
+
files=_files,
|
|
588
|
+
auth_settings=_auth_settings,
|
|
589
|
+
collection_formats=_collection_formats,
|
|
590
|
+
_host=_host,
|
|
591
|
+
_request_auth=_request_auth
|
|
592
|
+
)
|
|
593
|
+
|
|
594
|
+
|
|
595
|
+
|
|
596
|
+
|
|
597
|
+
@validate_call
|
|
598
|
+
def get_secret(
|
|
599
|
+
self,
|
|
600
|
+
secret_id: Annotated[StrictStr, Field(description="The ID of the secret to retrieve")],
|
|
601
|
+
_request_timeout: Union[
|
|
602
|
+
None,
|
|
603
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
604
|
+
Tuple[
|
|
605
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
606
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
607
|
+
]
|
|
608
|
+
] = None,
|
|
609
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
610
|
+
_content_type: Optional[StrictStr] = None,
|
|
611
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
612
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
613
|
+
) -> Dict[str, object]:
|
|
614
|
+
"""Get a secret by ID
|
|
615
|
+
|
|
616
|
+
Retrieves a secret from SecureStore by its ID.
|
|
617
|
+
|
|
618
|
+
:param secret_id: The ID of the secret to retrieve (required)
|
|
619
|
+
:type secret_id: str
|
|
620
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
621
|
+
number provided, it will be total request
|
|
622
|
+
timeout. It can also be a pair (tuple) of
|
|
623
|
+
(connection, read) timeouts.
|
|
624
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
625
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
626
|
+
request; this effectively ignores the
|
|
627
|
+
authentication in the spec for a single request.
|
|
628
|
+
:type _request_auth: dict, optional
|
|
629
|
+
:param _content_type: force content-type for the request.
|
|
630
|
+
:type _content_type: str, Optional
|
|
631
|
+
:param _headers: set to override the headers for a single
|
|
632
|
+
request; this effectively ignores the headers
|
|
633
|
+
in the spec for a single request.
|
|
634
|
+
:type _headers: dict, optional
|
|
635
|
+
:param _host_index: set to override the host_index for a single
|
|
636
|
+
request; this effectively ignores the host_index
|
|
637
|
+
in the spec for a single request.
|
|
638
|
+
:type _host_index: int, optional
|
|
639
|
+
:return: Returns the result object.
|
|
640
|
+
""" # noqa: E501
|
|
641
|
+
|
|
642
|
+
_param = self._get_secret_serialize(
|
|
643
|
+
secret_id=secret_id,
|
|
644
|
+
_request_auth=_request_auth,
|
|
645
|
+
_content_type=_content_type,
|
|
646
|
+
_headers=_headers,
|
|
647
|
+
_host_index=_host_index
|
|
648
|
+
)
|
|
649
|
+
|
|
650
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
651
|
+
'200': "Dict[str, object]",
|
|
652
|
+
'401': "EndpointError",
|
|
653
|
+
'404': "EndpointError",
|
|
654
|
+
'500': "EndpointError",
|
|
655
|
+
}
|
|
656
|
+
response_data = self.api_client.call_api(
|
|
657
|
+
*_param,
|
|
658
|
+
_request_timeout=_request_timeout
|
|
659
|
+
)
|
|
660
|
+
response_data.read()
|
|
661
|
+
return self.api_client.response_deserialize(
|
|
662
|
+
response_data=response_data,
|
|
663
|
+
response_types_map=_response_types_map,
|
|
664
|
+
).data
|
|
665
|
+
|
|
666
|
+
|
|
667
|
+
@validate_call
|
|
668
|
+
def get_secret_with_http_info(
|
|
669
|
+
self,
|
|
670
|
+
secret_id: Annotated[StrictStr, Field(description="The ID of the secret to retrieve")],
|
|
671
|
+
_request_timeout: Union[
|
|
672
|
+
None,
|
|
673
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
674
|
+
Tuple[
|
|
675
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
676
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
677
|
+
]
|
|
678
|
+
] = None,
|
|
679
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
680
|
+
_content_type: Optional[StrictStr] = None,
|
|
681
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
682
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
683
|
+
) -> ApiResponse[Dict[str, object]]:
|
|
684
|
+
"""Get a secret by ID
|
|
685
|
+
|
|
686
|
+
Retrieves a secret from SecureStore by its ID.
|
|
687
|
+
|
|
688
|
+
:param secret_id: The ID of the secret to retrieve (required)
|
|
689
|
+
:type secret_id: str
|
|
690
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
691
|
+
number provided, it will be total request
|
|
692
|
+
timeout. It can also be a pair (tuple) of
|
|
693
|
+
(connection, read) timeouts.
|
|
694
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
695
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
696
|
+
request; this effectively ignores the
|
|
697
|
+
authentication in the spec for a single request.
|
|
698
|
+
:type _request_auth: dict, optional
|
|
699
|
+
:param _content_type: force content-type for the request.
|
|
700
|
+
:type _content_type: str, Optional
|
|
701
|
+
:param _headers: set to override the headers for a single
|
|
702
|
+
request; this effectively ignores the headers
|
|
703
|
+
in the spec for a single request.
|
|
704
|
+
:type _headers: dict, optional
|
|
705
|
+
:param _host_index: set to override the host_index for a single
|
|
706
|
+
request; this effectively ignores the host_index
|
|
707
|
+
in the spec for a single request.
|
|
708
|
+
:type _host_index: int, optional
|
|
709
|
+
:return: Returns the result object.
|
|
710
|
+
""" # noqa: E501
|
|
711
|
+
|
|
712
|
+
_param = self._get_secret_serialize(
|
|
713
|
+
secret_id=secret_id,
|
|
714
|
+
_request_auth=_request_auth,
|
|
715
|
+
_content_type=_content_type,
|
|
716
|
+
_headers=_headers,
|
|
717
|
+
_host_index=_host_index
|
|
718
|
+
)
|
|
719
|
+
|
|
720
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
721
|
+
'200': "Dict[str, object]",
|
|
722
|
+
'401': "EndpointError",
|
|
723
|
+
'404': "EndpointError",
|
|
724
|
+
'500': "EndpointError",
|
|
725
|
+
}
|
|
726
|
+
response_data = self.api_client.call_api(
|
|
727
|
+
*_param,
|
|
728
|
+
_request_timeout=_request_timeout
|
|
729
|
+
)
|
|
730
|
+
response_data.read()
|
|
731
|
+
return self.api_client.response_deserialize(
|
|
732
|
+
response_data=response_data,
|
|
733
|
+
response_types_map=_response_types_map,
|
|
734
|
+
)
|
|
735
|
+
|
|
736
|
+
|
|
737
|
+
@validate_call
|
|
738
|
+
def get_secret_without_preload_content(
|
|
739
|
+
self,
|
|
740
|
+
secret_id: Annotated[StrictStr, Field(description="The ID of the secret to retrieve")],
|
|
741
|
+
_request_timeout: Union[
|
|
742
|
+
None,
|
|
743
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
744
|
+
Tuple[
|
|
745
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
746
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
747
|
+
]
|
|
748
|
+
] = None,
|
|
749
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
750
|
+
_content_type: Optional[StrictStr] = None,
|
|
751
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
752
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
753
|
+
) -> RESTResponseType:
|
|
754
|
+
"""Get a secret by ID
|
|
755
|
+
|
|
756
|
+
Retrieves a secret from SecureStore by its ID.
|
|
757
|
+
|
|
758
|
+
:param secret_id: The ID of the secret to retrieve (required)
|
|
759
|
+
:type secret_id: str
|
|
760
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
761
|
+
number provided, it will be total request
|
|
762
|
+
timeout. It can also be a pair (tuple) of
|
|
763
|
+
(connection, read) timeouts.
|
|
764
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
765
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
766
|
+
request; this effectively ignores the
|
|
767
|
+
authentication in the spec for a single request.
|
|
768
|
+
:type _request_auth: dict, optional
|
|
769
|
+
:param _content_type: force content-type for the request.
|
|
770
|
+
:type _content_type: str, Optional
|
|
771
|
+
:param _headers: set to override the headers for a single
|
|
772
|
+
request; this effectively ignores the headers
|
|
773
|
+
in the spec for a single request.
|
|
774
|
+
:type _headers: dict, optional
|
|
775
|
+
:param _host_index: set to override the host_index for a single
|
|
776
|
+
request; this effectively ignores the host_index
|
|
777
|
+
in the spec for a single request.
|
|
778
|
+
:type _host_index: int, optional
|
|
779
|
+
:return: Returns the result object.
|
|
780
|
+
""" # noqa: E501
|
|
781
|
+
|
|
782
|
+
_param = self._get_secret_serialize(
|
|
783
|
+
secret_id=secret_id,
|
|
784
|
+
_request_auth=_request_auth,
|
|
785
|
+
_content_type=_content_type,
|
|
786
|
+
_headers=_headers,
|
|
787
|
+
_host_index=_host_index
|
|
788
|
+
)
|
|
789
|
+
|
|
790
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
791
|
+
'200': "Dict[str, object]",
|
|
792
|
+
'401': "EndpointError",
|
|
793
|
+
'404': "EndpointError",
|
|
794
|
+
'500': "EndpointError",
|
|
795
|
+
}
|
|
796
|
+
response_data = self.api_client.call_api(
|
|
797
|
+
*_param,
|
|
798
|
+
_request_timeout=_request_timeout
|
|
799
|
+
)
|
|
800
|
+
return response_data.response
|
|
801
|
+
|
|
802
|
+
|
|
803
|
+
def _get_secret_serialize(
|
|
804
|
+
self,
|
|
805
|
+
secret_id,
|
|
806
|
+
_request_auth,
|
|
807
|
+
_content_type,
|
|
808
|
+
_headers,
|
|
809
|
+
_host_index,
|
|
810
|
+
) -> RequestSerialized:
|
|
811
|
+
|
|
812
|
+
_host = None
|
|
813
|
+
|
|
814
|
+
_collection_formats: Dict[str, str] = {
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
_path_params: Dict[str, str] = {}
|
|
818
|
+
_query_params: List[Tuple[str, str]] = []
|
|
819
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
820
|
+
_form_params: List[Tuple[str, str]] = []
|
|
821
|
+
_files: Dict[
|
|
822
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
823
|
+
] = {}
|
|
824
|
+
_body_params: Optional[bytes] = None
|
|
825
|
+
|
|
826
|
+
# process the path parameters
|
|
827
|
+
if secret_id is not None:
|
|
828
|
+
_path_params['secret_id'] = secret_id
|
|
829
|
+
# process the query parameters
|
|
830
|
+
# process the header parameters
|
|
831
|
+
# process the form parameters
|
|
832
|
+
# process the body parameter
|
|
833
|
+
|
|
834
|
+
|
|
835
|
+
# set the HTTP header `Accept`
|
|
836
|
+
if 'Accept' not in _header_params:
|
|
837
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
838
|
+
[
|
|
839
|
+
'application/json'
|
|
840
|
+
]
|
|
841
|
+
)
|
|
842
|
+
|
|
843
|
+
|
|
844
|
+
# authentication setting
|
|
845
|
+
_auth_settings: List[str] = [
|
|
846
|
+
'bearerAuth'
|
|
847
|
+
]
|
|
848
|
+
|
|
849
|
+
return self.api_client.param_serialize(
|
|
850
|
+
method='GET',
|
|
851
|
+
resource_path='/secrets/{secret_id}',
|
|
852
|
+
path_params=_path_params,
|
|
853
|
+
query_params=_query_params,
|
|
854
|
+
header_params=_header_params,
|
|
855
|
+
body=_body_params,
|
|
856
|
+
post_params=_form_params,
|
|
857
|
+
files=_files,
|
|
858
|
+
auth_settings=_auth_settings,
|
|
859
|
+
collection_formats=_collection_formats,
|
|
860
|
+
_host=_host,
|
|
861
|
+
_request_auth=_request_auth
|
|
862
|
+
)
|
|
863
|
+
|
|
864
|
+
|
|
865
|
+
|
|
866
|
+
|
|
867
|
+
@validate_call
|
|
868
|
+
def get_secret_value(
|
|
869
|
+
self,
|
|
870
|
+
secret_id: Annotated[StrictStr, Field(description="The ID of the secret to retrieve the value for")],
|
|
871
|
+
_request_timeout: Union[
|
|
872
|
+
None,
|
|
873
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
874
|
+
Tuple[
|
|
875
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
876
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
877
|
+
]
|
|
878
|
+
] = None,
|
|
879
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
880
|
+
_content_type: Optional[StrictStr] = None,
|
|
881
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
882
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
883
|
+
) -> Dict[str, object]:
|
|
884
|
+
"""Get the value of a secret by ID
|
|
885
|
+
|
|
886
|
+
Retrieves the actual value/credentials of a secret from SecureStore by its ID.
|
|
887
|
+
|
|
888
|
+
:param secret_id: The ID of the secret to retrieve the value for (required)
|
|
889
|
+
:type secret_id: str
|
|
890
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
891
|
+
number provided, it will be total request
|
|
892
|
+
timeout. It can also be a pair (tuple) of
|
|
893
|
+
(connection, read) timeouts.
|
|
894
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
895
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
896
|
+
request; this effectively ignores the
|
|
897
|
+
authentication in the spec for a single request.
|
|
898
|
+
:type _request_auth: dict, optional
|
|
899
|
+
:param _content_type: force content-type for the request.
|
|
900
|
+
:type _content_type: str, Optional
|
|
901
|
+
:param _headers: set to override the headers for a single
|
|
902
|
+
request; this effectively ignores the headers
|
|
903
|
+
in the spec for a single request.
|
|
904
|
+
:type _headers: dict, optional
|
|
905
|
+
:param _host_index: set to override the host_index for a single
|
|
906
|
+
request; this effectively ignores the host_index
|
|
907
|
+
in the spec for a single request.
|
|
908
|
+
:type _host_index: int, optional
|
|
909
|
+
:return: Returns the result object.
|
|
910
|
+
""" # noqa: E501
|
|
911
|
+
|
|
912
|
+
_param = self._get_secret_value_serialize(
|
|
913
|
+
secret_id=secret_id,
|
|
914
|
+
_request_auth=_request_auth,
|
|
915
|
+
_content_type=_content_type,
|
|
916
|
+
_headers=_headers,
|
|
917
|
+
_host_index=_host_index
|
|
918
|
+
)
|
|
919
|
+
|
|
920
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
921
|
+
'200': "Dict[str, object]",
|
|
922
|
+
'401': "EndpointError",
|
|
923
|
+
'404': "EndpointError",
|
|
924
|
+
'500': "EndpointError",
|
|
925
|
+
}
|
|
926
|
+
response_data = self.api_client.call_api(
|
|
927
|
+
*_param,
|
|
928
|
+
_request_timeout=_request_timeout
|
|
929
|
+
)
|
|
930
|
+
response_data.read()
|
|
931
|
+
return self.api_client.response_deserialize(
|
|
932
|
+
response_data=response_data,
|
|
933
|
+
response_types_map=_response_types_map,
|
|
934
|
+
).data
|
|
935
|
+
|
|
936
|
+
|
|
937
|
+
@validate_call
|
|
938
|
+
def get_secret_value_with_http_info(
|
|
939
|
+
self,
|
|
940
|
+
secret_id: Annotated[StrictStr, Field(description="The ID of the secret to retrieve the value for")],
|
|
941
|
+
_request_timeout: Union[
|
|
942
|
+
None,
|
|
943
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
944
|
+
Tuple[
|
|
945
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
946
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
947
|
+
]
|
|
948
|
+
] = None,
|
|
949
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
950
|
+
_content_type: Optional[StrictStr] = None,
|
|
951
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
952
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
953
|
+
) -> ApiResponse[Dict[str, object]]:
|
|
954
|
+
"""Get the value of a secret by ID
|
|
955
|
+
|
|
956
|
+
Retrieves the actual value/credentials of a secret from SecureStore by its ID.
|
|
957
|
+
|
|
958
|
+
:param secret_id: The ID of the secret to retrieve the value for (required)
|
|
959
|
+
:type secret_id: str
|
|
960
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
961
|
+
number provided, it will be total request
|
|
962
|
+
timeout. It can also be a pair (tuple) of
|
|
963
|
+
(connection, read) timeouts.
|
|
964
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
965
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
966
|
+
request; this effectively ignores the
|
|
967
|
+
authentication in the spec for a single request.
|
|
968
|
+
:type _request_auth: dict, optional
|
|
969
|
+
:param _content_type: force content-type for the request.
|
|
970
|
+
:type _content_type: str, Optional
|
|
971
|
+
:param _headers: set to override the headers for a single
|
|
972
|
+
request; this effectively ignores the headers
|
|
973
|
+
in the spec for a single request.
|
|
974
|
+
:type _headers: dict, optional
|
|
975
|
+
:param _host_index: set to override the host_index for a single
|
|
976
|
+
request; this effectively ignores the host_index
|
|
977
|
+
in the spec for a single request.
|
|
978
|
+
:type _host_index: int, optional
|
|
979
|
+
:return: Returns the result object.
|
|
980
|
+
""" # noqa: E501
|
|
981
|
+
|
|
982
|
+
_param = self._get_secret_value_serialize(
|
|
983
|
+
secret_id=secret_id,
|
|
984
|
+
_request_auth=_request_auth,
|
|
985
|
+
_content_type=_content_type,
|
|
986
|
+
_headers=_headers,
|
|
987
|
+
_host_index=_host_index
|
|
988
|
+
)
|
|
989
|
+
|
|
990
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
991
|
+
'200': "Dict[str, object]",
|
|
992
|
+
'401': "EndpointError",
|
|
993
|
+
'404': "EndpointError",
|
|
994
|
+
'500': "EndpointError",
|
|
995
|
+
}
|
|
996
|
+
response_data = self.api_client.call_api(
|
|
997
|
+
*_param,
|
|
998
|
+
_request_timeout=_request_timeout
|
|
999
|
+
)
|
|
1000
|
+
response_data.read()
|
|
1001
|
+
return self.api_client.response_deserialize(
|
|
1002
|
+
response_data=response_data,
|
|
1003
|
+
response_types_map=_response_types_map,
|
|
1004
|
+
)
|
|
1005
|
+
|
|
1006
|
+
|
|
1007
|
+
@validate_call
|
|
1008
|
+
def get_secret_value_without_preload_content(
|
|
1009
|
+
self,
|
|
1010
|
+
secret_id: Annotated[StrictStr, Field(description="The ID of the secret to retrieve the value for")],
|
|
1011
|
+
_request_timeout: Union[
|
|
1012
|
+
None,
|
|
1013
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1014
|
+
Tuple[
|
|
1015
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1016
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1017
|
+
]
|
|
1018
|
+
] = None,
|
|
1019
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1020
|
+
_content_type: Optional[StrictStr] = None,
|
|
1021
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1022
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1023
|
+
) -> RESTResponseType:
|
|
1024
|
+
"""Get the value of a secret by ID
|
|
1025
|
+
|
|
1026
|
+
Retrieves the actual value/credentials of a secret from SecureStore by its ID.
|
|
1027
|
+
|
|
1028
|
+
:param secret_id: The ID of the secret to retrieve the value for (required)
|
|
1029
|
+
:type secret_id: str
|
|
1030
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1031
|
+
number provided, it will be total request
|
|
1032
|
+
timeout. It can also be a pair (tuple) of
|
|
1033
|
+
(connection, read) timeouts.
|
|
1034
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1035
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1036
|
+
request; this effectively ignores the
|
|
1037
|
+
authentication in the spec for a single request.
|
|
1038
|
+
:type _request_auth: dict, optional
|
|
1039
|
+
:param _content_type: force content-type for the request.
|
|
1040
|
+
:type _content_type: str, Optional
|
|
1041
|
+
:param _headers: set to override the headers for a single
|
|
1042
|
+
request; this effectively ignores the headers
|
|
1043
|
+
in the spec for a single request.
|
|
1044
|
+
:type _headers: dict, optional
|
|
1045
|
+
:param _host_index: set to override the host_index for a single
|
|
1046
|
+
request; this effectively ignores the host_index
|
|
1047
|
+
in the spec for a single request.
|
|
1048
|
+
:type _host_index: int, optional
|
|
1049
|
+
:return: Returns the result object.
|
|
1050
|
+
""" # noqa: E501
|
|
1051
|
+
|
|
1052
|
+
_param = self._get_secret_value_serialize(
|
|
1053
|
+
secret_id=secret_id,
|
|
1054
|
+
_request_auth=_request_auth,
|
|
1055
|
+
_content_type=_content_type,
|
|
1056
|
+
_headers=_headers,
|
|
1057
|
+
_host_index=_host_index
|
|
1058
|
+
)
|
|
1059
|
+
|
|
1060
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1061
|
+
'200': "Dict[str, object]",
|
|
1062
|
+
'401': "EndpointError",
|
|
1063
|
+
'404': "EndpointError",
|
|
1064
|
+
'500': "EndpointError",
|
|
1065
|
+
}
|
|
1066
|
+
response_data = self.api_client.call_api(
|
|
1067
|
+
*_param,
|
|
1068
|
+
_request_timeout=_request_timeout
|
|
1069
|
+
)
|
|
1070
|
+
return response_data.response
|
|
1071
|
+
|
|
1072
|
+
|
|
1073
|
+
def _get_secret_value_serialize(
|
|
1074
|
+
self,
|
|
1075
|
+
secret_id,
|
|
1076
|
+
_request_auth,
|
|
1077
|
+
_content_type,
|
|
1078
|
+
_headers,
|
|
1079
|
+
_host_index,
|
|
1080
|
+
) -> RequestSerialized:
|
|
1081
|
+
|
|
1082
|
+
_host = None
|
|
1083
|
+
|
|
1084
|
+
_collection_formats: Dict[str, str] = {
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1087
|
+
_path_params: Dict[str, str] = {}
|
|
1088
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1089
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1090
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1091
|
+
_files: Dict[
|
|
1092
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1093
|
+
] = {}
|
|
1094
|
+
_body_params: Optional[bytes] = None
|
|
1095
|
+
|
|
1096
|
+
# process the path parameters
|
|
1097
|
+
if secret_id is not None:
|
|
1098
|
+
_path_params['secret_id'] = secret_id
|
|
1099
|
+
# process the query parameters
|
|
1100
|
+
# process the header parameters
|
|
1101
|
+
# process the form parameters
|
|
1102
|
+
# process the body parameter
|
|
1103
|
+
|
|
1104
|
+
|
|
1105
|
+
# set the HTTP header `Accept`
|
|
1106
|
+
if 'Accept' not in _header_params:
|
|
1107
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1108
|
+
[
|
|
1109
|
+
'application/json'
|
|
1110
|
+
]
|
|
1111
|
+
)
|
|
1112
|
+
|
|
1113
|
+
|
|
1114
|
+
# authentication setting
|
|
1115
|
+
_auth_settings: List[str] = [
|
|
1116
|
+
'bearerAuth'
|
|
1117
|
+
]
|
|
1118
|
+
|
|
1119
|
+
return self.api_client.param_serialize(
|
|
1120
|
+
method='GET',
|
|
1121
|
+
resource_path='/secrets/{secret_id}/value',
|
|
1122
|
+
path_params=_path_params,
|
|
1123
|
+
query_params=_query_params,
|
|
1124
|
+
header_params=_header_params,
|
|
1125
|
+
body=_body_params,
|
|
1126
|
+
post_params=_form_params,
|
|
1127
|
+
files=_files,
|
|
1128
|
+
auth_settings=_auth_settings,
|
|
1129
|
+
collection_formats=_collection_formats,
|
|
1130
|
+
_host=_host,
|
|
1131
|
+
_request_auth=_request_auth
|
|
1132
|
+
)
|
|
1133
|
+
|
|
1134
|
+
|
|
1135
|
+
|
|
1136
|
+
|
|
1137
|
+
@validate_call
|
|
1138
|
+
def list_secret_ids(
|
|
1139
|
+
self,
|
|
1140
|
+
connector_type: Annotated[Optional[StrictStr], Field(description="Type of connector (s3, gcs, azure_key, azure_sas)")] = None,
|
|
1141
|
+
_request_timeout: Union[
|
|
1142
|
+
None,
|
|
1143
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1144
|
+
Tuple[
|
|
1145
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1146
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1147
|
+
]
|
|
1148
|
+
] = None,
|
|
1149
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1150
|
+
_content_type: Optional[StrictStr] = None,
|
|
1151
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1152
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1153
|
+
) -> List[str]:
|
|
1154
|
+
"""Lists available secret IDs from SecureStore.
|
|
1155
|
+
|
|
1156
|
+
Lists available secret IDs from SecureStore for a specific connector type.
|
|
1157
|
+
|
|
1158
|
+
:param connector_type: Type of connector (s3, gcs, azure_key, azure_sas)
|
|
1159
|
+
:type connector_type: str
|
|
1160
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1161
|
+
number provided, it will be total request
|
|
1162
|
+
timeout. It can also be a pair (tuple) of
|
|
1163
|
+
(connection, read) timeouts.
|
|
1164
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1165
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1166
|
+
request; this effectively ignores the
|
|
1167
|
+
authentication in the spec for a single request.
|
|
1168
|
+
:type _request_auth: dict, optional
|
|
1169
|
+
:param _content_type: force content-type for the request.
|
|
1170
|
+
:type _content_type: str, Optional
|
|
1171
|
+
:param _headers: set to override the headers for a single
|
|
1172
|
+
request; this effectively ignores the headers
|
|
1173
|
+
in the spec for a single request.
|
|
1174
|
+
:type _headers: dict, optional
|
|
1175
|
+
:param _host_index: set to override the host_index for a single
|
|
1176
|
+
request; this effectively ignores the host_index
|
|
1177
|
+
in the spec for a single request.
|
|
1178
|
+
:type _host_index: int, optional
|
|
1179
|
+
:return: Returns the result object.
|
|
1180
|
+
""" # noqa: E501
|
|
1181
|
+
|
|
1182
|
+
_param = self._list_secret_ids_serialize(
|
|
1183
|
+
connector_type=connector_type,
|
|
1184
|
+
_request_auth=_request_auth,
|
|
1185
|
+
_content_type=_content_type,
|
|
1186
|
+
_headers=_headers,
|
|
1187
|
+
_host_index=_host_index
|
|
1188
|
+
)
|
|
1189
|
+
|
|
1190
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1191
|
+
'200': "List[str]",
|
|
1192
|
+
'401': "EndpointError",
|
|
1193
|
+
}
|
|
1194
|
+
response_data = self.api_client.call_api(
|
|
1195
|
+
*_param,
|
|
1196
|
+
_request_timeout=_request_timeout
|
|
1197
|
+
)
|
|
1198
|
+
response_data.read()
|
|
1199
|
+
return self.api_client.response_deserialize(
|
|
1200
|
+
response_data=response_data,
|
|
1201
|
+
response_types_map=_response_types_map,
|
|
1202
|
+
).data
|
|
1203
|
+
|
|
1204
|
+
|
|
1205
|
+
@validate_call
|
|
1206
|
+
def list_secret_ids_with_http_info(
|
|
1207
|
+
self,
|
|
1208
|
+
connector_type: Annotated[Optional[StrictStr], Field(description="Type of connector (s3, gcs, azure_key, azure_sas)")] = None,
|
|
1209
|
+
_request_timeout: Union[
|
|
1210
|
+
None,
|
|
1211
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1212
|
+
Tuple[
|
|
1213
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1214
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1215
|
+
]
|
|
1216
|
+
] = None,
|
|
1217
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1218
|
+
_content_type: Optional[StrictStr] = None,
|
|
1219
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1220
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1221
|
+
) -> ApiResponse[List[str]]:
|
|
1222
|
+
"""Lists available secret IDs from SecureStore.
|
|
1223
|
+
|
|
1224
|
+
Lists available secret IDs from SecureStore for a specific connector type.
|
|
1225
|
+
|
|
1226
|
+
:param connector_type: Type of connector (s3, gcs, azure_key, azure_sas)
|
|
1227
|
+
:type connector_type: str
|
|
1228
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1229
|
+
number provided, it will be total request
|
|
1230
|
+
timeout. It can also be a pair (tuple) of
|
|
1231
|
+
(connection, read) timeouts.
|
|
1232
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1233
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1234
|
+
request; this effectively ignores the
|
|
1235
|
+
authentication in the spec for a single request.
|
|
1236
|
+
:type _request_auth: dict, optional
|
|
1237
|
+
:param _content_type: force content-type for the request.
|
|
1238
|
+
:type _content_type: str, Optional
|
|
1239
|
+
:param _headers: set to override the headers for a single
|
|
1240
|
+
request; this effectively ignores the headers
|
|
1241
|
+
in the spec for a single request.
|
|
1242
|
+
:type _headers: dict, optional
|
|
1243
|
+
:param _host_index: set to override the host_index for a single
|
|
1244
|
+
request; this effectively ignores the host_index
|
|
1245
|
+
in the spec for a single request.
|
|
1246
|
+
:type _host_index: int, optional
|
|
1247
|
+
:return: Returns the result object.
|
|
1248
|
+
""" # noqa: E501
|
|
1249
|
+
|
|
1250
|
+
_param = self._list_secret_ids_serialize(
|
|
1251
|
+
connector_type=connector_type,
|
|
1252
|
+
_request_auth=_request_auth,
|
|
1253
|
+
_content_type=_content_type,
|
|
1254
|
+
_headers=_headers,
|
|
1255
|
+
_host_index=_host_index
|
|
1256
|
+
)
|
|
1257
|
+
|
|
1258
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1259
|
+
'200': "List[str]",
|
|
1260
|
+
'401': "EndpointError",
|
|
1261
|
+
}
|
|
1262
|
+
response_data = self.api_client.call_api(
|
|
1263
|
+
*_param,
|
|
1264
|
+
_request_timeout=_request_timeout
|
|
1265
|
+
)
|
|
1266
|
+
response_data.read()
|
|
1267
|
+
return self.api_client.response_deserialize(
|
|
1268
|
+
response_data=response_data,
|
|
1269
|
+
response_types_map=_response_types_map,
|
|
1270
|
+
)
|
|
1271
|
+
|
|
1272
|
+
|
|
1273
|
+
@validate_call
|
|
1274
|
+
def list_secret_ids_without_preload_content(
|
|
1275
|
+
self,
|
|
1276
|
+
connector_type: Annotated[Optional[StrictStr], Field(description="Type of connector (s3, gcs, azure_key, azure_sas)")] = None,
|
|
1277
|
+
_request_timeout: Union[
|
|
1278
|
+
None,
|
|
1279
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1280
|
+
Tuple[
|
|
1281
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1282
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1283
|
+
]
|
|
1284
|
+
] = None,
|
|
1285
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1286
|
+
_content_type: Optional[StrictStr] = None,
|
|
1287
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1288
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1289
|
+
) -> RESTResponseType:
|
|
1290
|
+
"""Lists available secret IDs from SecureStore.
|
|
1291
|
+
|
|
1292
|
+
Lists available secret IDs from SecureStore for a specific connector type.
|
|
1293
|
+
|
|
1294
|
+
:param connector_type: Type of connector (s3, gcs, azure_key, azure_sas)
|
|
1295
|
+
:type connector_type: str
|
|
1296
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1297
|
+
number provided, it will be total request
|
|
1298
|
+
timeout. It can also be a pair (tuple) of
|
|
1299
|
+
(connection, read) timeouts.
|
|
1300
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1301
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1302
|
+
request; this effectively ignores the
|
|
1303
|
+
authentication in the spec for a single request.
|
|
1304
|
+
:type _request_auth: dict, optional
|
|
1305
|
+
:param _content_type: force content-type for the request.
|
|
1306
|
+
:type _content_type: str, Optional
|
|
1307
|
+
:param _headers: set to override the headers for a single
|
|
1308
|
+
request; this effectively ignores the headers
|
|
1309
|
+
in the spec for a single request.
|
|
1310
|
+
:type _headers: dict, optional
|
|
1311
|
+
:param _host_index: set to override the host_index for a single
|
|
1312
|
+
request; this effectively ignores the host_index
|
|
1313
|
+
in the spec for a single request.
|
|
1314
|
+
:type _host_index: int, optional
|
|
1315
|
+
:return: Returns the result object.
|
|
1316
|
+
""" # noqa: E501
|
|
1317
|
+
|
|
1318
|
+
_param = self._list_secret_ids_serialize(
|
|
1319
|
+
connector_type=connector_type,
|
|
1320
|
+
_request_auth=_request_auth,
|
|
1321
|
+
_content_type=_content_type,
|
|
1322
|
+
_headers=_headers,
|
|
1323
|
+
_host_index=_host_index
|
|
1324
|
+
)
|
|
1325
|
+
|
|
1326
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1327
|
+
'200': "List[str]",
|
|
1328
|
+
'401': "EndpointError",
|
|
1329
|
+
}
|
|
1330
|
+
response_data = self.api_client.call_api(
|
|
1331
|
+
*_param,
|
|
1332
|
+
_request_timeout=_request_timeout
|
|
1333
|
+
)
|
|
1334
|
+
return response_data.response
|
|
1335
|
+
|
|
1336
|
+
|
|
1337
|
+
def _list_secret_ids_serialize(
|
|
1338
|
+
self,
|
|
1339
|
+
connector_type,
|
|
1340
|
+
_request_auth,
|
|
1341
|
+
_content_type,
|
|
1342
|
+
_headers,
|
|
1343
|
+
_host_index,
|
|
1344
|
+
) -> RequestSerialized:
|
|
1345
|
+
|
|
1346
|
+
_host = None
|
|
1347
|
+
|
|
1348
|
+
_collection_formats: Dict[str, str] = {
|
|
1349
|
+
}
|
|
1350
|
+
|
|
1351
|
+
_path_params: Dict[str, str] = {}
|
|
1352
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1353
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1354
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1355
|
+
_files: Dict[
|
|
1356
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1357
|
+
] = {}
|
|
1358
|
+
_body_params: Optional[bytes] = None
|
|
1359
|
+
|
|
1360
|
+
# process the path parameters
|
|
1361
|
+
# process the query parameters
|
|
1362
|
+
if connector_type is not None:
|
|
1363
|
+
|
|
1364
|
+
_query_params.append(('connector_type', connector_type))
|
|
1365
|
+
|
|
1366
|
+
# process the header parameters
|
|
1367
|
+
# process the form parameters
|
|
1368
|
+
# process the body parameter
|
|
1369
|
+
|
|
1370
|
+
|
|
1371
|
+
# set the HTTP header `Accept`
|
|
1372
|
+
if 'Accept' not in _header_params:
|
|
1373
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1374
|
+
[
|
|
1375
|
+
'application/json'
|
|
1376
|
+
]
|
|
1377
|
+
)
|
|
1378
|
+
|
|
1379
|
+
|
|
1380
|
+
# authentication setting
|
|
1381
|
+
_auth_settings: List[str] = [
|
|
1382
|
+
'bearerAuth'
|
|
1383
|
+
]
|
|
1384
|
+
|
|
1385
|
+
return self.api_client.param_serialize(
|
|
1386
|
+
method='GET',
|
|
1387
|
+
resource_path='/secrets/ids',
|
|
1388
|
+
path_params=_path_params,
|
|
1389
|
+
query_params=_query_params,
|
|
1390
|
+
header_params=_header_params,
|
|
1391
|
+
body=_body_params,
|
|
1392
|
+
post_params=_form_params,
|
|
1393
|
+
files=_files,
|
|
1394
|
+
auth_settings=_auth_settings,
|
|
1395
|
+
collection_formats=_collection_formats,
|
|
1396
|
+
_host=_host,
|
|
1397
|
+
_request_auth=_request_auth
|
|
1398
|
+
)
|
|
1399
|
+
|
|
1400
|
+
|
|
1401
|
+
|
|
1402
|
+
|
|
1403
|
+
@validate_call
|
|
1404
|
+
def update_secret(
|
|
1405
|
+
self,
|
|
1406
|
+
secret_id: Annotated[StrictStr, Field(description="The ID of the secret to update")],
|
|
1407
|
+
update_secret_request: UpdateSecretRequest,
|
|
1408
|
+
_request_timeout: Union[
|
|
1409
|
+
None,
|
|
1410
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1411
|
+
Tuple[
|
|
1412
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1413
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1414
|
+
]
|
|
1415
|
+
] = None,
|
|
1416
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1417
|
+
_content_type: Optional[StrictStr] = None,
|
|
1418
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1419
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1420
|
+
) -> None:
|
|
1421
|
+
"""Update a secret
|
|
1422
|
+
|
|
1423
|
+
Updates an existing secret in SecureStore.
|
|
1424
|
+
|
|
1425
|
+
:param secret_id: The ID of the secret to update (required)
|
|
1426
|
+
:type secret_id: str
|
|
1427
|
+
:param update_secret_request: (required)
|
|
1428
|
+
:type update_secret_request: UpdateSecretRequest
|
|
1429
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1430
|
+
number provided, it will be total request
|
|
1431
|
+
timeout. It can also be a pair (tuple) of
|
|
1432
|
+
(connection, read) timeouts.
|
|
1433
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1434
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1435
|
+
request; this effectively ignores the
|
|
1436
|
+
authentication in the spec for a single request.
|
|
1437
|
+
:type _request_auth: dict, optional
|
|
1438
|
+
:param _content_type: force content-type for the request.
|
|
1439
|
+
:type _content_type: str, Optional
|
|
1440
|
+
:param _headers: set to override the headers for a single
|
|
1441
|
+
request; this effectively ignores the headers
|
|
1442
|
+
in the spec for a single request.
|
|
1443
|
+
:type _headers: dict, optional
|
|
1444
|
+
:param _host_index: set to override the host_index for a single
|
|
1445
|
+
request; this effectively ignores the host_index
|
|
1446
|
+
in the spec for a single request.
|
|
1447
|
+
:type _host_index: int, optional
|
|
1448
|
+
:return: Returns the result object.
|
|
1449
|
+
""" # noqa: E501
|
|
1450
|
+
|
|
1451
|
+
_param = self._update_secret_serialize(
|
|
1452
|
+
secret_id=secret_id,
|
|
1453
|
+
update_secret_request=update_secret_request,
|
|
1454
|
+
_request_auth=_request_auth,
|
|
1455
|
+
_content_type=_content_type,
|
|
1456
|
+
_headers=_headers,
|
|
1457
|
+
_host_index=_host_index
|
|
1458
|
+
)
|
|
1459
|
+
|
|
1460
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1461
|
+
'200': None,
|
|
1462
|
+
'401': "EndpointError",
|
|
1463
|
+
'404': "EndpointError",
|
|
1464
|
+
'500': "EndpointError",
|
|
1465
|
+
}
|
|
1466
|
+
response_data = self.api_client.call_api(
|
|
1467
|
+
*_param,
|
|
1468
|
+
_request_timeout=_request_timeout
|
|
1469
|
+
)
|
|
1470
|
+
response_data.read()
|
|
1471
|
+
return self.api_client.response_deserialize(
|
|
1472
|
+
response_data=response_data,
|
|
1473
|
+
response_types_map=_response_types_map,
|
|
1474
|
+
).data
|
|
1475
|
+
|
|
1476
|
+
|
|
1477
|
+
@validate_call
|
|
1478
|
+
def update_secret_with_http_info(
|
|
1479
|
+
self,
|
|
1480
|
+
secret_id: Annotated[StrictStr, Field(description="The ID of the secret to update")],
|
|
1481
|
+
update_secret_request: UpdateSecretRequest,
|
|
1482
|
+
_request_timeout: Union[
|
|
1483
|
+
None,
|
|
1484
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1485
|
+
Tuple[
|
|
1486
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1487
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1488
|
+
]
|
|
1489
|
+
] = None,
|
|
1490
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1491
|
+
_content_type: Optional[StrictStr] = None,
|
|
1492
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1493
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1494
|
+
) -> ApiResponse[None]:
|
|
1495
|
+
"""Update a secret
|
|
1496
|
+
|
|
1497
|
+
Updates an existing secret in SecureStore.
|
|
1498
|
+
|
|
1499
|
+
:param secret_id: The ID of the secret to update (required)
|
|
1500
|
+
:type secret_id: str
|
|
1501
|
+
:param update_secret_request: (required)
|
|
1502
|
+
:type update_secret_request: UpdateSecretRequest
|
|
1503
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1504
|
+
number provided, it will be total request
|
|
1505
|
+
timeout. It can also be a pair (tuple) of
|
|
1506
|
+
(connection, read) timeouts.
|
|
1507
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1508
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1509
|
+
request; this effectively ignores the
|
|
1510
|
+
authentication in the spec for a single request.
|
|
1511
|
+
:type _request_auth: dict, optional
|
|
1512
|
+
:param _content_type: force content-type for the request.
|
|
1513
|
+
:type _content_type: str, Optional
|
|
1514
|
+
:param _headers: set to override the headers for a single
|
|
1515
|
+
request; this effectively ignores the headers
|
|
1516
|
+
in the spec for a single request.
|
|
1517
|
+
:type _headers: dict, optional
|
|
1518
|
+
:param _host_index: set to override the host_index for a single
|
|
1519
|
+
request; this effectively ignores the host_index
|
|
1520
|
+
in the spec for a single request.
|
|
1521
|
+
:type _host_index: int, optional
|
|
1522
|
+
:return: Returns the result object.
|
|
1523
|
+
""" # noqa: E501
|
|
1524
|
+
|
|
1525
|
+
_param = self._update_secret_serialize(
|
|
1526
|
+
secret_id=secret_id,
|
|
1527
|
+
update_secret_request=update_secret_request,
|
|
1528
|
+
_request_auth=_request_auth,
|
|
1529
|
+
_content_type=_content_type,
|
|
1530
|
+
_headers=_headers,
|
|
1531
|
+
_host_index=_host_index
|
|
1532
|
+
)
|
|
1533
|
+
|
|
1534
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1535
|
+
'200': None,
|
|
1536
|
+
'401': "EndpointError",
|
|
1537
|
+
'404': "EndpointError",
|
|
1538
|
+
'500': "EndpointError",
|
|
1539
|
+
}
|
|
1540
|
+
response_data = self.api_client.call_api(
|
|
1541
|
+
*_param,
|
|
1542
|
+
_request_timeout=_request_timeout
|
|
1543
|
+
)
|
|
1544
|
+
response_data.read()
|
|
1545
|
+
return self.api_client.response_deserialize(
|
|
1546
|
+
response_data=response_data,
|
|
1547
|
+
response_types_map=_response_types_map,
|
|
1548
|
+
)
|
|
1549
|
+
|
|
1550
|
+
|
|
1551
|
+
@validate_call
|
|
1552
|
+
def update_secret_without_preload_content(
|
|
1553
|
+
self,
|
|
1554
|
+
secret_id: Annotated[StrictStr, Field(description="The ID of the secret to update")],
|
|
1555
|
+
update_secret_request: UpdateSecretRequest,
|
|
1556
|
+
_request_timeout: Union[
|
|
1557
|
+
None,
|
|
1558
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1559
|
+
Tuple[
|
|
1560
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1561
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1562
|
+
]
|
|
1563
|
+
] = None,
|
|
1564
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1565
|
+
_content_type: Optional[StrictStr] = None,
|
|
1566
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1567
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1568
|
+
) -> RESTResponseType:
|
|
1569
|
+
"""Update a secret
|
|
1570
|
+
|
|
1571
|
+
Updates an existing secret in SecureStore.
|
|
1572
|
+
|
|
1573
|
+
:param secret_id: The ID of the secret to update (required)
|
|
1574
|
+
:type secret_id: str
|
|
1575
|
+
:param update_secret_request: (required)
|
|
1576
|
+
:type update_secret_request: UpdateSecretRequest
|
|
1577
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1578
|
+
number provided, it will be total request
|
|
1579
|
+
timeout. It can also be a pair (tuple) of
|
|
1580
|
+
(connection, read) timeouts.
|
|
1581
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1582
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1583
|
+
request; this effectively ignores the
|
|
1584
|
+
authentication in the spec for a single request.
|
|
1585
|
+
:type _request_auth: dict, optional
|
|
1586
|
+
:param _content_type: force content-type for the request.
|
|
1587
|
+
:type _content_type: str, Optional
|
|
1588
|
+
:param _headers: set to override the headers for a single
|
|
1589
|
+
request; this effectively ignores the headers
|
|
1590
|
+
in the spec for a single request.
|
|
1591
|
+
:type _headers: dict, optional
|
|
1592
|
+
:param _host_index: set to override the host_index for a single
|
|
1593
|
+
request; this effectively ignores the host_index
|
|
1594
|
+
in the spec for a single request.
|
|
1595
|
+
:type _host_index: int, optional
|
|
1596
|
+
:return: Returns the result object.
|
|
1597
|
+
""" # noqa: E501
|
|
1598
|
+
|
|
1599
|
+
_param = self._update_secret_serialize(
|
|
1600
|
+
secret_id=secret_id,
|
|
1601
|
+
update_secret_request=update_secret_request,
|
|
1602
|
+
_request_auth=_request_auth,
|
|
1603
|
+
_content_type=_content_type,
|
|
1604
|
+
_headers=_headers,
|
|
1605
|
+
_host_index=_host_index
|
|
1606
|
+
)
|
|
1607
|
+
|
|
1608
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1609
|
+
'200': None,
|
|
1610
|
+
'401': "EndpointError",
|
|
1611
|
+
'404': "EndpointError",
|
|
1612
|
+
'500': "EndpointError",
|
|
1613
|
+
}
|
|
1614
|
+
response_data = self.api_client.call_api(
|
|
1615
|
+
*_param,
|
|
1616
|
+
_request_timeout=_request_timeout
|
|
1617
|
+
)
|
|
1618
|
+
return response_data.response
|
|
1619
|
+
|
|
1620
|
+
|
|
1621
|
+
def _update_secret_serialize(
|
|
1622
|
+
self,
|
|
1623
|
+
secret_id,
|
|
1624
|
+
update_secret_request,
|
|
1625
|
+
_request_auth,
|
|
1626
|
+
_content_type,
|
|
1627
|
+
_headers,
|
|
1628
|
+
_host_index,
|
|
1629
|
+
) -> RequestSerialized:
|
|
1630
|
+
|
|
1631
|
+
_host = None
|
|
1632
|
+
|
|
1633
|
+
_collection_formats: Dict[str, str] = {
|
|
1634
|
+
}
|
|
1635
|
+
|
|
1636
|
+
_path_params: Dict[str, str] = {}
|
|
1637
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1638
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1639
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1640
|
+
_files: Dict[
|
|
1641
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1642
|
+
] = {}
|
|
1643
|
+
_body_params: Optional[bytes] = None
|
|
1644
|
+
|
|
1645
|
+
# process the path parameters
|
|
1646
|
+
if secret_id is not None:
|
|
1647
|
+
_path_params['secret_id'] = secret_id
|
|
1648
|
+
# process the query parameters
|
|
1649
|
+
# process the header parameters
|
|
1650
|
+
# process the form parameters
|
|
1651
|
+
# process the body parameter
|
|
1652
|
+
if update_secret_request is not None:
|
|
1653
|
+
_body_params = update_secret_request
|
|
1654
|
+
|
|
1655
|
+
|
|
1656
|
+
# set the HTTP header `Accept`
|
|
1657
|
+
if 'Accept' not in _header_params:
|
|
1658
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1659
|
+
[
|
|
1660
|
+
'application/json'
|
|
1661
|
+
]
|
|
1662
|
+
)
|
|
1663
|
+
|
|
1664
|
+
# set the HTTP header `Content-Type`
|
|
1665
|
+
if _content_type:
|
|
1666
|
+
_header_params['Content-Type'] = _content_type
|
|
1667
|
+
else:
|
|
1668
|
+
_default_content_type = (
|
|
1669
|
+
self.api_client.select_header_content_type(
|
|
1670
|
+
[
|
|
1671
|
+
'application/json'
|
|
1672
|
+
]
|
|
1673
|
+
)
|
|
1674
|
+
)
|
|
1675
|
+
if _default_content_type is not None:
|
|
1676
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1677
|
+
|
|
1678
|
+
# authentication setting
|
|
1679
|
+
_auth_settings: List[str] = [
|
|
1680
|
+
'bearerAuth'
|
|
1681
|
+
]
|
|
1682
|
+
|
|
1683
|
+
return self.api_client.param_serialize(
|
|
1684
|
+
method='PUT',
|
|
1685
|
+
resource_path='/secrets/{secret_id}',
|
|
1686
|
+
path_params=_path_params,
|
|
1687
|
+
query_params=_query_params,
|
|
1688
|
+
header_params=_header_params,
|
|
1689
|
+
body=_body_params,
|
|
1690
|
+
post_params=_form_params,
|
|
1691
|
+
files=_files,
|
|
1692
|
+
auth_settings=_auth_settings,
|
|
1693
|
+
collection_formats=_collection_formats,
|
|
1694
|
+
_host=_host,
|
|
1695
|
+
_request_auth=_request_auth
|
|
1696
|
+
)
|
|
1697
|
+
|
|
1698
|
+
|