Skip to content

Commit baa58c6

Browse files
authored
fix(IAM Access Groups): remove update action control from assertions (#218)
Signed-off-by: HARI K ARLA <[email protected]>
1 parent 705c922 commit baa58c6

File tree

4 files changed

+77
-99
lines changed

4 files changed

+77
-99
lines changed

examples/test_iam_access_groups_v2_examples.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,6 @@ def test_create_template_example(self):
548548

549549
rules_action_controls_model = {
550550
'remove': False,
551-
'update': False,
552551
}
553552

554553
rule_input_model = {
@@ -562,7 +561,6 @@ def test_create_template_example(self):
562561
assertions_action_controls_model = {
563562
'add': False,
564563
'remove': True,
565-
'update': True,
566564
}
567565

568566
assertions_input_model = {
@@ -793,7 +791,6 @@ def test_update_template_version_example(self):
793791

794792
rules_action_controls_model = {
795793
'remove': False,
796-
'update': False,
797794
}
798795

799796
rule_input_model = {

ibm_platform_services/iam_access_groups_v2.py

Lines changed: 47 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17-
# IBM OpenAPI SDK Code Generator Version: 3.74.0-89f1dbab-20230630-160213
17+
# IBM OpenAPI SDK Code Generator Version: 3.78.0-67aec9b7-20230818-174940
1818

1919
"""
2020
The IAM Access Groups API allows for the management of access groups (Create, Read,
@@ -2474,7 +2474,11 @@ class AccessActionControls:
24742474
:attr bool add: (optional) Action control for adding access policies to an
24752475
enterprise-managed access group in a child account. If an access group
24762476
administrator in a child account adds a policy, they can always update or remove
2477-
it.
2477+
it. Note that if conflicts arise between an update to this control in a new
2478+
version and polices added to the access group by an administrator in a child
2479+
account, you must resolve those conflicts in the child account. This prevents
2480+
breaking access in the child account. For more information, see [Working with
2481+
versions](https://test.cloud.ibm.com/docs/secure-enterprise?topic=secure-enterprise-working-with-versions#new-version-scenarios).
24782482
"""
24792483

24802484
def __init__(
@@ -2488,7 +2492,12 @@ def __init__(
24882492
:param bool add: (optional) Action control for adding access policies to an
24892493
enterprise-managed access group in a child account. If an access group
24902494
administrator in a child account adds a policy, they can always update or
2491-
remove it.
2495+
remove it. Note that if conflicts arise between an update to this control
2496+
in a new version and polices added to the access group by an administrator
2497+
in a child account, you must resolve those conflicts in the child account.
2498+
This prevents breaking access in the child account. For more information,
2499+
see [Working with
2500+
versions](https://test.cloud.ibm.com/docs/secure-enterprise?topic=secure-enterprise-working-with-versions#new-version-scenarios).
24922501
"""
24932502
self.add = add
24942503

@@ -3375,34 +3384,42 @@ class AssertionsActionControls:
33753384
33763385
:attr bool add: (optional) Action control for adding dynamic rules to an
33773386
enterprise-managed access group. If an access group administrator in a child
3378-
account adds a dynamic rule, they can always update or remove it.
3387+
account adds a dynamic rule, they can always update or remove it. Note that if
3388+
conflicts arise between an update to this control and rules added or updated by
3389+
an administrator in the child account, you must resolve those conflicts in the
3390+
child account. This prevents breaking access that the rules might grant in the
3391+
child account. For more information, see [Working with versions].
33793392
:attr bool remove: (optional) Action control for removing enterprise-managed
3380-
dynamic rules in an enterprise-managed access group.
3381-
:attr bool update: (optional) Action control for updating enterprise-managed
3382-
dynamic rules in an enterprise-managed access group.
3393+
dynamic rules in an enterprise-managed access group. Note that if a rule is
3394+
removed from an enterprise-managed access group by an administrator in a child
3395+
account and and you reassign the template, the rule is reinstated.
33833396
"""
33843397

33853398
def __init__(
33863399
self,
33873400
*,
33883401
add: bool = None,
33893402
remove: bool = None,
3390-
update: bool = None,
33913403
) -> None:
33923404
"""
33933405
Initialize a AssertionsActionControls object.
33943406
33953407
:param bool add: (optional) Action control for adding dynamic rules to an
33963408
enterprise-managed access group. If an access group administrator in a
33973409
child account adds a dynamic rule, they can always update or remove it.
3410+
Note that if conflicts arise between an update to this control and rules
3411+
added or updated by an administrator in the child account, you must resolve
3412+
those conflicts in the child account. This prevents breaking access that
3413+
the rules might grant in the child account. For more information, see
3414+
[Working with versions].
33983415
:param bool remove: (optional) Action control for removing
33993416
enterprise-managed dynamic rules in an enterprise-managed access group.
3400-
:param bool update: (optional) Action control for updating
3401-
enterprise-managed dynamic rules in an enterprise-managed access group.
3417+
Note that if a rule is removed from an enterprise-managed access group by
3418+
an administrator in a child account and and you reassign the template, the
3419+
rule is reinstated.
34023420
"""
34033421
self.add = add
34043422
self.remove = remove
3405-
self.update = update
34063423

34073424
@classmethod
34083425
def from_dict(cls, _dict: Dict) -> 'AssertionsActionControls':
@@ -3412,8 +3429,6 @@ def from_dict(cls, _dict: Dict) -> 'AssertionsActionControls':
34123429
args['add'] = _dict.get('add')
34133430
if 'remove' in _dict:
34143431
args['remove'] = _dict.get('remove')
3415-
if 'update' in _dict:
3416-
args['update'] = _dict.get('update')
34173432
return cls(**args)
34183433

34193434
@classmethod
@@ -3428,8 +3443,6 @@ def to_dict(self) -> Dict:
34283443
_dict['add'] = self.add
34293444
if hasattr(self, 'remove') and self.remove is not None:
34303445
_dict['remove'] = self.remove
3431-
if hasattr(self, 'update') and self.update is not None:
3432-
_dict['update'] = self.update
34333446
return _dict
34343447

34353448
def _to_dict(self):
@@ -5825,9 +5838,16 @@ class MembersActionControls:
58255838
58265839
:attr bool add: (optional) Action control for adding child account members to an
58275840
enterprise-managed access group. If an access group administrator in a child
5828-
account adds a member, they can always remove them.
5841+
account adds a member, they can always remove them. Note that if conflicts arise
5842+
between an update to this control in a new version and members added by an
5843+
administrator in the child account, you must resolve those conflicts in the
5844+
child account. This prevents breaking access in the child account. For more
5845+
information, see [Working with versions]
5846+
(https://test.cloud.ibm.com/docs/secure-enterprise?topic=secure-enterprise-working-with-versions#new-version-scenarios).
58295847
:attr bool remove: (optional) Action control for removing enterprise-managed
5830-
members from an enterprise-managed access group.
5848+
members from an enterprise-managed access group. Note that if an enterprise
5849+
member is removed from an enterprise-managed access group in a child account and
5850+
you reassign the template, the membership is reinstated.
58315851
"""
58325852

58335853
def __init__(
@@ -5841,9 +5861,17 @@ def __init__(
58415861
58425862
:param bool add: (optional) Action control for adding child account members
58435863
to an enterprise-managed access group. If an access group administrator in
5844-
a child account adds a member, they can always remove them.
5864+
a child account adds a member, they can always remove them. Note that if
5865+
conflicts arise between an update to this control in a new version and
5866+
members added by an administrator in the child account, you must resolve
5867+
those conflicts in the child account. This prevents breaking access in the
5868+
child account. For more information, see [Working with versions]
5869+
(https://test.cloud.ibm.com/docs/secure-enterprise?topic=secure-enterprise-working-with-versions#new-version-scenarios).
58455870
:param bool remove: (optional) Action control for removing
5846-
enterprise-managed members from an enterprise-managed access group.
5871+
enterprise-managed members from an enterprise-managed access group. Note
5872+
that if an enterprise member is removed from an enterprise-managed access
5873+
group in a child account and you reassign the template, the membership is
5874+
reinstated.
58475875
"""
58485876
self.add = add
58495877
self.remove = remove
@@ -6216,35 +6244,27 @@ class RuleActionControls:
62166244
62176245
:attr bool remove: (optional) Action control for removing this
62186246
enterprise-managed dynamic rule.
6219-
:attr bool update: (optional) Action control for updating this
6220-
enterprise-managed dynamic rule.
62216247
"""
62226248

62236249
def __init__(
62246250
self,
62256251
*,
62266252
remove: bool = None,
6227-
update: bool = None,
62286253
) -> None:
62296254
"""
62306255
Initialize a RuleActionControls object.
62316256
62326257
:param bool remove: (optional) Action control for removing this
62336258
enterprise-managed dynamic rule.
6234-
:param bool update: (optional) Action control for updating this
6235-
enterprise-managed dynamic rule.
62366259
"""
62376260
self.remove = remove
6238-
self.update = update
62396261

62406262
@classmethod
62416263
def from_dict(cls, _dict: Dict) -> 'RuleActionControls':
62426264
"""Initialize a RuleActionControls object from a json dictionary."""
62436265
args = {}
62446266
if 'remove' in _dict:
62456267
args['remove'] = _dict.get('remove')
6246-
if 'update' in _dict:
6247-
args['update'] = _dict.get('update')
62486268
return cls(**args)
62496269

62506270
@classmethod
@@ -6257,8 +6277,6 @@ def to_dict(self) -> Dict:
62576277
_dict = {}
62586278
if hasattr(self, 'remove') and self.remove is not None:
62596279
_dict['remove'] = self.remove
6260-
if hasattr(self, 'update') and self.update is not None:
6261-
_dict['update'] = self.update
62626280
return _dict
62636281

62646282
def _to_dict(self):

test/integration/test_iam_access_groups_v2.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,6 @@ def test_create_template(self):
567567
# Construct a dict representation of a RulesActionControls model
568568
rules_action_controls_model = {
569569
'remove': False,
570-
'update': False,
571570
}
572571
# Construct a dict representation of a RuleInput model
573572
rule_input_model = {
@@ -581,7 +580,6 @@ def test_create_template(self):
581580
assertions_action_controls_model = {
582581
'add': False,
583582
'remove': True,
584-
'update': True,
585583
}
586584
# Construct a dict representation of a AssertionsInput model
587585
assertions_input_model = {
@@ -690,7 +688,6 @@ def test_create_template_version(self):
690688
# Construct a dict representation of a RulesActionControls model
691689
rules_action_controls_model = {
692690
'remove': True,
693-
'update': True,
694691
}
695692
# Construct a dict representation of a RuleInput model
696693
rule_input_model = {
@@ -704,7 +701,6 @@ def test_create_template_version(self):
704701
assertions_action_controls_model = {
705702
'add': False,
706703
'remove': True,
707-
'update': True,
708704
}
709705
# Construct a dict representation of a AssertionsInput model
710706
assertions_input_model = {
@@ -822,7 +818,6 @@ def test_update_template_version(self):
822818
# Construct a dict representation of a RulesActionControls model
823819
rules_action_controls_model = {
824820
'remove': False,
825-
'update': False,
826821
}
827822
# Construct a dict representation of a RuleInput model
828823
rule_input_model = {
@@ -836,7 +831,6 @@ def test_update_template_version(self):
836831
assertions_action_controls_model = {
837832
'add': False,
838833
'remove': True,
839-
'update': True,
840834
}
841835
# Construct a dict representation of a AssertionsInput model
842836
assertions_input_model = {

0 commit comments

Comments
 (0)