def _is_excluded(self, exclusions: Exclusions) -> bool: """Determine whether the principal name or principal ID is excluded""" return bool( exclusions.is_principal_excluded(self.user_name, "User") or exclusions.is_principal_excluded(self.user_id, "User") or exclusions.is_principal_excluded(self.path, "User"))
def _is_excluded(self, exclusions: Exclusions) -> bool: """Determine whether the principal name or principal ID is excluded""" return (exclusions.is_principal_excluded(self.group_name, "Group") or exclusions.is_principal_excluded(self.group_id, "Group") or exclusions.is_principal_excluded(self.path, "Group"))
def _is_excluded(self, exclusions: Exclusions) -> bool: """Determine whether the principal name or principal ID is excluded""" return (exclusions.is_principal_excluded(self.role_name, "Role") or exclusions.is_principal_excluded(self.role_id, "Role") or exclusions.is_principal_excluded(self.path, "Role") or is_name_excluded(self.path, "/aws-service-role*"))