class_docstr: Facade for Amazon Verified Permissions.
  
  Used as an intermediate layer between AWS auth manager and Amazon Verified Permissions.
class_docstr_tok: ["Facade","for","Amazon","Verified","Permissions",".","Used","as","an","intermediate","layer","between","AWS","auth","manager","and","Amazon","Verified","Permissions","."]
code: def _get_user_role_entities(user: AwsAuthManagerUser) -> list[dict]:
      user_entity = {
          "identifier": {
              "entityType": get_entity_type(AvpEntities.USER),
              "entityId": user.get_id(),
          },
          "parents": [
              {
                  "entityType": get_entity_type(AvpEntities.ROLE),
                  "entityId": group,
              }
              for group in user.get_groups()
          ],
      }
      role_entities = [
          {
              "identifier": {
                  "entityType": get_entity_type(AvpEntities.ROLE),
                  "entityId": group,
              }
          }
          for group in user.get_groups()
      ]
      return [user_entity, *role_entities]
  
file_path: airflow/airflow/providers/amazon/aws/auth_manager/avp/facade.py
imports: from __future__ import annotations
  from functools import cached_property
  from typing import TYPE_CHECKING
  from airflow.configuration import conf
  from airflow.exceptions import AirflowException
  from airflow.providers.amazon.aws.auth_manager.avp.entities import AvpEntities, get_action_id, get_entity_type
  from airflow.providers.amazon.aws.auth_manager.constants import CONF_AVP_POLICY_STORE_ID_KEY, CONF_CONN_ID_KEY, CONF_REGION_NAME_KEY, CONF_SECTION_NAME
  from airflow.providers.amazon.aws.hooks.verified_permissions import VerifiedPermissionsHook
  from airflow.utils.helpers import prune_dict
  from airflow.utils.log.logging_mixin import LoggingMixin
label_desc: Use image node_id 4 for calling the AwsAuthManagerAmazonVerifiedPermissionsFacade obj's underlying member method code with example usage: obj._get_user_role_entities(user) and returns: list