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.43.4-432d779b-20220119-173927
17
+ # IBM OpenAPI SDK Code Generator Version: 3.46.1-a5569134-20220316-164819
18
18
19
19
"""
20
20
The IAM Access Groups API allows for the management of access groups (Create, Read,
@@ -161,6 +161,7 @@ def list_access_groups(self,
161
161
* ,
162
162
transaction_id : str = None ,
163
163
iam_id : str = None ,
164
+ membership_type : str = None ,
164
165
limit : int = None ,
165
166
offset : int = None ,
166
167
sort : str = None ,
@@ -187,8 +188,14 @@ def list_access_groups(self,
187
188
multiple services by using one identifier. The header key must be set to
188
189
Transaction-Id and the value is anything that you choose. If no transaction
189
190
ID is passed in, then a random ID is generated.
190
- :param str iam_id: (optional) Return groups for member id (IBMid, Service
191
- Id or Profile Id).
191
+ :param str iam_id: (optional) Return groups for member ID (IBMid, service
192
+ ID or trusted profile ID).
193
+ :param str membership_type: (optional) Membership type need to be specified
194
+ along with iam_id and must be either `static`, `dynamic` or `all`. If
195
+ membership type is `static`, members explicitly added to the group will be
196
+ shown. If membership type is `dynamic`, members accessing the access group
197
+ at the moment via dynamic rules will be shown. If membership type is `all`,
198
+ both static and dynamic members will be shown.
192
199
:param int limit: (optional) Return up to this limit of results where limit
193
200
is between 0 and 100.
194
201
:param int offset: (optional) The offset of the first result item to be
@@ -218,6 +225,7 @@ def list_access_groups(self,
218
225
params = {
219
226
'account_id' : account_id ,
220
227
'iam_id' : iam_id ,
228
+ 'membership_type' : membership_type ,
221
229
'limit' : limit ,
222
230
'offset' : offset ,
223
231
'sort' : sort ,
@@ -444,10 +452,11 @@ def is_member_of_access_group(self,
444
452
"""
445
453
Check membership in an access group.
446
454
447
- This HEAD operation determines if a given `iam_id` is present in a group. No
448
- response body is returned with this request. If the membership exists, a `204 - No
449
- Content` status code is returned. If the membership or the group does not exist, a
450
- `404 - Not Found` status code is returned.
455
+ This HEAD operation determines if a given `iam_id` is present in a group either
456
+ explicitly or via dynamic rules. No response body is returned with this request.
457
+ If the membership exists, a `204 - No Content` status code is returned. If the
458
+ membership or the group does not exist, a `404 - Not Found` status code is
459
+ returned.
451
460
452
461
:param str access_group_id: The access group identifier.
453
462
:param str iam_id: The IAM identifier.
@@ -558,6 +567,7 @@ def list_access_group_members(self,
558
567
access_group_id : str ,
559
568
* ,
560
569
transaction_id : str = None ,
570
+ membership_type : str = None ,
561
571
limit : int = None ,
562
572
offset : int = None ,
563
573
type : str = None ,
@@ -580,13 +590,18 @@ def list_access_group_members(self,
580
590
multiple services by using one identifier. The header key must be set to
581
591
Transaction-Id and the value is anything that you choose. If no transaction
582
592
ID is passed in, then a random ID is generated.
593
+ :param str membership_type: (optional) Filters members by membership type.
594
+ Membership type can be either `static`, `dynamic` or `all`. `static` lists
595
+ those members explicitly added to the access group, `dynamic` lists those
596
+ members part of access group via dynamic rules at the moment. `all` lists
597
+ both static and dynamic members.
583
598
:param int limit: (optional) Return up to this limit of results where limit
584
599
is between 0 and 100.
585
600
:param int offset: (optional) The offset of the first result item to be
586
601
returned.
587
602
:param str type: (optional) Filter the results by member type.
588
603
:param bool verbose: (optional) Return user's email and name for each user
589
- id or the name for each service id or trusted profile.
604
+ ID or the name for each service ID or trusted profile.
590
605
:param str sort: (optional) If verbose is true, sort the results by id,
591
606
name, or email.
592
607
:param dict headers: A `dict` containing the request headers
@@ -605,6 +620,7 @@ def list_access_group_members(self,
605
620
headers .update (sdk_headers )
606
621
607
622
params = {
623
+ 'membership_type' : membership_type ,
608
624
'limit' : limit ,
609
625
'offset' : offset ,
610
626
'type' : type ,
@@ -641,7 +657,9 @@ def remove_member_from_access_group(self,
641
657
642
658
Remove one member from a group using this API. If the operation is successful,
643
659
only a `204 - No Content` response with no body is returned. However, if any error
644
- occurs, the standard error format will be returned.
660
+ occurs, the standard error format will be returned. Dynamic member cannot be
661
+ deleted using this API. Dynamic rules needs to be adjusted to delete dynamic
662
+ members.
645
663
646
664
:param str access_group_id: The access group identifier.
647
665
:param str iam_id: The IAM identifier.
@@ -695,7 +713,8 @@ def remove_members_from_access_group(self,
695
713
Remove multiple members from a group using this API. On a successful call, this
696
714
API will always return 207. It is the caller's responsibility to iterate across
697
715
the body to determine successful deletion of each member. This API request payload
698
- can delete up to 50 members per call.
716
+ can delete up to 50 members per call. This API doesnt delete dynamic members
717
+ accessing the access group via dynamic rules.
699
718
700
719
:param str access_group_id: The access group identifier.
701
720
:param List[str] members: (optional) The `iam_id`s to remove from the
@@ -1437,7 +1456,7 @@ class AddGroupMembersRequestMembersItem():
1437
1456
"""
1438
1457
AddGroupMembersRequestMembersItem.
1439
1458
1440
- :attr str iam_id: The IBMid, Service Id or Profile Id of the member.
1459
+ :attr str iam_id: The IBMid, service ID or trusted profile ID of the member.
1441
1460
:attr str type: The type of the member, must be either "user", "service" or
1442
1461
"trusted profile".
1443
1462
"""
@@ -1448,7 +1467,8 @@ def __init__(self,
1448
1467
"""
1449
1468
Initialize a AddGroupMembersRequestMembersItem object.
1450
1469
1451
- :param str iam_id: The IBMid, Service Id or Profile Id of the member.
1470
+ :param str iam_id: The IBMid, service ID or trusted profile ID of the
1471
+ member.
1452
1472
:param str type: The type of the member, must be either "user", "service"
1453
1473
or "trusted profile".
1454
1474
"""
@@ -2212,6 +2232,8 @@ class Group():
2212
2232
:attr str href: (optional) A url to the given group resource.
2213
2233
:attr bool is_federated: (optional) This is set to true if rules exist for the
2214
2234
group.
2235
+ :attr str membership_type: (optional) Type of the membership. `static` or
2236
+ `dynamic`.
2215
2237
"""
2216
2238
2217
2239
def __init__ (self ,
@@ -2225,7 +2247,8 @@ def __init__(self,
2225
2247
last_modified_at : datetime = None ,
2226
2248
last_modified_by_id : str = None ,
2227
2249
href : str = None ,
2228
- is_federated : bool = None ) -> None :
2250
+ is_federated : bool = None ,
2251
+ membership_type : str = None ) -> None :
2229
2252
"""
2230
2253
Initialize a Group object.
2231
2254
@@ -2237,6 +2260,8 @@ def __init__(self,
2237
2260
:param str href: (optional) A url to the given group resource.
2238
2261
:param bool is_federated: (optional) This is set to true if rules exist for
2239
2262
the group.
2263
+ :param str membership_type: (optional) Type of the membership. `static` or
2264
+ `dynamic`.
2240
2265
"""
2241
2266
self .id = id
2242
2267
self .name = name
@@ -2248,6 +2273,7 @@ def __init__(self,
2248
2273
self .last_modified_by_id = last_modified_by_id
2249
2274
self .href = href
2250
2275
self .is_federated = is_federated
2276
+ self .membership_type = membership_type
2251
2277
2252
2278
@classmethod
2253
2279
def from_dict (cls , _dict : Dict ) -> 'Group' :
@@ -2273,6 +2299,8 @@ def from_dict(cls, _dict: Dict) -> 'Group':
2273
2299
args ['href' ] = _dict .get ('href' )
2274
2300
if 'is_federated' in _dict :
2275
2301
args ['is_federated' ] = _dict .get ('is_federated' )
2302
+ if 'membership_type' in _dict :
2303
+ args ['membership_type' ] = _dict .get ('membership_type' )
2276
2304
return cls (** args )
2277
2305
2278
2306
@classmethod
@@ -2303,6 +2331,8 @@ def to_dict(self) -> Dict:
2303
2331
_dict ['href' ] = self .href
2304
2332
if hasattr (self , 'is_federated' ) and self .is_federated is not None :
2305
2333
_dict ['is_federated' ] = self .is_federated
2334
+ if hasattr (self , 'membership_type' ) and self .membership_type is not None :
2335
+ _dict ['membership_type' ] = self .membership_type
2306
2336
return _dict
2307
2337
2308
2338
def _to_dict (self ):
@@ -2615,7 +2645,10 @@ class ListGroupMembersResponseMember():
2615
2645
A single member of an access group in a list.
2616
2646
2617
2647
:attr str iam_id: (optional) The IBMid or Service Id of the member.
2618
- :attr str type: (optional) The member type - either `user` or `service`.
2648
+ :attr str type: (optional) The member type - either `user`, `service` or
2649
+ `profile`.
2650
+ :attr str membership_type: (optional) The membership type - either `static` or
2651
+ `dynamic`.
2619
2652
:attr str name: (optional) The user's or service id's name.
2620
2653
:attr str email: (optional) If the member type is user, this is the user's
2621
2654
email.
@@ -2632,6 +2665,7 @@ def __init__(self,
2632
2665
* ,
2633
2666
iam_id : str = None ,
2634
2667
type : str = None ,
2668
+ membership_type : str = None ,
2635
2669
name : str = None ,
2636
2670
email : str = None ,
2637
2671
description : str = None ,
@@ -2642,7 +2676,10 @@ def __init__(self,
2642
2676
Initialize a ListGroupMembersResponseMember object.
2643
2677
2644
2678
:param str iam_id: (optional) The IBMid or Service Id of the member.
2645
- :param str type: (optional) The member type - either `user` or `service`.
2679
+ :param str type: (optional) The member type - either `user`, `service` or
2680
+ `profile`.
2681
+ :param str membership_type: (optional) The membership type - either
2682
+ `static` or `dynamic`.
2646
2683
:param str name: (optional) The user's or service id's name.
2647
2684
:param str email: (optional) If the member type is user, this is the user's
2648
2685
email.
@@ -2656,6 +2693,7 @@ def __init__(self,
2656
2693
"""
2657
2694
self .iam_id = iam_id
2658
2695
self .type = type
2696
+ self .membership_type = membership_type
2659
2697
self .name = name
2660
2698
self .email = email
2661
2699
self .description = description
@@ -2671,6 +2709,8 @@ def from_dict(cls, _dict: Dict) -> 'ListGroupMembersResponseMember':
2671
2709
args ['iam_id' ] = _dict .get ('iam_id' )
2672
2710
if 'type' in _dict :
2673
2711
args ['type' ] = _dict .get ('type' )
2712
+ if 'membership_type' in _dict :
2713
+ args ['membership_type' ] = _dict .get ('membership_type' )
2674
2714
if 'name' in _dict :
2675
2715
args ['name' ] = _dict .get ('name' )
2676
2716
if 'email' in _dict :
@@ -2697,6 +2737,8 @@ def to_dict(self) -> Dict:
2697
2737
_dict ['iam_id' ] = self .iam_id
2698
2738
if hasattr (self , 'type' ) and self .type is not None :
2699
2739
_dict ['type' ] = self .type
2740
+ if hasattr (self , 'membership_type' ) and self .membership_type is not None :
2741
+ _dict ['membership_type' ] = self .membership_type
2700
2742
if hasattr (self , 'name' ) and self .name is not None :
2701
2743
_dict ['name' ] = self .name
2702
2744
if hasattr (self , 'email' ) and self .email is not None :
0 commit comments