11import json
2- from typing import Union
2+ from typing import Literal , Union
33
44
55class Policies :
@@ -25,6 +25,7 @@ def build( # noqa: PLR0913
2525 access_validity_time : int = 120 ,
2626 approver_users : list = None ,
2727 approver_tags : list = None ,
28+ manager_condition : Literal ['All' , 'Any' , 'Manager' ] = '' ,
2829 access_type : str = 'Allow' ,
2930 identifier_type : str = 'name' ,
3031 condition_as_dict : bool = False ,
@@ -73,6 +74,10 @@ def build( # noqa: PLR0913
7374 If `approval_notification_medium` is set then either `approver_users` or `approver_tags` is required.
7475 :param approver_tags: Optional list of tag names who are considered approvers.
7576 If `approval_notification_medium` is set then either `approver_users` or `approver_tags` is required.
77+ :param manager_condition: Optional condition to enable requiring user's manager approval. Valid values are
78+ `Any` or `All` or `Manager`. `Any` corresponds to manager approval required, `All` corresponds to
79+ manager and approver_users/approver_tags approval required, and `Manager` corresponds to just the manager's
80+ approval required
7681 :param access_type: The type of access this policy provides. Valid values are `Allow` and `Deny`. Defaults
7782 to `Allow`.
7883 :param identifier_type: Valid values are `id` or `name`. Defaults to `name`. Represents which type of
@@ -105,6 +110,7 @@ def build( # noqa: PLR0913
105110 access_validity_time = access_validity_time ,
106111 approver_users = approver_users ,
107112 approver_tags = approver_tags ,
113+ manager_condition = manager_condition ,
108114 access_type = access_type ,
109115 identifier_type = identifier_type ,
110116 condition_as_dict = condition_as_dict ,
0 commit comments