# `Ash.Domain.Info`
[🔗](https://github.com/ash-project/ash/blob/v3.27.8/lib/ash/domain/info.ex#L5)

Introspection tools for Ash.Domain

# `allow`

```elixir
@spec allow(Ash.Domain.t() | Spark.Dsl.t()) :: mfa() | nil
```

The allow MFA for a domain

# `allow_unregistered?`

```elixir
@spec allow_unregistered?(Ash.Domain.t() | Spark.Dsl.t()) :: atom() | nil
```

Whether or not the domain allows unregistered resources to be used with it

# `authorize`

```elixir
@spec authorize(Ash.Domain.t()) :: :always | :by_default | :when_requested
```

When authorization should happen for a given domain

# `depend_on_resources`
*macro* 

> This macro is deprecated. Use `Ash.Domain.Info.resources/1` instead. This macro is no longer necessary.

```elixir
@spec depend_on_resources(Macro.t()) :: Macro.t()
```

Gets the resources of a domain module. Can be used at compile time.

Liberal use of this can greatly increase compile times, or even cause compiler deadlocks.
Use with care.

# `description`

```elixir
@spec description(Spark.Dsl.t() | Ash.Domain.t()) :: String.t() | nil
```

The description of the domain

# `extensions`

```elixir
@spec extensions(
  domain :: Ash.Domain.t(),
  opts :: [{:include_resource_extensions?, boolean()}]
) :: [
  module()
]
```

Returns a list of extensions in use by the domain.

## Options
- `:include_resource_extensions?` - If `true`, includes extensions defined on
  resources in the domain. Defaults to `false`.

# `find_manage_relationships_with_identity_not_configured`

# `related_domain`

```elixir
@spec related_domain(
  Ash.Resource.t() | Ash.Query.t() | Ash.Changeset.t() | Ash.ActionInput.t(),
  atom()
  | Ash.Resource.Relationships.relationship()
  | [atom() | Ash.Resource.Relationships.relationship()],
  Ash.Domain.t() | nil
) :: Ash.Domain.t()
```

Determine what domain to use when interacting with a related resource.

We choose the first domain found in the following order:

* `relationship.domain`, i.e an explicitly configured domain for a relationship
* `resource.domain`, i.e. the domain the resource declares
* `subject.domain`, i.e. the domain of the query, changeset or action input (if it has one)
* `default`, the default domain provided as the third argument

# `require_actor?`

```elixir
@spec require_actor?(Ash.Domain.t()) :: boolean()
```

Whether or not the actor is always required for a domain

# `resource`

Returns `{:ok, resource}` if the resource can be used by the domain, or `{:error, error}`.

# `resource_references`

```elixir
@spec resource_references(Spark.Dsl.t() | Ash.Domain.t()) :: [
  Ash.Domain.Dsl.ResourceReference.t()
]
```

Gets the resource references of a domain module. DO NOT USE AT COMPILE TIME.

If you need the resource list at compile time, use `depend_on_resources/1`

# `resources`

```elixir
@spec resources(Spark.Dsl.t() | Ash.Domain.t()) :: [Ash.Resource.t()]
```

Gets the resources of a domain module.

# `short_name`

```elixir
@spec short_name(Ash.Domain.t()) :: atom()
```

The short name for a domain

# `span_name`

```elixir
@spec span_name(Ash.Domain.t(), Ash.Resource.t(), action :: atom() | binary()) ::
  String.t()
```

The span_name for a domain and resource combination

# `telemetry_event_name`

```elixir
@spec telemetry_event_name(Ash.Domain.t(), atom() | [atom()]) :: [atom()]
```

Names a telemetry event for a given domain/resource combo

# `timeout`

```elixir
@spec timeout(Ash.Domain.t()) :: nil | :infinity | integer()
```

The execution timeout for a domain

# `trace_name`

```elixir
@spec trace_name(Ash.Domain.t()) :: String.t()
```

The trace name for a domain

---

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