  def GetIamPolicy(self, name: str) -> Dict[str, Any]:
    """Get IAM policy bindings for a resource.

    Args:
      name (str): a resource identifier in the format
        resource_type/resource_number e.g. projects/123456789012 where
        project_type is one of projects, folders or organizations.

    Returns:
      Dict[str, Any]: The policy bindings for the resource.

    Raises:
      TypeError: if an invalid resource type is provided.
    """
    resource_type = name.split('/')[0]
    if resource_type not in self.RESOURCE_TYPES:
      raise TypeError('Invalid resource type "{0:s}", resource must be one of '
          '"projects", "folders" or "organizations" provided in the format '
          '"resource_type/resource_number".'.format(name))
    service = self.GrmApi()
    resource_client = getattr(service, resource_type)()
    request = {'resource': name}
    # Safe to unpack
    response = common.ExecuteRequest(
        resource_client, 'getIamPolicy', request)[0]

    return response
Get IAM policy bindings for a resource.

Args:
name (str): a resource identifier in the format
resource_type/resource_number e.g. projects/123456789012 where
project_type is one of projects, folders or organizations.

Returns:
Dict[str, Any]: The policy bindings for the resource.

Raises:
TypeError: if an invalid resource type is provided.
libcloudforensics/providers/gcp/internal/cloudresourcemanager.py