ibm-platform-services 0.68.2__py3-none-any.whl → 0.69.0__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.
- ibm_platform_services/global_search_v2.py +44 -50
- ibm_platform_services/iam_identity_v1.py +595 -616
- ibm_platform_services/version.py +1 -1
- {ibm_platform_services-0.68.2.dist-info → ibm_platform_services-0.69.0.dist-info}/METADATA +2 -2
- {ibm_platform_services-0.68.2.dist-info → ibm_platform_services-0.69.0.dist-info}/RECORD +8 -8
- {ibm_platform_services-0.68.2.dist-info → ibm_platform_services-0.69.0.dist-info}/WHEEL +0 -0
- {ibm_platform_services-0.68.2.dist-info → ibm_platform_services-0.69.0.dist-info}/licenses/LICENSE +0 -0
- {ibm_platform_services-0.68.2.dist-info → ibm_platform_services-0.69.0.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# coding: utf-8
|
|
2
2
|
|
|
3
|
-
# (C) Copyright IBM Corp.
|
|
3
|
+
# (C) Copyright IBM Corp. 2025.
|
|
4
4
|
#
|
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
# you may not use this file except in compliance with the License.
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
# See the License for the specific language governing permissions and
|
|
15
15
|
# limitations under the License.
|
|
16
16
|
|
|
17
|
-
# IBM OpenAPI SDK Code Generator Version: 3.
|
|
17
|
+
# IBM OpenAPI SDK Code Generator Version: 3.100.0-2ad7a784-20250212-162551
|
|
18
18
|
|
|
19
19
|
"""
|
|
20
20
|
Search for resources with the global and shared resource properties repository that is
|
|
@@ -96,7 +96,6 @@ class GlobalSearchV2(BaseService):
|
|
|
96
96
|
sort: Optional[List[str]] = None,
|
|
97
97
|
is_deleted: Optional[str] = None,
|
|
98
98
|
is_reclaimed: Optional[str] = None,
|
|
99
|
-
is_public: Optional[str] = None,
|
|
100
99
|
impersonate_user: Optional[str] = None,
|
|
101
100
|
can_tag: Optional[str] = None,
|
|
102
101
|
is_project_resource: Optional[str] = None,
|
|
@@ -106,21 +105,17 @@ class GlobalSearchV2(BaseService):
|
|
|
106
105
|
Find instances of resources (v3).
|
|
107
106
|
|
|
108
107
|
Find IAM-enabled resources or storage and network resources that run on classic
|
|
109
|
-
infrastructure in a specific account ID.
|
|
110
|
-
To filter results, you can insert a string by using the Lucene syntax and the
|
|
111
|
-
query string is parsed into a series of terms and operators. A term can be a
|
|
112
|
-
single word or a phrase, in which case the search is performed for all the words,
|
|
113
|
-
in the same order. To filter for a specific value regardless of the property that
|
|
114
|
-
contains it, type the search term without specifying a field. Only resources that
|
|
115
|
-
belong to the account ID and that are accessible by the client are returned.
|
|
108
|
+
infrastructure in a specific account ID.
|
|
116
109
|
You must use `/v3/resources/search` when you need to fetch more than `10000`
|
|
117
110
|
resource items. On the first call, the operation returns a live cursor on the data
|
|
118
111
|
that you must use on all the subsequent calls to get the next batch of results
|
|
119
112
|
until you get the empty result set.
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
113
|
+
To filter results, you can apply query strings following the *Lucene* query
|
|
114
|
+
syntax.
|
|
115
|
+
By default, the fields that are returned for every resource are **crn**, **name**,
|
|
116
|
+
**family**, **type**, and **account_id**. You can specify the subset of the fields
|
|
117
|
+
you want in your request using the `fields` request body attribute. Set `"fields":
|
|
118
|
+
["*"]` to discover the complete set of fields which are available to request.
|
|
124
119
|
|
|
125
120
|
:param str query: (optional) The Lucene-formatted query string. Default to
|
|
126
121
|
'*' if not set.
|
|
@@ -131,8 +126,10 @@ class GlobalSearchV2(BaseService):
|
|
|
131
126
|
request.
|
|
132
127
|
:param str search_cursor: (optional) An opaque cursor that is returned on
|
|
133
128
|
each call and that must be set on the subsequent call to get the next batch
|
|
134
|
-
of items.
|
|
135
|
-
present in the
|
|
129
|
+
of items. You can stop paging when the search returns less items than the
|
|
130
|
+
specified `limit` or when the `search_cursor` is not present in the
|
|
131
|
+
response. NOTE: when setting this parameter, any other properties present
|
|
132
|
+
in the body will be ignored.
|
|
136
133
|
:param str x_request_id: (optional) An alphanumeric string that is used to
|
|
137
134
|
trace the request. The value may include ASCII alphanumerics and any of
|
|
138
135
|
following segment separators: space ( ), comma (,), hyphen, (-), and
|
|
@@ -169,10 +166,6 @@ class GlobalSearchV2(BaseService):
|
|
|
169
166
|
(default), true or any. If false, only not reclaimed documents are
|
|
170
167
|
returned; if true, only reclaimed documents are returned; If any, both
|
|
171
168
|
reclaimed and not reclaimed documents are returned.
|
|
172
|
-
:param str is_public: (optional) Determines if public resources should be
|
|
173
|
-
included in result set or not. Possible values are false (default), true or
|
|
174
|
-
any. If false, do not search public resources; if true, search only public
|
|
175
|
-
resources; If any, search also public resources.
|
|
176
169
|
:param str impersonate_user: (optional) The user on whose behalf the search
|
|
177
170
|
must be performed. Only a GhoST admin can impersonate a user, so be sure
|
|
178
171
|
you set a GhoST admin IAM token in the Authorization header if you set this
|
|
@@ -212,7 +205,6 @@ class GlobalSearchV2(BaseService):
|
|
|
212
205
|
'sort': convert_list(sort),
|
|
213
206
|
'is_deleted': is_deleted,
|
|
214
207
|
'is_reclaimed': is_reclaimed,
|
|
215
|
-
'is_public': is_public,
|
|
216
208
|
'impersonate_user': impersonate_user,
|
|
217
209
|
'can_tag': can_tag,
|
|
218
210
|
'is_project_resource': is_project_resource,
|
|
@@ -274,17 +266,6 @@ class SearchEnums:
|
|
|
274
266
|
FALSE = 'false'
|
|
275
267
|
ANY = 'any'
|
|
276
268
|
|
|
277
|
-
class IsPublic(str, Enum):
|
|
278
|
-
"""
|
|
279
|
-
Determines if public resources should be included in result set or not. Possible
|
|
280
|
-
values are false (default), true or any. If false, do not search public resources;
|
|
281
|
-
if true, search only public resources; If any, search also public resources.
|
|
282
|
-
"""
|
|
283
|
-
|
|
284
|
-
TRUE = 'true'
|
|
285
|
-
FALSE = 'false'
|
|
286
|
-
ANY = 'any'
|
|
287
|
-
|
|
288
269
|
class CanTag(str, Enum):
|
|
289
270
|
"""
|
|
290
271
|
Determines if the result set must return the resources that the user can tag or
|
|
@@ -322,6 +303,8 @@ class ResultItem:
|
|
|
322
303
|
other properties that depend on the resource type.
|
|
323
304
|
|
|
324
305
|
:param str crn: Resource identifier in CRN format.
|
|
306
|
+
|
|
307
|
+
This type supports additional properties of type object.
|
|
325
308
|
"""
|
|
326
309
|
|
|
327
310
|
# The set of defined properties for the class
|
|
@@ -330,17 +313,22 @@ class ResultItem:
|
|
|
330
313
|
def __init__(
|
|
331
314
|
self,
|
|
332
315
|
crn: str,
|
|
333
|
-
**kwargs,
|
|
316
|
+
**kwargs: Optional[object],
|
|
334
317
|
) -> None:
|
|
335
318
|
"""
|
|
336
319
|
Initialize a ResultItem object.
|
|
337
320
|
|
|
338
321
|
:param str crn: Resource identifier in CRN format.
|
|
339
|
-
:param **kwargs: (optional)
|
|
322
|
+
:param object **kwargs: (optional) Additional properties of type object
|
|
340
323
|
"""
|
|
341
324
|
self.crn = crn
|
|
342
|
-
for
|
|
343
|
-
|
|
325
|
+
for k, v in kwargs.items():
|
|
326
|
+
if k not in ResultItem._properties:
|
|
327
|
+
if not isinstance(v, object):
|
|
328
|
+
raise ValueError('Value for additional property {} must be of type object'.format(k))
|
|
329
|
+
setattr(self, k, v)
|
|
330
|
+
else:
|
|
331
|
+
raise ValueError('Property {} cannot be specified as an additional property'.format(k))
|
|
344
332
|
|
|
345
333
|
@classmethod
|
|
346
334
|
def from_dict(cls, _dict: Dict) -> 'ResultItem':
|
|
@@ -350,7 +338,11 @@ class ResultItem:
|
|
|
350
338
|
args['crn'] = crn
|
|
351
339
|
else:
|
|
352
340
|
raise ValueError('Required property \'crn\' not present in ResultItem JSON')
|
|
353
|
-
|
|
341
|
+
for k, v in _dict.items():
|
|
342
|
+
if k not in cls._properties:
|
|
343
|
+
if not isinstance(v, object):
|
|
344
|
+
raise ValueError('Value for additional property {} must be of type object'.format(k))
|
|
345
|
+
args[k] = v
|
|
354
346
|
return cls(**args)
|
|
355
347
|
|
|
356
348
|
@classmethod
|
|
@@ -363,8 +355,8 @@ class ResultItem:
|
|
|
363
355
|
_dict = {}
|
|
364
356
|
if hasattr(self, 'crn') and self.crn is not None:
|
|
365
357
|
_dict['crn'] = self.crn
|
|
366
|
-
for
|
|
367
|
-
_dict[
|
|
358
|
+
for k in [_k for _k in vars(self).keys() if _k not in ResultItem._properties]:
|
|
359
|
+
_dict[k] = getattr(self, k)
|
|
368
360
|
return _dict
|
|
369
361
|
|
|
370
362
|
def _to_dict(self):
|
|
@@ -372,21 +364,23 @@ class ResultItem:
|
|
|
372
364
|
return self.to_dict()
|
|
373
365
|
|
|
374
366
|
def get_properties(self) -> Dict:
|
|
375
|
-
"""Return
|
|
367
|
+
"""Return the additional properties from this instance of ResultItem in the form of a dict."""
|
|
376
368
|
_dict = {}
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
_dict[_key] = getattr(self, _key)
|
|
369
|
+
for k in [_k for _k in vars(self).keys() if _k not in ResultItem._properties]:
|
|
370
|
+
_dict[k] = getattr(self, k)
|
|
380
371
|
return _dict
|
|
381
372
|
|
|
382
373
|
def set_properties(self, _dict: dict):
|
|
383
|
-
"""Set a dictionary of
|
|
384
|
-
for
|
|
385
|
-
delattr(self,
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
374
|
+
"""Set a dictionary of additional properties in this instance of ResultItem"""
|
|
375
|
+
for k in [_k for _k in vars(self).keys() if _k not in ResultItem._properties]:
|
|
376
|
+
delattr(self, k)
|
|
377
|
+
for k, v in _dict.items():
|
|
378
|
+
if k not in ResultItem._properties:
|
|
379
|
+
if not isinstance(v, object):
|
|
380
|
+
raise ValueError('Value for additional property {} must be of type object'.format(k))
|
|
381
|
+
setattr(self, k, v)
|
|
382
|
+
else:
|
|
383
|
+
raise ValueError('Property {} cannot be specified as an additional property'.format(k))
|
|
390
384
|
|
|
391
385
|
def __str__(self) -> str:
|
|
392
386
|
"""Return a `str` version of this ResultItem object."""
|