# `AshAuthzed.ExternalRole`
[🔗](https://github.com/boxxxie/ash_authzed/blob/v0.2.0/lib/ash_authzed.ex#L61)

Represents a role or capability attribute on the resource that maps to a relation
on the resource instance itself (`:self`, the default) or an external object
(e.g., `target: "platform:main"` -> `platform:main#<role>@user:<id>`).

# `t`

```elixir
@type t() :: %AshAuthzed.ExternalRole{
  __spark_metadata__: term(),
  attribute: atom(),
  role_mapping: map(),
  subject_id: atom(),
  subject_type: String.t(),
  target: String.t() | :self | nil
}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
