Diffo.Provider (Diffo v0.5.1)

Copy Markdown View Source

Provider API endpoint

Extensible Ash Resources and API related to Providing TMF Services and Resources

Summary

Types

TMF blessed Party type atoms accepted by the dispatcher.

TMF blessed Place type atoms accepted by the dispatcher.

Tagged source for ref dispatchers.

Functions

Activates a service instance.

Annotates an instance with a note.

Runs authorization checks for Diffo.Provider.Specification.categorise

Runs authorization checks for Diffo.Provider.Specification.categorise, returning a boolean.

Runs authorization checks for Diffo.Provider.AssignableCharacteristic.create

Runs authorization checks for Diffo.Provider.AssignableCharacteristic.create, returning a boolean.

Runs authorization checks for Diffo.Provider.AssignmentRelationship.create

Runs authorization checks for Diffo.Provider.AssignmentRelationship.create, returning a boolean.

Runs authorization checks for Diffo.Provider.Characteristic.create

Runs authorization checks for Diffo.Provider.Characteristic.create, returning a boolean.

Runs authorization checks for Diffo.Provider.DefinedSimpleRelationship.create

Runs authorization checks for Diffo.Provider.DefinedSimpleRelationship.create, returning a boolean.

Runs authorization checks for Diffo.Provider.Entity.create

Runs authorization checks for Diffo.Provider.Entity.create, returning a boolean.

Runs authorization checks for Diffo.Provider.EntityRef.create

Runs authorization checks for Diffo.Provider.EntityRef.create, returning a boolean.

Runs authorization checks for Diffo.Provider.ExternalIdentifier.create

Runs authorization checks for Diffo.Provider.ExternalIdentifier.create, returning a boolean.

Runs authorization checks for Diffo.Provider.Feature.create

Runs authorization checks for Diffo.Provider.Feature.create, returning a boolean.

Runs authorization checks for Diffo.Provider.Note.create

Runs authorization checks for Diffo.Provider.Note.create, returning a boolean.

Runs authorization checks for Diffo.Provider.PartyRef.create

Runs authorization checks for Diffo.Provider.PartyRef.create, returning a boolean.

Runs authorization checks for Diffo.Provider.PlaceRef.create

Runs authorization checks for Diffo.Provider.PlaceRef.create, returning a boolean.

Runs authorization checks for Diffo.Provider.ProcessStatus.create

Runs authorization checks for Diffo.Provider.ProcessStatus.create, returning a boolean.

Runs authorization checks for Diffo.Provider.Relationship.create

Runs authorization checks for Diffo.Provider.Relationship.create, returning a boolean.

Runs authorization checks for Diffo.Provider.Specification.create

Runs authorization checks for Diffo.Provider.Specification.create, returning a boolean.

Runs authorization checks for Diffo.Provider.AssignableCharacteristic.destroy

Runs authorization checks for Diffo.Provider.AssignableCharacteristic.destroy, returning a boolean.

Runs authorization checks for Diffo.Provider.AssignmentRelationship.destroy

Runs authorization checks for Diffo.Provider.AssignmentRelationship.destroy, returning a boolean.

Runs authorization checks for Diffo.Provider.Characteristic.destroy

Runs authorization checks for Diffo.Provider.Characteristic.destroy, returning a boolean.

Runs authorization checks for Diffo.Provider.DefinedSimpleRelationship.destroy

Runs authorization checks for Diffo.Provider.DefinedSimpleRelationship.destroy, returning a boolean.

Runs authorization checks for Diffo.Provider.Entity.destroy

Runs authorization checks for Diffo.Provider.Entity.destroy, returning a boolean.

Runs authorization checks for Diffo.Provider.EntityRef.destroy

Runs authorization checks for Diffo.Provider.EntityRef.destroy, returning a boolean.

Runs authorization checks for Diffo.Provider.Event.destroy

Runs authorization checks for Diffo.Provider.Event.destroy, returning a boolean.

Runs authorization checks for Diffo.Provider.ExternalIdentifier.destroy

Runs authorization checks for Diffo.Provider.ExternalIdentifier.destroy, returning a boolean.

Runs authorization checks for Diffo.Provider.Feature.destroy

Runs authorization checks for Diffo.Provider.Feature.destroy, returning a boolean.

Runs authorization checks for Diffo.Provider.Note.destroy

Runs authorization checks for Diffo.Provider.Note.destroy, returning a boolean.

Runs authorization checks for Diffo.Provider.PartyRef.destroy

Runs authorization checks for Diffo.Provider.PartyRef.destroy, returning a boolean.

Runs authorization checks for Diffo.Provider.PlaceRef.destroy

Runs authorization checks for Diffo.Provider.PlaceRef.destroy, returning a boolean.

Runs authorization checks for Diffo.Provider.ProcessStatus.destroy

Runs authorization checks for Diffo.Provider.ProcessStatus.destroy, returning a boolean.

Runs authorization checks for Diffo.Provider.Relationship.destroy

Runs authorization checks for Diffo.Provider.Relationship.destroy, returning a boolean.

Runs authorization checks for Diffo.Provider.Specification.destroy

Runs authorization checks for Diffo.Provider.Specification.destroy, returning a boolean.

Runs authorization checks for Diffo.Provider.Specification.describe

Runs authorization checks for Diffo.Provider.Specification.describe, returning a boolean.

Runs authorization checks for Diffo.Provider.Entity.find_by_id

Runs authorization checks for Diffo.Provider.Entity.find_by_id, returning a boolean.

Runs authorization checks for Diffo.Provider.Entity.find_by_name

Runs authorization checks for Diffo.Provider.Entity.find_by_name, returning a boolean.

Runs authorization checks for Diffo.Provider.ExternalIdentifier.find_by_external_id

Runs authorization checks for Diffo.Provider.ExternalIdentifier.find_by_external_id, returning a boolean.

Runs authorization checks for Diffo.Provider.Note.find_by_note_id

Runs authorization checks for Diffo.Provider.Note.find_by_note_id, returning a boolean.

Runs authorization checks for Diffo.Provider.Specification.find_by_category

Runs authorization checks for Diffo.Provider.Specification.find_by_category, returning a boolean.

Runs authorization checks for Diffo.Provider.Specification.find_by_name

Runs authorization checks for Diffo.Provider.Specification.find_by_name, returning a boolean.

Runs authorization checks for Diffo.Provider.AssignableCharacteristic.read

Runs authorization checks for Diffo.Provider.AssignableCharacteristic.read, returning a boolean.

Runs authorization checks for Diffo.Provider.AssignmentRelationship.read

Runs authorization checks for Diffo.Provider.AssignmentRelationship.read, returning a boolean.

Runs authorization checks for Diffo.Provider.Characteristic.read

Runs authorization checks for Diffo.Provider.Characteristic.read, returning a boolean.

Runs authorization checks for Diffo.Provider.DefinedSimpleRelationship.read

Runs authorization checks for Diffo.Provider.DefinedSimpleRelationship.read, returning a boolean.

Runs authorization checks for Diffo.Provider.Entity.read

Runs authorization checks for Diffo.Provider.Entity.read, returning a boolean.

Runs authorization checks for Diffo.Provider.EntityRef.read

Runs authorization checks for Diffo.Provider.EntityRef.read, returning a boolean.

Runs authorization checks for Diffo.Provider.Event.read

Runs authorization checks for Diffo.Provider.Event.read, returning a boolean.

Runs authorization checks for Diffo.Provider.ExternalIdentifier.read

Runs authorization checks for Diffo.Provider.ExternalIdentifier.read, returning a boolean.

Runs authorization checks for Diffo.Provider.Feature.read

Runs authorization checks for Diffo.Provider.Feature.read, returning a boolean.

Runs authorization checks for Diffo.Provider.Specification.get_latest

Runs authorization checks for Diffo.Provider.Specification.get_latest, returning a boolean.

Runs authorization checks for Diffo.Provider.Note.read

Runs authorization checks for Diffo.Provider.Note.read, returning a boolean.

Runs authorization checks for Diffo.Provider.PartyRef.read

Runs authorization checks for Diffo.Provider.PartyRef.read, returning a boolean.

Runs authorization checks for Diffo.Provider.PlaceRef.read

Runs authorization checks for Diffo.Provider.PlaceRef.read, returning a boolean.

Runs authorization checks for Diffo.Provider.ProcessStatus.read

Runs authorization checks for Diffo.Provider.ProcessStatus.read, returning a boolean.

Runs authorization checks for Diffo.Provider.Relationship.read

Runs authorization checks for Diffo.Provider.Relationship.read, returning a boolean.

Runs authorization checks for Diffo.Provider.Specification.read

Runs authorization checks for Diffo.Provider.Specification.read, returning a boolean.

Runs authorization checks for Diffo.Provider.Characteristic.list

Runs authorization checks for Diffo.Provider.Characteristic.list, returning a boolean.

Runs authorization checks for Diffo.Provider.Entity.list

Runs authorization checks for Diffo.Provider.Entity.list, returning a boolean.

Runs authorization checks for Diffo.Provider.EntityRef.list

Runs authorization checks for Diffo.Provider.EntityRef.list, returning a boolean.

Runs authorization checks for Diffo.Provider.EntityRef.list_entity_refs_by_entity_id

Runs authorization checks for Diffo.Provider.EntityRef.list_entity_refs_by_entity_id, returning a boolean.

Runs authorization checks for Diffo.Provider.EntityRef.list_entity_refs_by_instance_id

Runs authorization checks for Diffo.Provider.EntityRef.list_entity_refs_by_instance_id, returning a boolean.

Runs authorization checks for Diffo.Provider.Event.list

Runs authorization checks for Diffo.Provider.Event.list, returning a boolean.

Runs authorization checks for Diffo.Provider.Event.list_events_by_instance_id

Runs authorization checks for Diffo.Provider.Event.list_events_by_instance_id, returning a boolean.

Runs authorization checks for Diffo.Provider.ExternalIdentifier.list

Runs authorization checks for Diffo.Provider.ExternalIdentifier.list, returning a boolean.

Runs authorization checks for Diffo.Provider.ExternalIdentifier.list_external_identifiers_by_instance_id

Runs authorization checks for Diffo.Provider.ExternalIdentifier.list_external_identifiers_by_instance_id, returning a boolean.

Runs authorization checks for Diffo.Provider.ExternalIdentifier.list_external_identifiers_by_owner_id

Runs authorization checks for Diffo.Provider.ExternalIdentifier.list_external_identifiers_by_owner_id, returning a boolean.

Runs authorization checks for Diffo.Provider.Feature.list

Runs authorization checks for Diffo.Provider.Feature.list, returning a boolean.

Runs authorization checks for Diffo.Provider.Note.list

Runs authorization checks for Diffo.Provider.Note.list, returning a boolean.

Runs authorization checks for Diffo.Provider.Note.list_notes_by_author_id

Runs authorization checks for Diffo.Provider.Note.list_notes_by_author_id, returning a boolean.

Runs authorization checks for Diffo.Provider.Note.list_notes_by_instance_id

Runs authorization checks for Diffo.Provider.Note.list_notes_by_instance_id, returning a boolean.

Runs authorization checks for Diffo.Provider.PartyRef.list

Runs authorization checks for Diffo.Provider.PartyRef.list, returning a boolean.

Runs authorization checks for Diffo.Provider.PartyRef.list_party_refs_by_instance_id

Runs authorization checks for Diffo.Provider.PartyRef.list_party_refs_by_instance_id, returning a boolean.

Runs authorization checks for Diffo.Provider.PartyRef.list_party_refs_by_party_id

Runs authorization checks for Diffo.Provider.PartyRef.list_party_refs_by_party_id, returning a boolean.

Runs authorization checks for Diffo.Provider.PartyRef.list_party_refs_by_place_id

Runs authorization checks for Diffo.Provider.PartyRef.list_party_refs_by_place_id, returning a boolean.

Runs authorization checks for Diffo.Provider.PartyRef.list_party_refs_by_source_party_id

Runs authorization checks for Diffo.Provider.PartyRef.list_party_refs_by_source_party_id, returning a boolean.

Runs authorization checks for Diffo.Provider.PlaceRef.list

Runs authorization checks for Diffo.Provider.PlaceRef.list, returning a boolean.

Runs authorization checks for Diffo.Provider.PlaceRef.list_place_refs_by_instance_id

Runs authorization checks for Diffo.Provider.PlaceRef.list_place_refs_by_instance_id, returning a boolean.

Runs authorization checks for Diffo.Provider.PlaceRef.list_place_refs_by_party_id

Runs authorization checks for Diffo.Provider.PlaceRef.list_place_refs_by_party_id, returning a boolean.

Runs authorization checks for Diffo.Provider.PlaceRef.list_place_refs_by_place_id

Runs authorization checks for Diffo.Provider.PlaceRef.list_place_refs_by_place_id, returning a boolean.

Runs authorization checks for Diffo.Provider.PlaceRef.list_place_refs_by_source_place_id

Runs authorization checks for Diffo.Provider.PlaceRef.list_place_refs_by_source_place_id, returning a boolean.

Runs authorization checks for Diffo.Provider.ProcessStatus.list

Runs authorization checks for Diffo.Provider.ProcessStatus.list, returning a boolean.

Runs authorization checks for Diffo.Provider.ProcessStatus.list_process_statuses_by_instance_id

Runs authorization checks for Diffo.Provider.ProcessStatus.list_process_statuses_by_instance_id, returning a boolean.

Runs authorization checks for Diffo.Provider.Relationship.list

Runs authorization checks for Diffo.Provider.Relationship.list, returning a boolean.

Runs authorization checks for Diffo.Provider.Relationship.list_resource_relationships_from

Runs authorization checks for Diffo.Provider.Relationship.list_resource_relationships_from, returning a boolean.

Runs authorization checks for Diffo.Provider.Relationship.list_service_relationships_from

Runs authorization checks for Diffo.Provider.Relationship.list_service_relationships_from, returning a boolean.

Runs authorization checks for Diffo.Provider.Specification.list

Runs authorization checks for Diffo.Provider.Specification.list, returning a boolean.

Runs authorization checks for Diffo.Provider.Specification.next_minor

Runs authorization checks for Diffo.Provider.Specification.next_minor, returning a boolean.

Runs authorization checks for Diffo.Provider.Specification.next_patch

Runs authorization checks for Diffo.Provider.Specification.next_patch, returning a boolean.

Runs authorization checks for Diffo.Provider.Feature.relate_characteristics

Runs authorization checks for Diffo.Provider.Feature.relate_characteristics, returning a boolean.

Runs authorization checks for Diffo.Provider.Relationship.relate_characteristics

Runs authorization checks for Diffo.Provider.Relationship.relate_characteristics, returning a boolean.

Runs authorization checks for Diffo.Provider.Feature.unrelate_characteristics

Runs authorization checks for Diffo.Provider.Feature.unrelate_characteristics, returning a boolean.

Runs authorization checks for Diffo.Provider.Relationship.unrelate_characteristics

Runs authorization checks for Diffo.Provider.Relationship.unrelate_characteristics, returning a boolean.

Runs authorization checks for Diffo.Provider.AssignableCharacteristic.update

Runs authorization checks for Diffo.Provider.AssignableCharacteristic.update, returning a boolean.

Runs authorization checks for Diffo.Provider.Characteristic.update

Runs authorization checks for Diffo.Provider.Characteristic.update, returning a boolean.

Runs authorization checks for Diffo.Provider.Entity.update

Runs authorization checks for Diffo.Provider.Entity.update, returning a boolean.

Runs authorization checks for Diffo.Provider.EntityRef.update

Runs authorization checks for Diffo.Provider.EntityRef.update, returning a boolean.

Runs authorization checks for Diffo.Provider.ExternalIdentifier.update

Runs authorization checks for Diffo.Provider.ExternalIdentifier.update, returning a boolean.

Runs authorization checks for Diffo.Provider.Feature.update

Runs authorization checks for Diffo.Provider.Feature.update, returning a boolean.

Runs authorization checks for Diffo.Provider.Note.update

Runs authorization checks for Diffo.Provider.Note.update, returning a boolean.

Runs authorization checks for Diffo.Provider.PartyRef.update

Runs authorization checks for Diffo.Provider.PartyRef.update, returning a boolean.

Runs authorization checks for Diffo.Provider.PlaceRef.update

Runs authorization checks for Diffo.Provider.PlaceRef.update, returning a boolean.

Runs authorization checks for Diffo.Provider.ProcessStatus.update

Runs authorization checks for Diffo.Provider.ProcessStatus.update, returning a boolean.

Runs authorization checks for Diffo.Provider.Relationship.update

Runs authorization checks for Diffo.Provider.Relationship.update, returning a boolean.

Cancels a service instance.

Returns the changeset corresponding to the action.

Returns the changeset corresponding to the action.

Returns the changeset corresponding to the action.

Returns the changeset corresponding to the action.

Returns the changeset corresponding to the action.

Returns the changeset corresponding to the action.

Returns the changeset corresponding to the action.

Returns the changeset corresponding to the action.

Returns the changeset corresponding to the action.

Returns the changeset corresponding to the action.

Returns the changeset corresponding to the action.

Returns the changeset corresponding to the action.

Returns the changeset corresponding to the action.

Returns the changeset corresponding to the action.

Returns the changeset corresponding to the action.

Returns the changeset corresponding to the action.

Returns the changeset corresponding to the action.

Returns the changeset corresponding to the action.

Returns the changeset corresponding to the action.

Returns the changeset corresponding to the action.

Returns the changeset corresponding to the action.

Returns the changeset corresponding to the action.

Returns the changeset corresponding to the action.

Returns the changeset corresponding to the action.

Returns the changeset corresponding to the action.

Returns the changeset corresponding to the action.

Returns the changeset corresponding to the action.

Returns the changeset corresponding to the action.

Returns the changeset corresponding to the action.

Returns the changeset corresponding to the action.

Returns the changeset corresponding to the action.

Returns the changeset corresponding to the action.

Returns the changeset corresponding to the action.

Calls the create action on Diffo.Provider.AssignableCharacteristic.

Calls the create action on Diffo.Provider.AssignableCharacteristic.

creates a pool assignment relationship between a source and target instance

creates a pool assignment relationship between a source and target instance

creates a defined simple relationship between a source and target instance

creates a defined simple relationship between a source and target instance

creates a entity ref, relating an instance and entity

creates a entity ref, relating an instance and entity

creates a external identifier related to an instance and optionally an owner party

creates a external identifier related to an instance and optionally an owner party

creates a feature, optionally with related characteristic

creates a feature, optionally with related characteristic

Same as create_party!/2 but returns {:ok, record} or {:error, error}.

Creates a typed Party subtype by dispatching on the TMF type atom.

Same as create_party_ref!/1 but returns {:ok, record} or {:error, error}.

creates a party ref, relating an instance, place or source party to a party

Creates a PartyRef from a tagged source to a target Party.

creates a party ref, relating an instance, place or source party to a party

Same as create_place!/2 but returns {:ok, record} or {:error, error}.

Creates a typed Place subtype by dispatching on the TMF type atom.

Same as create_place_ref!/1 but returns {:ok, record} or {:error, error}.

creates a place ref, relating an instance, party or source place to a place

Creates a PlaceRef from a tagged source to a target Place.

creates a place ref, relating an instance, party or source place to a place

creates a process status related to an instance

creates a process status related to an instance

creates a relationship between a source and target instance

creates a relationship between a source and target instance

creates a major version of a named serviceSpecification or resourceSpecification

creates a major version of a named serviceSpecification or resourceSpecification

Deactivates a service instance.

Calls the destroy action on Diffo.Provider.AssignableCharacteristic.

Calls the destroy action on Diffo.Provider.AssignableCharacteristic.

Calls the destroy action on Diffo.Provider.AssignmentRelationship.

Calls the destroy action on Diffo.Provider.AssignmentRelationship.

Calls the destroy action on Diffo.Provider.Characteristic.

Calls the destroy action on Diffo.Provider.Characteristic.

Calls the destroy action on Diffo.Provider.DefinedSimpleRelationship.

Calls the destroy action on Diffo.Provider.DefinedSimpleRelationship.

Calls the destroy action on Diffo.Provider.Entity.

Calls the destroy action on Diffo.Provider.Entity.

Calls the destroy action on Diffo.Provider.EntityRef.

Calls the destroy action on Diffo.Provider.EntityRef.

Calls the destroy action on Diffo.Provider.Event.

Calls the destroy action on Diffo.Provider.Event.

Calls the destroy action on Diffo.Provider.ExternalIdentifier.

Calls the destroy action on Diffo.Provider.ExternalIdentifier.

Calls the destroy action on Diffo.Provider.Feature.

Calls the destroy action on Diffo.Provider.Feature.

Deletes an instance (or a list of instances, returning an %Ash.BulkResult{}).

Calls the destroy action on Diffo.Provider.Note.

Calls the destroy action on Diffo.Provider.Note.

Same as delete_party!/1 but returns :ok or {:error, error}.

Deletes a Party record (any subtype, dispatched on its struct module).

Calls the destroy action on Diffo.Provider.PartyRef.

Calls the destroy action on Diffo.Provider.PartyRef.

Same as delete_place!/1 but returns :ok or {:error, error}.

Deletes a Place record (any subtype, dispatched on its struct module).

Calls the destroy action on Diffo.Provider.PlaceRef.

Calls the destroy action on Diffo.Provider.PlaceRef.

Calls the destroy action on Diffo.Provider.ProcessStatus.

Calls the destroy action on Diffo.Provider.ProcessStatus.

Calls the destroy action on Diffo.Provider.Relationship.

Calls the destroy action on Diffo.Provider.Relationship.

Calls the destroy action on Diffo.Provider.Specification.

Calls the destroy action on Diffo.Provider.Specification.

Same as feasibilityCheck_service!/2 but returns {:ok, record} or {:error, error}.

Feasibility-checks a service instance (dispatches on the record's resource).

Finds instances whose name contains the query, each projected to its concrete leaf.

Finds instances by specification id, each projected to its concrete leaf.

Finds Parties whose id contains the query, each projected to its concrete world.

Finds Parties whose name contains the query, each projected to its concrete world.

Finds Places whose id contains the query, each projected to its concrete world.

Finds Places whose name contains the query, each projected to its concrete world.

Fires an event on an instance, maintaining the event chain.

Calls the read action on Diffo.Provider.AssignableCharacteristic.

Calls the read action on Diffo.Provider.AssignableCharacteristic.

Calls the read action on Diffo.Provider.AssignmentRelationship.

Calls the read action on Diffo.Provider.AssignmentRelationship.

Calls the read action on Diffo.Provider.Characteristic.

Calls the read action on Diffo.Provider.Characteristic.

Calls the read action on Diffo.Provider.DefinedSimpleRelationship.

Calls the read action on Diffo.Provider.DefinedSimpleRelationship.

Calls the read action on Diffo.Provider.Entity.

Calls the read action on Diffo.Provider.Entity.

Calls the read action on Diffo.Provider.EntityRef.

Calls the read action on Diffo.Provider.EntityRef.

Calls the read action on Diffo.Provider.Event.

Calls the read action on Diffo.Provider.Event.

Calls the read action on Diffo.Provider.ExternalIdentifier.

Calls the read action on Diffo.Provider.ExternalIdentifier.

Calls the read action on Diffo.Provider.Feature.

Calls the read action on Diffo.Provider.Feature.

Same as get_instance_by_id!/2 but returns {:ok, record} or {:error, error}.

Loads an instance by id and projects it to its concrete Service/Resource leaf.

gets the serviceSpecification or resourceSpecification by name with highest major version

gets the serviceSpecification or resourceSpecification by name with highest major version

Calls the read action on Diffo.Provider.Note.

Calls the read action on Diffo.Provider.Note.

Same as get_party_by_id!/1 but returns {:ok, record} or {:error, error}.

Loads a Party by id and projects to the outermost concrete world.

Calls the read action on Diffo.Provider.PartyRef.

Calls the read action on Diffo.Provider.PartyRef.

Same as get_place_by_id!/1 but returns {:ok, record} or {:error, error}.

Loads a Place by id and projects to the outermost concrete world.

Calls the read action on Diffo.Provider.PlaceRef.

Calls the read action on Diffo.Provider.PlaceRef.

Calls the read action on Diffo.Provider.ProcessStatus.

Calls the read action on Diffo.Provider.ProcessStatus.

Calls the read action on Diffo.Provider.Relationship.

Calls the read action on Diffo.Provider.Relationship.

Calls the read action on Diffo.Provider.Specification.

Calls the read action on Diffo.Provider.Specification.

Same as lifecycle_resource!/2 but returns {:ok, record} or {:error, error}.

Sets the TMF lifecycleState of a resource instance.

Lists all instances, each projected to its concrete Service/Resource leaf.

Same as list_parties!/0 but returns {:ok, list} or {:error, error}.

Lists all Parties, each projected to its outermost concrete world.

Lists PartyRefs whose source matches the given Instance/Place/Party.

Lists PartyRefs targeting the given Party.

Lists PlaceRefs whose source matches the given Instance/Party/Place.

Lists PlaceRefs targeting the given Place.

Same as list_places!/0 but returns {:ok, list} or {:error, error}.

Lists all Places, each projected to its outermost concrete world.

lists resource relationships from the instance

lists service relationships from the instance

lists all serviceSpecification and resourceSpecification

lists all serviceSpecification and resourceSpecification

increments the minor version and resets the patch version

increments the minor version and resets the patch version

page(page, request) deprecated

Returns the query corresponding to the action.

Returns the query corresponding to the action.

Returns the query corresponding to the action.

Returns the query corresponding to the action.

Returns the query corresponding to the action.

Returns the query corresponding to the action.

Returns the query corresponding to the action.

Returns the query corresponding to the action.

Returns the query corresponding to the action.

Returns the query corresponding to the action.

Returns the query corresponding to the action.

Returns the query corresponding to the action.

Returns the query corresponding to the action.

Returns the query corresponding to the action.

Returns the query corresponding to the action.

Returns the query corresponding to the action.

Returns the query corresponding to the action.

Returns the query corresponding to the action.

Returns the query corresponding to the action.

Returns the query corresponding to the action.

Returns the query corresponding to the action.

Returns the query corresponding to the action.

Returns the query corresponding to the action.

Returns the query corresponding to the action.

Returns the query corresponding to the action.

Returns the query corresponding to the action.

Relates characteristics to an instance.

Relates features to an instance.

Reserves a service instance.

Respecifies an instance (changes its specification).

Updates the operating status of a service instance.

Suspends a service instance.

Terminates a service instance.

Unrelates characteristics from an instance.

Unrelates features from an instance.

unrelates characteristic from the relationship

Calls the update action on Diffo.Provider.AssignableCharacteristic.

Calls the update action on Diffo.Provider.AssignableCharacteristic.

updates the characteristic value or instance, feature or relationship

updates the characteristic value or instance, feature or relationship

updates the feature isEnabled or instance relationship

updates the feature isEnabled or instance relationship

updates the note, touching the timestamp

updates the note, touching the timestamp

Same as update_party!/2 but returns {:ok, record} or {:error, error}.

Updates a Party by dispatching on the record's struct module.

Same as update_place!/2 but returns {:ok, record} or {:error, error}.

Updates a Place by dispatching on the record's struct module.

updates a process status, touching the timestamp

updates a process status, touching the timestamp

updates the relationship type and/or alias

updates the relationship type and/or alias

Types

party_type()

@type party_type() :: :Organization | :Individual | :PartyRef | :Entity

TMF blessed Party type atoms accepted by the dispatcher.

:PartyRef and :Entity route to the abstract Provider.Party's :create action (no subtype-specific attributes). :PartyRef is the "placeholder Party" type — a record with referred_type: set, used as the target of a PartyRef to an externally-managed Party. :Entity is diffo's extension to the TMF type enum for party-like aggregates that aren't strictly Organization or Individual.

place_type()

@type place_type() ::
  :GeographicAddress | :GeographicSite | :GeographicLocation | :PlaceRef

TMF blessed Place type atoms accepted by the dispatcher.

:PlaceRef is the "placeholder Place" type — a record with referred_type: set, used as the target of a PlaceRef to an externally-managed Place. Dispatches to the abstract Provider.Place's :create action (no subtype-specific attributes).

tagged_source()

@type tagged_source() :: {:instance | :party | :place, String.t()}

Tagged source for ref dispatchers.

Functions

activate_service(record)

activate_service!(record)

Activates a service instance.

aggregate(query, aggregate_or_aggregates, opts \\ [])

This function is deprecated. Use `Ash.aggregate/3` instead.

aggregate!(query, aggregate_or_aggregates, opts \\ [])

This function is deprecated. Use `Ash.aggregate!/3` instead.

annotate_instance(record, attrs \\ %{})

annotate_instance!(record, attrs \\ %{})

Annotates an instance with a note.

avg(query, field, opts \\ [])

This function is deprecated. Use `Ash.avg/3` instead.

avg!(query, field, opts \\ [])

This function is deprecated. Use `Ash.avg!/3` instead.

bulk_create(inputs, resource, action, opts \\ [])

This function is deprecated. Use `Ash.bulk_create/4` instead.

bulk_create!(inputs, resource, action, opts \\ [])

This function is deprecated. Use `Ash.bulk_create!/4` instead.

bulk_destroy(stream_or_query, action, input, opts \\ [])

This function is deprecated. Use `Ash.bulk_destroy/4` instead.

bulk_destroy!(stream_or_query, action, input, opts \\ [])

This function is deprecated. Use `Ash.bulk_destroy!/4` instead.

bulk_update(stream_or_query, action, input, opts \\ [])

This function is deprecated. Use `Ash.bulk_update/4` instead.

bulk_update!(stream_or_query, action, input, opts \\ [])

This function is deprecated. Use `Ash.bulk_update!/4` instead.

calculate(resource, calculation, opts \\ [])

This function is deprecated. Use `Ash.calculate/3` instead.

calculate!(resource, calculation, opts \\ [])

This function is deprecated. Use `Ash.calculate!/3` instead.

can(action_or_query_or_changeset, actor, opts \\ [])

This function is deprecated. Use `Ash.can/3` instead.
@spec can(
  action_or_query_or_changeset ::
    Ash.Query.t()
    | Ash.Changeset.t()
    | {Ash.Resource.t(), atom() | Ash.Resource.Actions.action()},
  actor :: term(),
  opts :: Keyword.t()
) ::
  {:ok, boolean() | :maybe}
  | {:ok, true, Ash.Changeset.t() | Ash.Query.t()}
  | {:ok, true, Ash.Changeset.t(), Ash.Query.t()}
  | {:ok, false, Exception.t()}
  | {:error, term()}

can?(query_or_changeset_or_action, actor, opts \\ [])

This function is deprecated. Use `Ash.can?/3` instead.
@spec can?(
  query_or_changeset_or_action ::
    Ash.Query.t()
    | Ash.Changeset.t()
    | {Ash.Resource.t(), atom() | Ash.Resource.Actions.action()},
  actor :: term(),
  opts :: Keyword.t()
) :: boolean() | no_return()

can_categorise_specification(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Specification.categorise

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_categorise_specification?(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Specification.categorise, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_create_assignable_characteristic(actor, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.AssignableCharacteristic.create

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_create_assignable_characteristic?(actor, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.AssignableCharacteristic.create, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_create_assignment_relationship(actor, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.AssignmentRelationship.create

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_create_assignment_relationship?(actor, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.AssignmentRelationship.create, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_create_characteristic(actor, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Characteristic.create

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_create_characteristic?(actor, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Characteristic.create, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_create_defined_simple_relationship(actor, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.DefinedSimpleRelationship.create

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_create_defined_simple_relationship?(actor, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.DefinedSimpleRelationship.create, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_create_entity(actor, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Entity.create

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_create_entity?(actor, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Entity.create, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_create_entity_ref(actor, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.EntityRef.create

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_create_entity_ref?(actor, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.EntityRef.create, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_create_external_identifier(actor, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.ExternalIdentifier.create

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_create_external_identifier?(actor, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.ExternalIdentifier.create, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_create_feature(actor, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Feature.create

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_create_feature?(actor, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Feature.create, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_create_note(actor, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Note.create

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_create_note?(actor, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Note.create, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_create_party_ref(actor, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.PartyRef.create

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_create_party_ref?(actor, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.PartyRef.create, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_create_place_ref(actor, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.PlaceRef.create

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_create_place_ref?(actor, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.PlaceRef.create, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_create_process_status(actor, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.ProcessStatus.create

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_create_process_status?(actor, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.ProcessStatus.create, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_create_relationship(actor, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Relationship.create

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_create_relationship?(actor, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Relationship.create, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_create_specification(actor, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Specification.create

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_create_specification?(actor, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Specification.create, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_delete_assignable_characteristic(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.AssignableCharacteristic.destroy

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_delete_assignable_characteristic?(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.AssignableCharacteristic.destroy, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_delete_assignment_relationship(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.AssignmentRelationship.destroy

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_delete_assignment_relationship?(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.AssignmentRelationship.destroy, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_delete_characteristic(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Characteristic.destroy

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_delete_characteristic?(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Characteristic.destroy, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_delete_defined_simple_relationship(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.DefinedSimpleRelationship.destroy

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_delete_defined_simple_relationship?(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.DefinedSimpleRelationship.destroy, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_delete_entity(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Entity.destroy

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_delete_entity?(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Entity.destroy, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_delete_entity_ref(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.EntityRef.destroy

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_delete_entity_ref?(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.EntityRef.destroy, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_delete_event(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Event.destroy

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_delete_event?(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Event.destroy, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_delete_external_identifier(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.ExternalIdentifier.destroy

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_delete_external_identifier?(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.ExternalIdentifier.destroy, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_delete_feature(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Feature.destroy

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_delete_feature?(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Feature.destroy, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_delete_note(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Note.destroy

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_delete_note?(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Note.destroy, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_delete_party_ref(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.PartyRef.destroy

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_delete_party_ref?(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.PartyRef.destroy, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_delete_place_ref(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.PlaceRef.destroy

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_delete_place_ref?(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.PlaceRef.destroy, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_delete_process_status(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.ProcessStatus.destroy

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_delete_process_status?(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.ProcessStatus.destroy, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_delete_relationship(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Relationship.destroy

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_delete_relationship?(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Relationship.destroy, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_delete_specification(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Specification.destroy

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_delete_specification?(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Specification.destroy, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_describe_specification(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Specification.describe

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_describe_specification?(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Specification.describe, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_find_entities_by_id(actor, query, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Entity.find_by_id

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_find_entities_by_id?(actor, query, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Entity.find_by_id, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_find_entities_by_name(actor, query, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Entity.find_by_name

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_find_entities_by_name?(actor, query, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Entity.find_by_name, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_find_external_identifiers_by_external_id(actor, query, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.ExternalIdentifier.find_by_external_id

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_find_external_identifiers_by_external_id?(actor, query, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.ExternalIdentifier.find_by_external_id, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_find_notes_by_note_id(actor, query, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Note.find_by_note_id

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_find_notes_by_note_id?(actor, query, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Note.find_by_note_id, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_find_specifications_by_category(actor, query, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Specification.find_by_category

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_find_specifications_by_category?(actor, query, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Specification.find_by_category, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_find_specifications_by_name(actor, query, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Specification.find_by_name

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_find_specifications_by_name?(actor, query, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Specification.find_by_name, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_get_assignable_characteristic_by_id(actor, id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.AssignableCharacteristic.read

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_get_assignable_characteristic_by_id?(actor, id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.AssignableCharacteristic.read, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_get_assignment_relationship_by_id(actor, id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.AssignmentRelationship.read

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_get_assignment_relationship_by_id?(actor, id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.AssignmentRelationship.read, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_get_characteristic_by_id(actor, id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Characteristic.read

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_get_characteristic_by_id?(actor, id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Characteristic.read, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_get_defined_simple_relationship_by_id(actor, id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.DefinedSimpleRelationship.read

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_get_defined_simple_relationship_by_id?(actor, id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.DefinedSimpleRelationship.read, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_get_entity_by_id(actor, id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Entity.read

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_get_entity_by_id?(actor, id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Entity.read, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_get_entity_ref_by_id(actor, id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.EntityRef.read

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_get_entity_ref_by_id?(actor, id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.EntityRef.read, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_get_event_by_id(actor, id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Event.read

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_get_event_by_id?(actor, id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Event.read, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_get_external_identifier_by_id(actor, id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.ExternalIdentifier.read

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_get_external_identifier_by_id?(actor, id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.ExternalIdentifier.read, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_get_feature_by_id(actor, id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Feature.read

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_get_feature_by_id?(actor, id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Feature.read, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_get_latest_specification_by_name(actor, query, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Specification.get_latest

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_get_latest_specification_by_name?(actor, query, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Specification.get_latest, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_get_note_by_id(actor, id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Note.read

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_get_note_by_id?(actor, id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Note.read, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_get_party_ref_by_id(actor, id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.PartyRef.read

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_get_party_ref_by_id?(actor, id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.PartyRef.read, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_get_place_ref_by_id(actor, id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.PlaceRef.read

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_get_place_ref_by_id?(actor, id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.PlaceRef.read, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_get_process_status_by_id(actor, id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.ProcessStatus.read

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_get_process_status_by_id?(actor, id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.ProcessStatus.read, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_get_relationship_by_id(actor, id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Relationship.read

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_get_relationship_by_id?(actor, id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Relationship.read, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_get_specification_by_id(actor, id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Specification.read

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_get_specification_by_id?(actor, id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Specification.read, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_characteristics(actor, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Characteristic.list

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_characteristics?(actor, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Characteristic.list, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_entities(actor, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Entity.list

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_entities?(actor, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Entity.list, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_entity_refs(actor, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.EntityRef.list

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_entity_refs?(actor, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.EntityRef.list, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_entity_refs_by_entity_id(actor, entity_id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.EntityRef.list_entity_refs_by_entity_id

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_entity_refs_by_entity_id?(actor, entity_id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.EntityRef.list_entity_refs_by_entity_id, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_entity_refs_by_instance_id(actor, instance_id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.EntityRef.list_entity_refs_by_instance_id

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_entity_refs_by_instance_id?(actor, instance_id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.EntityRef.list_entity_refs_by_instance_id, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_events(actor, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Event.list

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_events?(actor, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Event.list, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_events_by_instance_id(actor, instance_id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Event.list_events_by_instance_id

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_events_by_instance_id?(actor, instance_id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Event.list_events_by_instance_id, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_external_identifiers(actor, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.ExternalIdentifier.list

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_external_identifiers?(actor, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.ExternalIdentifier.list, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_external_identifiers_by_instance_id(actor, instance_id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.ExternalIdentifier.list_external_identifiers_by_instance_id

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_external_identifiers_by_instance_id?(actor, instance_id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.ExternalIdentifier.list_external_identifiers_by_instance_id, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_external_identifiers_by_owner_id(actor, owner_id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.ExternalIdentifier.list_external_identifiers_by_owner_id

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_external_identifiers_by_owner_id?(actor, owner_id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.ExternalIdentifier.list_external_identifiers_by_owner_id, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_features(actor, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Feature.list

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_features?(actor, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Feature.list, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_notes(actor, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Note.list

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_notes?(actor, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Note.list, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_notes_by_author_id(actor, author_id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Note.list_notes_by_author_id

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_notes_by_author_id?(actor, author_id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Note.list_notes_by_author_id, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_notes_by_instance_id(actor, instance_id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Note.list_notes_by_instance_id

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_notes_by_instance_id?(actor, instance_id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Note.list_notes_by_instance_id, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_party_refs(actor, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.PartyRef.list

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_party_refs?(actor, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.PartyRef.list, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_party_refs_by_instance_id(actor, instance_id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.PartyRef.list_party_refs_by_instance_id

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_party_refs_by_instance_id?(actor, instance_id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.PartyRef.list_party_refs_by_instance_id, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_party_refs_by_party_id(actor, party_id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.PartyRef.list_party_refs_by_party_id

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_party_refs_by_party_id?(actor, party_id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.PartyRef.list_party_refs_by_party_id, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_party_refs_by_place_id(actor, place_id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.PartyRef.list_party_refs_by_place_id

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_party_refs_by_place_id?(actor, place_id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.PartyRef.list_party_refs_by_place_id, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_party_refs_by_source_party_id(actor, source_party_id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.PartyRef.list_party_refs_by_source_party_id

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_party_refs_by_source_party_id?(actor, source_party_id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.PartyRef.list_party_refs_by_source_party_id, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_place_refs(actor, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.PlaceRef.list

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_place_refs?(actor, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.PlaceRef.list, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_place_refs_by_instance_id(actor, instance_id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.PlaceRef.list_place_refs_by_instance_id

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_place_refs_by_instance_id?(actor, instance_id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.PlaceRef.list_place_refs_by_instance_id, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_place_refs_by_party_id(actor, party_id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.PlaceRef.list_place_refs_by_party_id

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_place_refs_by_party_id?(actor, party_id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.PlaceRef.list_place_refs_by_party_id, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_place_refs_by_place_id(actor, place_id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.PlaceRef.list_place_refs_by_place_id

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_place_refs_by_place_id?(actor, place_id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.PlaceRef.list_place_refs_by_place_id, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_place_refs_by_source_place_id(actor, source_place_id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.PlaceRef.list_place_refs_by_source_place_id

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_place_refs_by_source_place_id?(actor, source_place_id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.PlaceRef.list_place_refs_by_source_place_id, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_process_statuses(actor, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.ProcessStatus.list

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_process_statuses?(actor, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.ProcessStatus.list, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_process_statuses_by_instance_id(actor, instance_id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.ProcessStatus.list_process_statuses_by_instance_id

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_process_statuses_by_instance_id?(actor, instance_id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.ProcessStatus.list_process_statuses_by_instance_id, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_relationships(actor, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Relationship.list

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_relationships?(actor, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Relationship.list, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_resource_relationships_from(actor, instance_id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Relationship.list_resource_relationships_from

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_resource_relationships_from?(actor, instance_id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Relationship.list_resource_relationships_from, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_service_relationships_from(actor, instance_id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Relationship.list_service_relationships_from

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_service_relationships_from?(actor, instance_id, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Relationship.list_service_relationships_from, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_specifications(actor, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Specification.list

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_list_specifications?(actor, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Specification.list, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_next_minor_specification(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Specification.next_minor

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_next_minor_specification?(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Specification.next_minor, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_next_patch_specification(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Specification.next_patch

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_next_patch_specification?(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Specification.next_patch, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_relate_feature_characteristics(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Feature.relate_characteristics

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_relate_feature_characteristics?(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Feature.relate_characteristics, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_relate_relationship_characteristics(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Relationship.relate_characteristics

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_relate_relationship_characteristics?(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Relationship.relate_characteristics, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_unrelate_feature_characteristics(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Feature.unrelate_characteristics

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_unrelate_feature_characteristics?(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Feature.unrelate_characteristics, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_unrelate_relationship_characteristics(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Relationship.unrelate_characteristics

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_unrelate_relationship_characteristics?(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Relationship.unrelate_characteristics, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_update_assignable_characteristic(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.AssignableCharacteristic.update

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_update_assignable_characteristic?(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.AssignableCharacteristic.update, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_update_characteristic(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Characteristic.update

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_update_characteristic?(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Characteristic.update, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_update_entity(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Entity.update

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_update_entity?(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Entity.update, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_update_entity_ref(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.EntityRef.update

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_update_entity_ref?(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.EntityRef.update, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_update_external_identifier(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.ExternalIdentifier.update

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_update_external_identifier?(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.ExternalIdentifier.update, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_update_feature(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Feature.update

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_update_feature?(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Feature.update, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_update_note(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Note.update

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_update_note?(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Note.update, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_update_party_ref(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.PartyRef.update

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_update_party_ref?(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.PartyRef.update, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_update_place_ref(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.PlaceRef.update

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_update_place_ref?(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.PlaceRef.update, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_update_process_status(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.ProcessStatus.update

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_update_process_status?(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.ProcessStatus.update, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_update_relationship(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Relationship.update

See Ash.can/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

can_update_relationship?(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for Diffo.Provider.Relationship.update, returning a boolean.

See Ash.can?/3 for more information

Options

  • :maybe_is (term/0) - If the actor may be able to perform the action, what value should be returned. The default value is :maybe.

  • :filter_with - If set to :error, the query will raise an error on a match. If set to :filter the query will filter out unauthorized access. Valid values are :filter, :error The default value is :filter.

  • :validate? (boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value is false.

  • :reuse_values? (boolean/0) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect if pre_flight? is false. The default value is false.

  • :pre_flight? (boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value is true.

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument to can/3. See Ash.Scope for more.

  • :context (map/0) - Context to set on the query/changeset/action_input being authorized

  • :run_queries? (boolean/0) - Whether or not to run queries. If set to true, :maybe will not be returned. The default value is true.

  • :data - The record or records specifically attempting to be acted upon.

  • :tenant (value that implements the Ash.ToTenant protocol) - The tenant to use for authorization

  • :alter_source? (boolean/0) - If set to true, the source being authorized is returned so it can be run. The default value is false.

  • :base_query (term/0) - A base query on which to apply an generated filters

  • :no_check? (boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value is false.

  • :on_must_pass_strict_check (term/0) - Override the value returned when no_check? is true but a check must be run.

  • :atomic_changeset (term/0) - A base query on which to apply an generated filters

  • :return_forbidden_error? (boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value is false.

  • :log? (boolean/0) - Whether or not to log the authorization result. The default value is false.

  • :log_policy_breakdown? (boolean/0) - If set to false, suppresses policy breakdown logs, overriding the global show_policy_breakdowns? configuration.

cancel_service(record)

cancel_service!(record)

Cancels a service instance.

categorise_specification(record, params \\ nil, opts \\ nil)

updates the category

Inputs

  • category - the category of the service or resource specified by a major version of this specification

Options

  • :params (map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.

  • :atomic_upgrade? (boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_update, if a query, list, or stream of inputs is provided.

    • :atomic_update (map/0) - A map of atomic updates to apply. See Ash.Changeset.atomic_update/3 for more.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is [:atomic].

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

categorise_specification!(record, params \\ nil, opts \\ nil)

updates the category

Raises any errors instead of returning them

Inputs

  • category - the category of the service or resource specified by a major version of this specification

Options

  • :params (map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.

  • :atomic_upgrade? (boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_update, if a query, list, or stream of inputs is provided.

    • :atomic_update (map/0) - A map of atomic updates to apply. See Ash.Changeset.atomic_update/3 for more.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is [:atomic].

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

changeset_to_categorise_specification(record, params_or_opts \\ %{}, opts \\ [])

Returns the changeset corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

changeset_to_create_assignable_characteristic(params_or_opts \\ %{}, opts \\ [])

Returns the changeset corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :changeset (term/0) - A changeset to seed the action with.

changeset_to_create_assignment_relationship(params_or_opts \\ %{}, opts \\ [])

Returns the changeset corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :changeset (term/0) - A changeset to seed the action with.

changeset_to_create_characteristic(params_or_opts \\ %{}, opts \\ [])

Returns the changeset corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :changeset (term/0) - A changeset to seed the action with.

changeset_to_create_defined_simple_relationship(params_or_opts \\ %{}, opts \\ [])

Returns the changeset corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :changeset (term/0) - A changeset to seed the action with.

changeset_to_create_entity(params_or_opts \\ %{}, opts \\ [])

Returns the changeset corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :changeset (term/0) - A changeset to seed the action with.

changeset_to_create_entity_ref(params_or_opts \\ %{}, opts \\ [])

Returns the changeset corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :changeset (term/0) - A changeset to seed the action with.

changeset_to_create_external_identifier(params_or_opts \\ %{}, opts \\ [])

Returns the changeset corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :changeset (term/0) - A changeset to seed the action with.

changeset_to_create_feature(params_or_opts \\ %{}, opts \\ [])

Returns the changeset corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :changeset (term/0) - A changeset to seed the action with.

changeset_to_create_note(params_or_opts \\ %{}, opts \\ [])

Returns the changeset corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :changeset (term/0) - A changeset to seed the action with.

changeset_to_create_party_ref(params_or_opts \\ %{}, opts \\ [])

Returns the changeset corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :changeset (term/0) - A changeset to seed the action with.

changeset_to_create_place_ref(params_or_opts \\ %{}, opts \\ [])

Returns the changeset corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :changeset (term/0) - A changeset to seed the action with.

changeset_to_create_process_status(params_or_opts \\ %{}, opts \\ [])

Returns the changeset corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :changeset (term/0) - A changeset to seed the action with.

changeset_to_create_relationship(params_or_opts \\ %{}, opts \\ [])

Returns the changeset corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :changeset (term/0) - A changeset to seed the action with.

changeset_to_create_specification(params_or_opts \\ %{}, opts \\ [])

Returns the changeset corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :changeset (term/0) - A changeset to seed the action with.

changeset_to_delete_assignable_characteristic(record, params_or_opts \\ %{}, opts \\ [])

Returns the changeset corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

changeset_to_delete_assignment_relationship(record, params_or_opts \\ %{}, opts \\ [])

Returns the changeset corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

changeset_to_delete_characteristic(record, params_or_opts \\ %{}, opts \\ [])

Returns the changeset corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

changeset_to_delete_defined_simple_relationship(record, params_or_opts \\ %{}, opts \\ [])

Returns the changeset corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

changeset_to_delete_entity(record, params_or_opts \\ %{}, opts \\ [])

Returns the changeset corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

changeset_to_delete_entity_ref(record, params_or_opts \\ %{}, opts \\ [])

Returns the changeset corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

changeset_to_delete_event(record, params_or_opts \\ %{}, opts \\ [])

Returns the changeset corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

changeset_to_delete_external_identifier(record, params_or_opts \\ %{}, opts \\ [])

Returns the changeset corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

changeset_to_delete_feature(record, params_or_opts \\ %{}, opts \\ [])

Returns the changeset corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

changeset_to_delete_note(record, params_or_opts \\ %{}, opts \\ [])

Returns the changeset corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

changeset_to_delete_party_ref(record, params_or_opts \\ %{}, opts \\ [])

Returns the changeset corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

changeset_to_delete_place_ref(record, params_or_opts \\ %{}, opts \\ [])

Returns the changeset corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

changeset_to_delete_process_status(record, params_or_opts \\ %{}, opts \\ [])

Returns the changeset corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

changeset_to_delete_relationship(record, params_or_opts \\ %{}, opts \\ [])

Returns the changeset corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

changeset_to_delete_specification(record, params_or_opts \\ %{}, opts \\ [])

Returns the changeset corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

changeset_to_describe_specification(record, params_or_opts \\ %{}, opts \\ [])

Returns the changeset corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

changeset_to_next_minor_specification(record, params_or_opts \\ %{}, opts \\ [])

Returns the changeset corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

changeset_to_next_patch_specification(record, params_or_opts \\ %{}, opts \\ [])

Returns the changeset corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

changeset_to_relate_feature_characteristics(record, params_or_opts \\ %{}, opts \\ [])

Returns the changeset corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

changeset_to_relate_relationship_characteristics(record, params_or_opts \\ %{}, opts \\ [])

Returns the changeset corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

changeset_to_unrelate_feature_characteristics(record, params_or_opts \\ %{}, opts \\ [])

Returns the changeset corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

changeset_to_unrelate_relationship_characteristics(record, params_or_opts \\ %{}, opts \\ [])

Returns the changeset corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

changeset_to_update_assignable_characteristic(record, params_or_opts \\ %{}, opts \\ [])

Returns the changeset corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

changeset_to_update_characteristic(record, params_or_opts \\ %{}, opts \\ [])

Returns the changeset corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

changeset_to_update_entity(record, params_or_opts \\ %{}, opts \\ [])

Returns the changeset corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

changeset_to_update_entity_ref(record, params_or_opts \\ %{}, opts \\ [])

Returns the changeset corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

changeset_to_update_external_identifier(record, params_or_opts \\ %{}, opts \\ [])

Returns the changeset corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

changeset_to_update_feature(record, params_or_opts \\ %{}, opts \\ [])

Returns the changeset corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

changeset_to_update_note(record, params_or_opts \\ %{}, opts \\ [])

Returns the changeset corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

changeset_to_update_party_ref(record, params_or_opts \\ %{}, opts \\ [])

Returns the changeset corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

changeset_to_update_place_ref(record, params_or_opts \\ %{}, opts \\ [])

Returns the changeset corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

changeset_to_update_process_status(record, params_or_opts \\ %{}, opts \\ [])

Returns the changeset corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

changeset_to_update_relationship(record, params_or_opts \\ %{}, opts \\ [])

Returns the changeset corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

count(query, opts \\ [])

This function is deprecated. Use `Ash.count/2` instead.

count!(query, opts \\ [])

This function is deprecated. Use `Ash.count!/2` instead.

create(changeset, opts \\ [])

This function is deprecated. Use `Ash.create/2` instead.

create!(changeset, opts \\ [])

This function is deprecated. Use `Ash.create!/2` instead.

create_assignable_characteristic(params \\ nil, opts \\ nil)

Calls the create action on Diffo.Provider.AssignableCharacteristic.

Inputs

  • first - the first assignable value in the pool
  • name - the role name of this characteristic on the owning instance or feature
  • last - the last assignable value in the pool
  • algorithm - the selection algorithm for auto-assign
  • instance_id
  • thing - the kind of item being assigned (e.g. :slot, :port); set from the pool declaration at build time
  • assignable_type - the type label of the assignable thing (e.g. "ADSL2+")
  • feature_id

Options

  • :upsert? (boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value is false.

  • :return_skipped_upsert? (boolean/0) - If true, and a record was not upserted because its filter prevented the upsert, the original record (which was not upserted) will be returned. The default value is false.

  • :upsert_identity (atom/0) - The identity to use when detecting conflicts for upsert?, e.g. upsert_identity: :full_name. By default, the primary key is used. Has no effect if upsert?: true is not provided

  • :upsert_fields - The fields to upsert. If not set, the action's upsert_fields is used, and if that is not set, then any fields not being set to defaults are written.

  • :upsert_condition (term/0) - An expression to check if the record should be updated when there's a conflict.

  • :touch_update_defaults? (boolean/0) - Whether or not to apply update defaults (like updated_at timestamps) on upsert. Only relevant when upsert?: true is set. Set to false to skip touching update_default fields when an upsert results in an update. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :changeset (term/0) - A changeset to seed the action with.

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_create, if a list or stream of inputs is provided.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :after_action (function of arity 2) - An after_action hook to be added to each processed changeset

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

create_assignable_characteristic!(params \\ nil, opts \\ nil)

Calls the create action on Diffo.Provider.AssignableCharacteristic.

Raises any errors instead of returning them

Inputs

  • first - the first assignable value in the pool
  • name - the role name of this characteristic on the owning instance or feature
  • last - the last assignable value in the pool
  • algorithm - the selection algorithm for auto-assign
  • instance_id
  • thing - the kind of item being assigned (e.g. :slot, :port); set from the pool declaration at build time
  • assignable_type - the type label of the assignable thing (e.g. "ADSL2+")
  • feature_id

Options

  • :upsert? (boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value is false.

  • :return_skipped_upsert? (boolean/0) - If true, and a record was not upserted because its filter prevented the upsert, the original record (which was not upserted) will be returned. The default value is false.

  • :upsert_identity (atom/0) - The identity to use when detecting conflicts for upsert?, e.g. upsert_identity: :full_name. By default, the primary key is used. Has no effect if upsert?: true is not provided

  • :upsert_fields - The fields to upsert. If not set, the action's upsert_fields is used, and if that is not set, then any fields not being set to defaults are written.

  • :upsert_condition (term/0) - An expression to check if the record should be updated when there's a conflict.

  • :touch_update_defaults? (boolean/0) - Whether or not to apply update defaults (like updated_at timestamps) on upsert. Only relevant when upsert?: true is set. Set to false to skip touching update_default fields when an upsert results in an update. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :changeset (term/0) - A changeset to seed the action with.

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_create, if a list or stream of inputs is provided.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :after_action (function of arity 2) - An after_action hook to be added to each processed changeset

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

create_assignment_relationship(params \\ nil, opts \\ nil)

creates a pool assignment relationship between a source and target instance

Inputs

  • alias - the alias of this assignment, used by the consuming instance to name the slot
  • value - the assigned integer value
  • pool - the pool name this assignment belongs to (e.g. :ports)
  • source_id
  • target_id
  • thing - the kind of thing being assigned (e.g. :port)

Options

  • :upsert? (boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value is false.

  • :return_skipped_upsert? (boolean/0) - If true, and a record was not upserted because its filter prevented the upsert, the original record (which was not upserted) will be returned. The default value is false.

  • :upsert_identity (atom/0) - The identity to use when detecting conflicts for upsert?, e.g. upsert_identity: :full_name. By default, the primary key is used. Has no effect if upsert?: true is not provided

  • :upsert_fields - The fields to upsert. If not set, the action's upsert_fields is used, and if that is not set, then any fields not being set to defaults are written.

  • :upsert_condition (term/0) - An expression to check if the record should be updated when there's a conflict.

  • :touch_update_defaults? (boolean/0) - Whether or not to apply update defaults (like updated_at timestamps) on upsert. Only relevant when upsert?: true is set. Set to false to skip touching update_default fields when an upsert results in an update. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :changeset (term/0) - A changeset to seed the action with.

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_create, if a list or stream of inputs is provided.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :after_action (function of arity 2) - An after_action hook to be added to each processed changeset

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

create_assignment_relationship!(params \\ nil, opts \\ nil)

creates a pool assignment relationship between a source and target instance

Raises any errors instead of returning them

Inputs

  • alias - the alias of this assignment, used by the consuming instance to name the slot
  • value - the assigned integer value
  • pool - the pool name this assignment belongs to (e.g. :ports)
  • source_id
  • target_id
  • thing - the kind of thing being assigned (e.g. :port)

Options

  • :upsert? (boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value is false.

  • :return_skipped_upsert? (boolean/0) - If true, and a record was not upserted because its filter prevented the upsert, the original record (which was not upserted) will be returned. The default value is false.

  • :upsert_identity (atom/0) - The identity to use when detecting conflicts for upsert?, e.g. upsert_identity: :full_name. By default, the primary key is used. Has no effect if upsert?: true is not provided

  • :upsert_fields - The fields to upsert. If not set, the action's upsert_fields is used, and if that is not set, then any fields not being set to defaults are written.

  • :upsert_condition (term/0) - An expression to check if the record should be updated when there's a conflict.

  • :touch_update_defaults? (boolean/0) - Whether or not to apply update defaults (like updated_at timestamps) on upsert. Only relevant when upsert?: true is set. Set to false to skip touching update_default fields when an upsert results in an update. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :changeset (term/0) - A changeset to seed the action with.

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_create, if a list or stream of inputs is provided.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :after_action (function of arity 2) - An after_action hook to be added to each processed changeset

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

create_characteristic(params \\ nil, opts \\ nil)

creates a characteristic

Inputs

  • name - the name of this characteristic
  • type - the type of the characteristic
  • value - the value of the characteristic
  • values - the array of values of the characteristic
  • is_array - true when this characteristic holds an array of values; defaults false

Options

  • :upsert? (boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value is false.

  • :return_skipped_upsert? (boolean/0) - If true, and a record was not upserted because its filter prevented the upsert, the original record (which was not upserted) will be returned. The default value is false.

  • :upsert_identity (atom/0) - The identity to use when detecting conflicts for upsert?, e.g. upsert_identity: :full_name. By default, the primary key is used. Has no effect if upsert?: true is not provided

  • :upsert_fields - The fields to upsert. If not set, the action's upsert_fields is used, and if that is not set, then any fields not being set to defaults are written.

  • :upsert_condition (term/0) - An expression to check if the record should be updated when there's a conflict.

  • :touch_update_defaults? (boolean/0) - Whether or not to apply update defaults (like updated_at timestamps) on upsert. Only relevant when upsert?: true is set. Set to false to skip touching update_default fields when an upsert results in an update. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :changeset (term/0) - A changeset to seed the action with.

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_create, if a list or stream of inputs is provided.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :after_action (function of arity 2) - An after_action hook to be added to each processed changeset

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

create_characteristic!(params \\ nil, opts \\ nil)

creates a characteristic

Raises any errors instead of returning them

Inputs

  • name - the name of this characteristic
  • type - the type of the characteristic
  • value - the value of the characteristic
  • values - the array of values of the characteristic
  • is_array - true when this characteristic holds an array of values; defaults false

Options

  • :upsert? (boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value is false.

  • :return_skipped_upsert? (boolean/0) - If true, and a record was not upserted because its filter prevented the upsert, the original record (which was not upserted) will be returned. The default value is false.

  • :upsert_identity (atom/0) - The identity to use when detecting conflicts for upsert?, e.g. upsert_identity: :full_name. By default, the primary key is used. Has no effect if upsert?: true is not provided

  • :upsert_fields - The fields to upsert. If not set, the action's upsert_fields is used, and if that is not set, then any fields not being set to defaults are written.

  • :upsert_condition (term/0) - An expression to check if the record should be updated when there's a conflict.

  • :touch_update_defaults? (boolean/0) - Whether or not to apply update defaults (like updated_at timestamps) on upsert. Only relevant when upsert?: true is set. Set to false to skip touching update_default fields when an upsert results in an update. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :changeset (term/0) - A changeset to seed the action with.

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_create, if a list or stream of inputs is provided.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :after_action (function of arity 2) - An after_action hook to be added to each processed changeset

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

create_defined_simple_relationship(params \\ nil, opts \\ nil)

creates a defined simple relationship between a source and target instance

Inputs

  • alias - an optional alias for this relationship
  • type - the type of the relationship from the source to the target
  • source_id
  • target_id
  • characteristic - an optional single defining characteristic, set at creation and closed thereafter

Options

  • :upsert? (boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value is false.

  • :return_skipped_upsert? (boolean/0) - If true, and a record was not upserted because its filter prevented the upsert, the original record (which was not upserted) will be returned. The default value is false.

  • :upsert_identity (atom/0) - The identity to use when detecting conflicts for upsert?, e.g. upsert_identity: :full_name. By default, the primary key is used. Has no effect if upsert?: true is not provided

  • :upsert_fields - The fields to upsert. If not set, the action's upsert_fields is used, and if that is not set, then any fields not being set to defaults are written.

  • :upsert_condition (term/0) - An expression to check if the record should be updated when there's a conflict.

  • :touch_update_defaults? (boolean/0) - Whether or not to apply update defaults (like updated_at timestamps) on upsert. Only relevant when upsert?: true is set. Set to false to skip touching update_default fields when an upsert results in an update. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :changeset (term/0) - A changeset to seed the action with.

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_create, if a list or stream of inputs is provided.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :after_action (function of arity 2) - An after_action hook to be added to each processed changeset

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

create_defined_simple_relationship!(params \\ nil, opts \\ nil)

creates a defined simple relationship between a source and target instance

Raises any errors instead of returning them

Inputs

  • alias - an optional alias for this relationship
  • type - the type of the relationship from the source to the target
  • source_id
  • target_id
  • characteristic - an optional single defining characteristic, set at creation and closed thereafter

Options

  • :upsert? (boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value is false.

  • :return_skipped_upsert? (boolean/0) - If true, and a record was not upserted because its filter prevented the upsert, the original record (which was not upserted) will be returned. The default value is false.

  • :upsert_identity (atom/0) - The identity to use when detecting conflicts for upsert?, e.g. upsert_identity: :full_name. By default, the primary key is used. Has no effect if upsert?: true is not provided

  • :upsert_fields - The fields to upsert. If not set, the action's upsert_fields is used, and if that is not set, then any fields not being set to defaults are written.

  • :upsert_condition (term/0) - An expression to check if the record should be updated when there's a conflict.

  • :touch_update_defaults? (boolean/0) - Whether or not to apply update defaults (like updated_at timestamps) on upsert. Only relevant when upsert?: true is set. Set to false to skip touching update_default fields when an upsert results in an update. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :changeset (term/0) - A changeset to seed the action with.

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_create, if a list or stream of inputs is provided.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :after_action (function of arity 2) - An after_action hook to be added to each processed changeset

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

create_entity(params \\ nil, opts \\ nil)

creates a entity

Inputs

  • id - the unique id of the entity
  • name - the name of the entity
  • type - the type of the entity
  • href - the href of the entity
  • referred_type - the type of the entity

Options

  • :upsert? (boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value is false.

  • :return_skipped_upsert? (boolean/0) - If true, and a record was not upserted because its filter prevented the upsert, the original record (which was not upserted) will be returned. The default value is false.

  • :upsert_identity (atom/0) - The identity to use when detecting conflicts for upsert?, e.g. upsert_identity: :full_name. By default, the primary key is used. Has no effect if upsert?: true is not provided

  • :upsert_fields - The fields to upsert. If not set, the action's upsert_fields is used, and if that is not set, then any fields not being set to defaults are written.

  • :upsert_condition (term/0) - An expression to check if the record should be updated when there's a conflict.

  • :touch_update_defaults? (boolean/0) - Whether or not to apply update defaults (like updated_at timestamps) on upsert. Only relevant when upsert?: true is set. Set to false to skip touching update_default fields when an upsert results in an update. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :changeset (term/0) - A changeset to seed the action with.

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_create, if a list or stream of inputs is provided.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :after_action (function of arity 2) - An after_action hook to be added to each processed changeset

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

create_entity!(params \\ nil, opts \\ nil)

creates a entity

Raises any errors instead of returning them

Inputs

  • id - the unique id of the entity
  • name - the name of the entity
  • type - the type of the entity
  • href - the href of the entity
  • referred_type - the type of the entity

Options

  • :upsert? (boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value is false.

  • :return_skipped_upsert? (boolean/0) - If true, and a record was not upserted because its filter prevented the upsert, the original record (which was not upserted) will be returned. The default value is false.

  • :upsert_identity (atom/0) - The identity to use when detecting conflicts for upsert?, e.g. upsert_identity: :full_name. By default, the primary key is used. Has no effect if upsert?: true is not provided

  • :upsert_fields - The fields to upsert. If not set, the action's upsert_fields is used, and if that is not set, then any fields not being set to defaults are written.

  • :upsert_condition (term/0) - An expression to check if the record should be updated when there's a conflict.

  • :touch_update_defaults? (boolean/0) - Whether or not to apply update defaults (like updated_at timestamps) on upsert. Only relevant when upsert?: true is set. Set to false to skip touching update_default fields when an upsert results in an update. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :changeset (term/0) - A changeset to seed the action with.

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_create, if a list or stream of inputs is provided.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :after_action (function of arity 2) - An after_action hook to be added to each processed changeset

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

create_entity_ref(params \\ nil, opts \\ nil)

creates a entity ref, relating an instance and entity

Inputs

  • role - the role of the entity to the instance
  • instance_id
  • entity_id

Options

  • :upsert? (boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value is false.

  • :return_skipped_upsert? (boolean/0) - If true, and a record was not upserted because its filter prevented the upsert, the original record (which was not upserted) will be returned. The default value is false.

  • :upsert_identity (atom/0) - The identity to use when detecting conflicts for upsert?, e.g. upsert_identity: :full_name. By default, the primary key is used. Has no effect if upsert?: true is not provided

  • :upsert_fields - The fields to upsert. If not set, the action's upsert_fields is used, and if that is not set, then any fields not being set to defaults are written.

  • :upsert_condition (term/0) - An expression to check if the record should be updated when there's a conflict.

  • :touch_update_defaults? (boolean/0) - Whether or not to apply update defaults (like updated_at timestamps) on upsert. Only relevant when upsert?: true is set. Set to false to skip touching update_default fields when an upsert results in an update. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :changeset (term/0) - A changeset to seed the action with.

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_create, if a list or stream of inputs is provided.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :after_action (function of arity 2) - An after_action hook to be added to each processed changeset

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

create_entity_ref!(params \\ nil, opts \\ nil)

creates a entity ref, relating an instance and entity

Raises any errors instead of returning them

Inputs

  • role - the role of the entity to the instance
  • instance_id
  • entity_id

Options

  • :upsert? (boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value is false.

  • :return_skipped_upsert? (boolean/0) - If true, and a record was not upserted because its filter prevented the upsert, the original record (which was not upserted) will be returned. The default value is false.

  • :upsert_identity (atom/0) - The identity to use when detecting conflicts for upsert?, e.g. upsert_identity: :full_name. By default, the primary key is used. Has no effect if upsert?: true is not provided

  • :upsert_fields - The fields to upsert. If not set, the action's upsert_fields is used, and if that is not set, then any fields not being set to defaults are written.

  • :upsert_condition (term/0) - An expression to check if the record should be updated when there's a conflict.

  • :touch_update_defaults? (boolean/0) - Whether or not to apply update defaults (like updated_at timestamps) on upsert. Only relevant when upsert?: true is set. Set to false to skip touching update_default fields when an upsert results in an update. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :changeset (term/0) - A changeset to seed the action with.

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_create, if a list or stream of inputs is provided.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :after_action (function of arity 2) - An after_action hook to be added to each processed changeset

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

create_external_identifier(params \\ nil, opts \\ nil)

creates a external identifier related to an instance and optionally an owner party

Inputs

  • type - the type of this external identifier, this is an optional value
  • instance_id
  • owner_id
  • external_id - the id of the external identifier, this is an optional value

Options

  • :upsert? (boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value is false.

  • :return_skipped_upsert? (boolean/0) - If true, and a record was not upserted because its filter prevented the upsert, the original record (which was not upserted) will be returned. The default value is false.

  • :upsert_identity (atom/0) - The identity to use when detecting conflicts for upsert?, e.g. upsert_identity: :full_name. By default, the primary key is used. Has no effect if upsert?: true is not provided

  • :upsert_fields - The fields to upsert. If not set, the action's upsert_fields is used, and if that is not set, then any fields not being set to defaults are written.

  • :upsert_condition (term/0) - An expression to check if the record should be updated when there's a conflict.

  • :touch_update_defaults? (boolean/0) - Whether or not to apply update defaults (like updated_at timestamps) on upsert. Only relevant when upsert?: true is set. Set to false to skip touching update_default fields when an upsert results in an update. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :changeset (term/0) - A changeset to seed the action with.

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_create, if a list or stream of inputs is provided.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :after_action (function of arity 2) - An after_action hook to be added to each processed changeset

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

create_external_identifier!(params \\ nil, opts \\ nil)

creates a external identifier related to an instance and optionally an owner party

Raises any errors instead of returning them

Inputs

  • type - the type of this external identifier, this is an optional value
  • instance_id
  • owner_id
  • external_id - the id of the external identifier, this is an optional value

Options

  • :upsert? (boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value is false.

  • :return_skipped_upsert? (boolean/0) - If true, and a record was not upserted because its filter prevented the upsert, the original record (which was not upserted) will be returned. The default value is false.

  • :upsert_identity (atom/0) - The identity to use when detecting conflicts for upsert?, e.g. upsert_identity: :full_name. By default, the primary key is used. Has no effect if upsert?: true is not provided

  • :upsert_fields - The fields to upsert. If not set, the action's upsert_fields is used, and if that is not set, then any fields not being set to defaults are written.

  • :upsert_condition (term/0) - An expression to check if the record should be updated when there's a conflict.

  • :touch_update_defaults? (boolean/0) - Whether or not to apply update defaults (like updated_at timestamps) on upsert. Only relevant when upsert?: true is set. Set to false to skip touching update_default fields when an upsert results in an update. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :changeset (term/0) - A changeset to seed the action with.

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_create, if a list or stream of inputs is provided.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :after_action (function of arity 2) - An after_action hook to be added to each processed changeset

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

create_feature(params \\ nil, opts \\ nil)

creates a feature, optionally with related characteristic

Inputs

  • name - the name of this feature
  • characteristics
  • isEnabled - indicates whether the feature is enabled

Options

  • :upsert? (boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value is false.

  • :return_skipped_upsert? (boolean/0) - If true, and a record was not upserted because its filter prevented the upsert, the original record (which was not upserted) will be returned. The default value is false.

  • :upsert_identity (atom/0) - The identity to use when detecting conflicts for upsert?, e.g. upsert_identity: :full_name. By default, the primary key is used. Has no effect if upsert?: true is not provided

  • :upsert_fields - The fields to upsert. If not set, the action's upsert_fields is used, and if that is not set, then any fields not being set to defaults are written.

  • :upsert_condition (term/0) - An expression to check if the record should be updated when there's a conflict.

  • :touch_update_defaults? (boolean/0) - Whether or not to apply update defaults (like updated_at timestamps) on upsert. Only relevant when upsert?: true is set. Set to false to skip touching update_default fields when an upsert results in an update. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :changeset (term/0) - A changeset to seed the action with.

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_create, if a list or stream of inputs is provided.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :after_action (function of arity 2) - An after_action hook to be added to each processed changeset

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

create_feature!(params \\ nil, opts \\ nil)

creates a feature, optionally with related characteristic

Raises any errors instead of returning them

Inputs

  • name - the name of this feature
  • characteristics
  • isEnabled - indicates whether the feature is enabled

Options

  • :upsert? (boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value is false.

  • :return_skipped_upsert? (boolean/0) - If true, and a record was not upserted because its filter prevented the upsert, the original record (which was not upserted) will be returned. The default value is false.

  • :upsert_identity (atom/0) - The identity to use when detecting conflicts for upsert?, e.g. upsert_identity: :full_name. By default, the primary key is used. Has no effect if upsert?: true is not provided

  • :upsert_fields - The fields to upsert. If not set, the action's upsert_fields is used, and if that is not set, then any fields not being set to defaults are written.

  • :upsert_condition (term/0) - An expression to check if the record should be updated when there's a conflict.

  • :touch_update_defaults? (boolean/0) - Whether or not to apply update defaults (like updated_at timestamps) on upsert. Only relevant when upsert?: true is set. Set to false to skip touching update_default fields when an upsert results in an update. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :changeset (term/0) - A changeset to seed the action with.

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_create, if a list or stream of inputs is provided.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :after_action (function of arity 2) - An after_action hook to be added to each processed changeset

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

create_note(params \\ nil, opts \\ nil)

creates a note

Inputs

  • text - the text of this note, this is a mandatory value
  • instance_id
  • author_id
  • note_id - the id of the note, this is an optional value

Options

  • :upsert? (boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value is false.

  • :return_skipped_upsert? (boolean/0) - If true, and a record was not upserted because its filter prevented the upsert, the original record (which was not upserted) will be returned. The default value is false.

  • :upsert_identity (atom/0) - The identity to use when detecting conflicts for upsert?, e.g. upsert_identity: :full_name. By default, the primary key is used. Has no effect if upsert?: true is not provided

  • :upsert_fields - The fields to upsert. If not set, the action's upsert_fields is used, and if that is not set, then any fields not being set to defaults are written.

  • :upsert_condition (term/0) - An expression to check if the record should be updated when there's a conflict.

  • :touch_update_defaults? (boolean/0) - Whether or not to apply update defaults (like updated_at timestamps) on upsert. Only relevant when upsert?: true is set. Set to false to skip touching update_default fields when an upsert results in an update. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :changeset (term/0) - A changeset to seed the action with.

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_create, if a list or stream of inputs is provided.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :after_action (function of arity 2) - An after_action hook to be added to each processed changeset

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

create_note!(params \\ nil, opts \\ nil)

creates a note

Raises any errors instead of returning them

Inputs

  • text - the text of this note, this is a mandatory value
  • instance_id
  • author_id
  • note_id - the id of the note, this is an optional value

Options

  • :upsert? (boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value is false.

  • :return_skipped_upsert? (boolean/0) - If true, and a record was not upserted because its filter prevented the upsert, the original record (which was not upserted) will be returned. The default value is false.

  • :upsert_identity (atom/0) - The identity to use when detecting conflicts for upsert?, e.g. upsert_identity: :full_name. By default, the primary key is used. Has no effect if upsert?: true is not provided

  • :upsert_fields - The fields to upsert. If not set, the action's upsert_fields is used, and if that is not set, then any fields not being set to defaults are written.

  • :upsert_condition (term/0) - An expression to check if the record should be updated when there's a conflict.

  • :touch_update_defaults? (boolean/0) - Whether or not to apply update defaults (like updated_at timestamps) on upsert. Only relevant when upsert?: true is set. Set to false to skip touching update_default fields when an upsert results in an update. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :changeset (term/0) - A changeset to seed the action with.

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_create, if a list or stream of inputs is provided.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :after_action (function of arity 2) - An after_action hook to be added to each processed changeset

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

create_party(type, attrs)

@spec create_party(party_type(), map()) ::
  {:ok, Ash.Resource.record()} | {:error, term()}

Same as create_party!/2 but returns {:ok, record} or {:error, error}.

create_party!(type, attrs)

@spec create_party!(party_type(), map()) :: Ash.Resource.record()

Creates a typed Party subtype by dispatching on the TMF type atom.

Raises ArgumentError for unknown types — consumer-specific shapes go through consumer domains.

create_party_ref(attrs)

@spec create_party_ref(map()) :: {:ok, Ash.Resource.record()} | {:error, term()}

Same as create_party_ref!/1 but returns {:ok, record} or {:error, error}.

create_party_ref(params \\ nil, opts \\ nil)

creates a party ref, relating an instance, place or source party to a party

Inputs

  • role - the role of the party to the instance, place or source party
  • instance_id
  • place_id
  • party_id
  • source_party_id

Options

  • :upsert? (boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value is false.

  • :return_skipped_upsert? (boolean/0) - If true, and a record was not upserted because its filter prevented the upsert, the original record (which was not upserted) will be returned. The default value is false.

  • :upsert_identity (atom/0) - The identity to use when detecting conflicts for upsert?, e.g. upsert_identity: :full_name. By default, the primary key is used. Has no effect if upsert?: true is not provided

  • :upsert_fields - The fields to upsert. If not set, the action's upsert_fields is used, and if that is not set, then any fields not being set to defaults are written.

  • :upsert_condition (term/0) - An expression to check if the record should be updated when there's a conflict.

  • :touch_update_defaults? (boolean/0) - Whether or not to apply update defaults (like updated_at timestamps) on upsert. Only relevant when upsert?: true is set. Set to false to skip touching update_default fields when an upsert results in an update. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :changeset (term/0) - A changeset to seed the action with.

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_create, if a list or stream of inputs is provided.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :after_action (function of arity 2) - An after_action hook to be added to each processed changeset

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

create_party_ref!(attrs)

@spec create_party_ref!(map()) :: Ash.Resource.record()

Creates a PartyRef from a tagged source to a target Party.

Source forms

source: {:instance, "INST-001"}
source: {:place, "PLACE-001"}
source: {:party, "PARTY-001"}
source: some_instance_struct
source: some_place_struct
source: some_party_struct

create_party_ref!(params \\ nil, opts \\ nil)

creates a party ref, relating an instance, place or source party to a party

Raises any errors instead of returning them

Inputs

  • role - the role of the party to the instance, place or source party
  • instance_id
  • place_id
  • party_id
  • source_party_id

Options

  • :upsert? (boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value is false.

  • :return_skipped_upsert? (boolean/0) - If true, and a record was not upserted because its filter prevented the upsert, the original record (which was not upserted) will be returned. The default value is false.

  • :upsert_identity (atom/0) - The identity to use when detecting conflicts for upsert?, e.g. upsert_identity: :full_name. By default, the primary key is used. Has no effect if upsert?: true is not provided

  • :upsert_fields - The fields to upsert. If not set, the action's upsert_fields is used, and if that is not set, then any fields not being set to defaults are written.

  • :upsert_condition (term/0) - An expression to check if the record should be updated when there's a conflict.

  • :touch_update_defaults? (boolean/0) - Whether or not to apply update defaults (like updated_at timestamps) on upsert. Only relevant when upsert?: true is set. Set to false to skip touching update_default fields when an upsert results in an update. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :changeset (term/0) - A changeset to seed the action with.

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_create, if a list or stream of inputs is provided.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :after_action (function of arity 2) - An after_action hook to be added to each processed changeset

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

create_place(type, attrs)

@spec create_place(place_type(), map()) ::
  {:ok, Ash.Resource.record()} | {:error, term()}

Same as create_place!/2 but returns {:ok, record} or {:error, error}.

create_place!(type, attrs)

@spec create_place!(place_type(), map()) :: Ash.Resource.record()

Creates a typed Place subtype by dispatching on the TMF type atom.

Raises ArgumentError for unknown types — consumer-specific shapes go through consumer domains.

create_place_ref(attrs)

@spec create_place_ref(map()) :: {:ok, Ash.Resource.record()} | {:error, term()}

Same as create_place_ref!/1 but returns {:ok, record} or {:error, error}.

create_place_ref(params \\ nil, opts \\ nil)

creates a place ref, relating an instance, party or source place to a place

Inputs

  • role - the role of the place to the instance, party or source place
  • instance_id
  • place_id
  • party_id
  • source_place_id

Options

  • :upsert? (boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value is false.

  • :return_skipped_upsert? (boolean/0) - If true, and a record was not upserted because its filter prevented the upsert, the original record (which was not upserted) will be returned. The default value is false.

  • :upsert_identity (atom/0) - The identity to use when detecting conflicts for upsert?, e.g. upsert_identity: :full_name. By default, the primary key is used. Has no effect if upsert?: true is not provided

  • :upsert_fields - The fields to upsert. If not set, the action's upsert_fields is used, and if that is not set, then any fields not being set to defaults are written.

  • :upsert_condition (term/0) - An expression to check if the record should be updated when there's a conflict.

  • :touch_update_defaults? (boolean/0) - Whether or not to apply update defaults (like updated_at timestamps) on upsert. Only relevant when upsert?: true is set. Set to false to skip touching update_default fields when an upsert results in an update. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :changeset (term/0) - A changeset to seed the action with.

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_create, if a list or stream of inputs is provided.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :after_action (function of arity 2) - An after_action hook to be added to each processed changeset

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

create_place_ref!(attrs)

@spec create_place_ref!(map()) :: Ash.Resource.record()

Creates a PlaceRef from a tagged source to a target Place.

Source forms

source: {:instance, "INST-001"}
source: {:party, "PARTY-001"}
source: {:place, "PLACE-001"}
source: some_instance_struct
source: some_party_struct
source: some_place_struct

Target forms

target: "LOC-001"
target: some_place_struct

create_place_ref!(params \\ nil, opts \\ nil)

creates a place ref, relating an instance, party or source place to a place

Raises any errors instead of returning them

Inputs

  • role - the role of the place to the instance, party or source place
  • instance_id
  • place_id
  • party_id
  • source_place_id

Options

  • :upsert? (boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value is false.

  • :return_skipped_upsert? (boolean/0) - If true, and a record was not upserted because its filter prevented the upsert, the original record (which was not upserted) will be returned. The default value is false.

  • :upsert_identity (atom/0) - The identity to use when detecting conflicts for upsert?, e.g. upsert_identity: :full_name. By default, the primary key is used. Has no effect if upsert?: true is not provided

  • :upsert_fields - The fields to upsert. If not set, the action's upsert_fields is used, and if that is not set, then any fields not being set to defaults are written.

  • :upsert_condition (term/0) - An expression to check if the record should be updated when there's a conflict.

  • :touch_update_defaults? (boolean/0) - Whether or not to apply update defaults (like updated_at timestamps) on upsert. Only relevant when upsert?: true is set. Set to false to skip touching update_default fields when an upsert results in an update. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :changeset (term/0) - A changeset to seed the action with.

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_create, if a list or stream of inputs is provided.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :after_action (function of arity 2) - An after_action hook to be added to each processed changeset

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

create_process_status(params \\ nil, opts \\ nil)

creates a process status related to an instance

Inputs

  • code - the code of this process status, this is a mandatory value
  • message - the message of this process status, this is a mandatory value
  • severity - the severity of this process status, this is a mandatory value
  • instance_id
  • parameterized_message - the parameterized message of this process status, this is an optional value

Options

  • :upsert? (boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value is false.

  • :return_skipped_upsert? (boolean/0) - If true, and a record was not upserted because its filter prevented the upsert, the original record (which was not upserted) will be returned. The default value is false.

  • :upsert_identity (atom/0) - The identity to use when detecting conflicts for upsert?, e.g. upsert_identity: :full_name. By default, the primary key is used. Has no effect if upsert?: true is not provided

  • :upsert_fields - The fields to upsert. If not set, the action's upsert_fields is used, and if that is not set, then any fields not being set to defaults are written.

  • :upsert_condition (term/0) - An expression to check if the record should be updated when there's a conflict.

  • :touch_update_defaults? (boolean/0) - Whether or not to apply update defaults (like updated_at timestamps) on upsert. Only relevant when upsert?: true is set. Set to false to skip touching update_default fields when an upsert results in an update. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :changeset (term/0) - A changeset to seed the action with.

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_create, if a list or stream of inputs is provided.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :after_action (function of arity 2) - An after_action hook to be added to each processed changeset

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

create_process_status!(params \\ nil, opts \\ nil)

creates a process status related to an instance

Raises any errors instead of returning them

Inputs

  • code - the code of this process status, this is a mandatory value
  • message - the message of this process status, this is a mandatory value
  • severity - the severity of this process status, this is a mandatory value
  • instance_id
  • parameterized_message - the parameterized message of this process status, this is an optional value

Options

  • :upsert? (boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value is false.

  • :return_skipped_upsert? (boolean/0) - If true, and a record was not upserted because its filter prevented the upsert, the original record (which was not upserted) will be returned. The default value is false.

  • :upsert_identity (atom/0) - The identity to use when detecting conflicts for upsert?, e.g. upsert_identity: :full_name. By default, the primary key is used. Has no effect if upsert?: true is not provided

  • :upsert_fields - The fields to upsert. If not set, the action's upsert_fields is used, and if that is not set, then any fields not being set to defaults are written.

  • :upsert_condition (term/0) - An expression to check if the record should be updated when there's a conflict.

  • :touch_update_defaults? (boolean/0) - Whether or not to apply update defaults (like updated_at timestamps) on upsert. Only relevant when upsert?: true is set. Set to false to skip touching update_default fields when an upsert results in an update. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :changeset (term/0) - A changeset to seed the action with.

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_create, if a list or stream of inputs is provided.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :after_action (function of arity 2) - An after_action hook to be added to each processed changeset

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

create_relationship(params \\ nil, opts \\ nil)

creates a relationship between a source and target instance

Inputs

  • alias - the alias of this relationship, used for supporting service or resource
  • type - the type of the relationship from the source to the target
  • characteristics
  • source_id
  • target_id

Options

  • :upsert? (boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value is false.

  • :return_skipped_upsert? (boolean/0) - If true, and a record was not upserted because its filter prevented the upsert, the original record (which was not upserted) will be returned. The default value is false.

  • :upsert_identity (atom/0) - The identity to use when detecting conflicts for upsert?, e.g. upsert_identity: :full_name. By default, the primary key is used. Has no effect if upsert?: true is not provided

  • :upsert_fields - The fields to upsert. If not set, the action's upsert_fields is used, and if that is not set, then any fields not being set to defaults are written.

  • :upsert_condition (term/0) - An expression to check if the record should be updated when there's a conflict.

  • :touch_update_defaults? (boolean/0) - Whether or not to apply update defaults (like updated_at timestamps) on upsert. Only relevant when upsert?: true is set. Set to false to skip touching update_default fields when an upsert results in an update. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :changeset (term/0) - A changeset to seed the action with.

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_create, if a list or stream of inputs is provided.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :after_action (function of arity 2) - An after_action hook to be added to each processed changeset

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

create_relationship!(params \\ nil, opts \\ nil)

creates a relationship between a source and target instance

Raises any errors instead of returning them

Inputs

  • alias - the alias of this relationship, used for supporting service or resource
  • type - the type of the relationship from the source to the target
  • characteristics
  • source_id
  • target_id

Options

  • :upsert? (boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value is false.

  • :return_skipped_upsert? (boolean/0) - If true, and a record was not upserted because its filter prevented the upsert, the original record (which was not upserted) will be returned. The default value is false.

  • :upsert_identity (atom/0) - The identity to use when detecting conflicts for upsert?, e.g. upsert_identity: :full_name. By default, the primary key is used. Has no effect if upsert?: true is not provided

  • :upsert_fields - The fields to upsert. If not set, the action's upsert_fields is used, and if that is not set, then any fields not being set to defaults are written.

  • :upsert_condition (term/0) - An expression to check if the record should be updated when there's a conflict.

  • :touch_update_defaults? (boolean/0) - Whether or not to apply update defaults (like updated_at timestamps) on upsert. Only relevant when upsert?: true is set. Set to false to skip touching update_default fields when an upsert results in an update. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :changeset (term/0) - A changeset to seed the action with.

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_create, if a list or stream of inputs is provided.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :after_action (function of arity 2) - An after_action hook to be added to each processed changeset

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

create_specification(params \\ nil, opts \\ nil)

creates a major version of a named serviceSpecification or resourceSpecification

Inputs

  • id - a uuid4, unique to a major version of this specification and common across all environments, generated by default
  • minor_version - the minor version, defaults 0
  • name - the generic name of the service or resource specified by any version of this specification, e.g. adslAccess
  • type - indicates whether a serviceSpecification or resourceSpecification, defaults serviceSpecification
  • description - a description of the service or resource specified by a major version of this specification
  • major_version - the major version, defaults 1
  • category - the category of the service or resource specified by a major version of this specification
  • patch_version - the patch version, defaults 0
  • tmf_version - the TMF version of the specified service or resource, e.g. v4

Options

  • :upsert? (boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value is false.

  • :return_skipped_upsert? (boolean/0) - If true, and a record was not upserted because its filter prevented the upsert, the original record (which was not upserted) will be returned. The default value is false.

  • :upsert_identity (atom/0) - The identity to use when detecting conflicts for upsert?, e.g. upsert_identity: :full_name. By default, the primary key is used. Has no effect if upsert?: true is not provided

  • :upsert_fields - The fields to upsert. If not set, the action's upsert_fields is used, and if that is not set, then any fields not being set to defaults are written.

  • :upsert_condition (term/0) - An expression to check if the record should be updated when there's a conflict.

  • :touch_update_defaults? (boolean/0) - Whether or not to apply update defaults (like updated_at timestamps) on upsert. Only relevant when upsert?: true is set. Set to false to skip touching update_default fields when an upsert results in an update. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :changeset (term/0) - A changeset to seed the action with.

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_create, if a list or stream of inputs is provided.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :after_action (function of arity 2) - An after_action hook to be added to each processed changeset

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

create_specification!(params \\ nil, opts \\ nil)

creates a major version of a named serviceSpecification or resourceSpecification

Raises any errors instead of returning them

Inputs

  • id - a uuid4, unique to a major version of this specification and common across all environments, generated by default
  • minor_version - the minor version, defaults 0
  • name - the generic name of the service or resource specified by any version of this specification, e.g. adslAccess
  • type - indicates whether a serviceSpecification or resourceSpecification, defaults serviceSpecification
  • description - a description of the service or resource specified by a major version of this specification
  • major_version - the major version, defaults 1
  • category - the category of the service or resource specified by a major version of this specification
  • patch_version - the patch version, defaults 0
  • tmf_version - the TMF version of the specified service or resource, e.g. v4

Options

  • :upsert? (boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value is false.

  • :return_skipped_upsert? (boolean/0) - If true, and a record was not upserted because its filter prevented the upsert, the original record (which was not upserted) will be returned. The default value is false.

  • :upsert_identity (atom/0) - The identity to use when detecting conflicts for upsert?, e.g. upsert_identity: :full_name. By default, the primary key is used. Has no effect if upsert?: true is not provided

  • :upsert_fields - The fields to upsert. If not set, the action's upsert_fields is used, and if that is not set, then any fields not being set to defaults are written.

  • :upsert_condition (term/0) - An expression to check if the record should be updated when there's a conflict.

  • :touch_update_defaults? (boolean/0) - Whether or not to apply update defaults (like updated_at timestamps) on upsert. Only relevant when upsert?: true is set. Set to false to skip touching update_default fields when an upsert results in an update. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :changeset (term/0) - A changeset to seed the action with.

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_create, if a list or stream of inputs is provided.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :after_action (function of arity 2) - An after_action hook to be added to each processed changeset

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

deactivate_service(record)

deactivate_service!(record)

Deactivates a service instance.

default_short_name()

delete_assignable_characteristic(record, params \\ nil, opts \\ nil)

Calls the destroy action on Diffo.Provider.AssignableCharacteristic.

Options

  • :return_destroyed? (boolean/0) - If true, the destroyed record is included in the return result, e.g {:ok, destroyed} or {:ok, destroyed, notifications} The default value is false.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_destroy, if a query, list, or stream of inputs is provided.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is :atomic.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

delete_assignable_characteristic!(record, params \\ nil, opts \\ nil)

Calls the destroy action on Diffo.Provider.AssignableCharacteristic.

Raises any errors instead of returning them

Options

  • :return_destroyed? (boolean/0) - If true, the destroyed record is included in the return result, e.g {:ok, destroyed} or {:ok, destroyed, notifications} The default value is false.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_destroy, if a query, list, or stream of inputs is provided.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is :atomic.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

delete_assignment_relationship(record, params \\ nil, opts \\ nil)

Calls the destroy action on Diffo.Provider.AssignmentRelationship.

Options

  • :return_destroyed? (boolean/0) - If true, the destroyed record is included in the return result, e.g {:ok, destroyed} or {:ok, destroyed, notifications} The default value is false.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_destroy, if a query, list, or stream of inputs is provided.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is :atomic.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

delete_assignment_relationship!(record, params \\ nil, opts \\ nil)

Calls the destroy action on Diffo.Provider.AssignmentRelationship.

Raises any errors instead of returning them

Options

  • :return_destroyed? (boolean/0) - If true, the destroyed record is included in the return result, e.g {:ok, destroyed} or {:ok, destroyed, notifications} The default value is false.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_destroy, if a query, list, or stream of inputs is provided.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is :atomic.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

delete_characteristic(record, params \\ nil, opts \\ nil)

Calls the destroy action on Diffo.Provider.Characteristic.

Options

  • :return_destroyed? (boolean/0) - If true, the destroyed record is included in the return result, e.g {:ok, destroyed} or {:ok, destroyed, notifications} The default value is false.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_destroy, if a query, list, or stream of inputs is provided.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is :atomic.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

delete_characteristic!(record, params \\ nil, opts \\ nil)

Calls the destroy action on Diffo.Provider.Characteristic.

Raises any errors instead of returning them

Options

  • :return_destroyed? (boolean/0) - If true, the destroyed record is included in the return result, e.g {:ok, destroyed} or {:ok, destroyed, notifications} The default value is false.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_destroy, if a query, list, or stream of inputs is provided.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is :atomic.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

delete_defined_simple_relationship(record, params \\ nil, opts \\ nil)

Calls the destroy action on Diffo.Provider.DefinedSimpleRelationship.

Options

  • :return_destroyed? (boolean/0) - If true, the destroyed record is included in the return result, e.g {:ok, destroyed} or {:ok, destroyed, notifications} The default value is false.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_destroy, if a query, list, or stream of inputs is provided.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is :atomic.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

delete_defined_simple_relationship!(record, params \\ nil, opts \\ nil)

Calls the destroy action on Diffo.Provider.DefinedSimpleRelationship.

Raises any errors instead of returning them

Options

  • :return_destroyed? (boolean/0) - If true, the destroyed record is included in the return result, e.g {:ok, destroyed} or {:ok, destroyed, notifications} The default value is false.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_destroy, if a query, list, or stream of inputs is provided.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is :atomic.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

delete_entity(record, params \\ nil, opts \\ nil)

Calls the destroy action on Diffo.Provider.Entity.

Options

  • :return_destroyed? (boolean/0) - If true, the destroyed record is included in the return result, e.g {:ok, destroyed} or {:ok, destroyed, notifications} The default value is false.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_destroy, if a query, list, or stream of inputs is provided.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is :atomic.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

delete_entity!(record, params \\ nil, opts \\ nil)

Calls the destroy action on Diffo.Provider.Entity.

Raises any errors instead of returning them

Options

  • :return_destroyed? (boolean/0) - If true, the destroyed record is included in the return result, e.g {:ok, destroyed} or {:ok, destroyed, notifications} The default value is false.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_destroy, if a query, list, or stream of inputs is provided.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is :atomic.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

delete_entity_ref(record, params \\ nil, opts \\ nil)

Calls the destroy action on Diffo.Provider.EntityRef.

Options

  • :return_destroyed? (boolean/0) - If true, the destroyed record is included in the return result, e.g {:ok, destroyed} or {:ok, destroyed, notifications} The default value is false.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_destroy, if a query, list, or stream of inputs is provided.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is :atomic.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

delete_entity_ref!(record, params \\ nil, opts \\ nil)

Calls the destroy action on Diffo.Provider.EntityRef.

Raises any errors instead of returning them

Options

  • :return_destroyed? (boolean/0) - If true, the destroyed record is included in the return result, e.g {:ok, destroyed} or {:ok, destroyed, notifications} The default value is false.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_destroy, if a query, list, or stream of inputs is provided.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is :atomic.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

delete_event(record, params \\ nil, opts \\ nil)

Calls the destroy action on Diffo.Provider.Event.

Options

  • :return_destroyed? (boolean/0) - If true, the destroyed record is included in the return result, e.g {:ok, destroyed} or {:ok, destroyed, notifications} The default value is false.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_destroy, if a query, list, or stream of inputs is provided.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is :atomic.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

delete_event!(record, params \\ nil, opts \\ nil)

Calls the destroy action on Diffo.Provider.Event.

Raises any errors instead of returning them

Options

  • :return_destroyed? (boolean/0) - If true, the destroyed record is included in the return result, e.g {:ok, destroyed} or {:ok, destroyed, notifications} The default value is false.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_destroy, if a query, list, or stream of inputs is provided.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is :atomic.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

delete_external_identifier(record, params \\ nil, opts \\ nil)

Calls the destroy action on Diffo.Provider.ExternalIdentifier.

Options

  • :return_destroyed? (boolean/0) - If true, the destroyed record is included in the return result, e.g {:ok, destroyed} or {:ok, destroyed, notifications} The default value is false.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_destroy, if a query, list, or stream of inputs is provided.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is :atomic.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

delete_external_identifier!(record, params \\ nil, opts \\ nil)

Calls the destroy action on Diffo.Provider.ExternalIdentifier.

Raises any errors instead of returning them

Options

  • :return_destroyed? (boolean/0) - If true, the destroyed record is included in the return result, e.g {:ok, destroyed} or {:ok, destroyed, notifications} The default value is false.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_destroy, if a query, list, or stream of inputs is provided.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is :atomic.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

delete_feature(record, params \\ nil, opts \\ nil)

Calls the destroy action on Diffo.Provider.Feature.

Options

  • :return_destroyed? (boolean/0) - If true, the destroyed record is included in the return result, e.g {:ok, destroyed} or {:ok, destroyed, notifications} The default value is false.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_destroy, if a query, list, or stream of inputs is provided.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is :atomic.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

delete_feature!(record, params \\ nil, opts \\ nil)

Calls the destroy action on Diffo.Provider.Feature.

Raises any errors instead of returning them

Options

  • :return_destroyed? (boolean/0) - If true, the destroyed record is included in the return result, e.g {:ok, destroyed} or {:ok, destroyed, notifications} The default value is false.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_destroy, if a query, list, or stream of inputs is provided.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is :atomic.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

delete_instance(records)

delete_instance!(record)

Deletes an instance (or a list of instances, returning an %Ash.BulkResult{}).

delete_note(record, params \\ nil, opts \\ nil)

Calls the destroy action on Diffo.Provider.Note.

Options

  • :return_destroyed? (boolean/0) - If true, the destroyed record is included in the return result, e.g {:ok, destroyed} or {:ok, destroyed, notifications} The default value is false.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_destroy, if a query, list, or stream of inputs is provided.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is :atomic.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

delete_note!(record, params \\ nil, opts \\ nil)

Calls the destroy action on Diffo.Provider.Note.

Raises any errors instead of returning them

Options

  • :return_destroyed? (boolean/0) - If true, the destroyed record is included in the return result, e.g {:ok, destroyed} or {:ok, destroyed, notifications} The default value is false.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_destroy, if a query, list, or stream of inputs is provided.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is :atomic.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

delete_party(record)

@spec delete_party(Ash.Resource.record() | [Ash.Resource.record()]) ::
  :ok | {:error, term()} | Ash.BulkResult.t()

Same as delete_party!/1 but returns :ok or {:error, error}.

Accepts either a single record or a list of records (returns %Ash.BulkResult{} for lists).

delete_party!(record)

@spec delete_party!(Ash.Resource.record()) :: :ok

Deletes a Party record (any subtype, dispatched on its struct module).

delete_party_ref(record, params \\ nil, opts \\ nil)

Calls the destroy action on Diffo.Provider.PartyRef.

Options

  • :return_destroyed? (boolean/0) - If true, the destroyed record is included in the return result, e.g {:ok, destroyed} or {:ok, destroyed, notifications} The default value is false.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_destroy, if a query, list, or stream of inputs is provided.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is :atomic.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

delete_party_ref!(record, params \\ nil, opts \\ nil)

Calls the destroy action on Diffo.Provider.PartyRef.

Raises any errors instead of returning them

Options

  • :return_destroyed? (boolean/0) - If true, the destroyed record is included in the return result, e.g {:ok, destroyed} or {:ok, destroyed, notifications} The default value is false.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_destroy, if a query, list, or stream of inputs is provided.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is :atomic.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

delete_place(record)

@spec delete_place(Ash.Resource.record() | [Ash.Resource.record()]) ::
  :ok | {:error, term()} | Ash.BulkResult.t()

Same as delete_place!/1 but returns :ok or {:error, error}.

Accepts either a single record or a list of records (returns %Ash.BulkResult{} for lists).

delete_place!(record)

@spec delete_place!(Ash.Resource.record()) :: :ok

Deletes a Place record (any subtype, dispatched on its struct module).

delete_place_ref(record, params \\ nil, opts \\ nil)

Calls the destroy action on Diffo.Provider.PlaceRef.

Options

  • :return_destroyed? (boolean/0) - If true, the destroyed record is included in the return result, e.g {:ok, destroyed} or {:ok, destroyed, notifications} The default value is false.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_destroy, if a query, list, or stream of inputs is provided.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is :atomic.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

delete_place_ref!(record, params \\ nil, opts \\ nil)

Calls the destroy action on Diffo.Provider.PlaceRef.

Raises any errors instead of returning them

Options

  • :return_destroyed? (boolean/0) - If true, the destroyed record is included in the return result, e.g {:ok, destroyed} or {:ok, destroyed, notifications} The default value is false.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_destroy, if a query, list, or stream of inputs is provided.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is :atomic.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

delete_process_status(record, params \\ nil, opts \\ nil)

Calls the destroy action on Diffo.Provider.ProcessStatus.

Options

  • :return_destroyed? (boolean/0) - If true, the destroyed record is included in the return result, e.g {:ok, destroyed} or {:ok, destroyed, notifications} The default value is false.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_destroy, if a query, list, or stream of inputs is provided.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is :atomic.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

delete_process_status!(record, params \\ nil, opts \\ nil)

Calls the destroy action on Diffo.Provider.ProcessStatus.

Raises any errors instead of returning them

Options

  • :return_destroyed? (boolean/0) - If true, the destroyed record is included in the return result, e.g {:ok, destroyed} or {:ok, destroyed, notifications} The default value is false.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_destroy, if a query, list, or stream of inputs is provided.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is :atomic.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

delete_relationship(record, params \\ nil, opts \\ nil)

Calls the destroy action on Diffo.Provider.Relationship.

Options

  • :return_destroyed? (boolean/0) - If true, the destroyed record is included in the return result, e.g {:ok, destroyed} or {:ok, destroyed, notifications} The default value is false.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_destroy, if a query, list, or stream of inputs is provided.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is :atomic.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

delete_relationship!(record, params \\ nil, opts \\ nil)

Calls the destroy action on Diffo.Provider.Relationship.

Raises any errors instead of returning them

Options

  • :return_destroyed? (boolean/0) - If true, the destroyed record is included in the return result, e.g {:ok, destroyed} or {:ok, destroyed, notifications} The default value is false.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_destroy, if a query, list, or stream of inputs is provided.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is :atomic.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

delete_specification(record, params \\ nil, opts \\ nil)

Calls the destroy action on Diffo.Provider.Specification.

Options

  • :return_destroyed? (boolean/0) - If true, the destroyed record is included in the return result, e.g {:ok, destroyed} or {:ok, destroyed, notifications} The default value is false.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_destroy, if a query, list, or stream of inputs is provided.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is :atomic.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

delete_specification!(record, params \\ nil, opts \\ nil)

Calls the destroy action on Diffo.Provider.Specification.

Raises any errors instead of returning them

Options

  • :return_destroyed? (boolean/0) - If true, the destroyed record is included in the return result, e.g {:ok, destroyed} or {:ok, destroyed, notifications} The default value is false.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_destroy, if a query, list, or stream of inputs is provided.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is :atomic.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

describe_specification(record, params \\ nil, opts \\ nil)

updates the description

Inputs

  • description - a description of the service or resource specified by a major version of this specification

Options

  • :params (map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.

  • :atomic_upgrade? (boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_update, if a query, list, or stream of inputs is provided.

    • :atomic_update (map/0) - A map of atomic updates to apply. See Ash.Changeset.atomic_update/3 for more.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is [:atomic].

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

describe_specification!(record, params \\ nil, opts \\ nil)

updates the description

Raises any errors instead of returning them

Inputs

  • description - a description of the service or resource specified by a major version of this specification

Options

  • :params (map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.

  • :atomic_upgrade? (boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_update, if a query, list, or stream of inputs is provided.

    • :atomic_update (map/0) - A map of atomic updates to apply. See Ash.Changeset.atomic_update/3 for more.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is [:atomic].

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

destroy(record, opts \\ [])

This function is deprecated. Use `Ash.destroy/2` instead.

destroy!(record, opts \\ [])

This function is deprecated. Use `Ash.destroy!/2` instead.

exists(query, opts \\ [])

This function is deprecated. Use `Ash.exists/2` instead.

exists?(query, opts \\ [])

This function is deprecated. Use `Ash.exists?/2` instead.

feasibilityCheck_service(record, attrs \\ %{})

Same as feasibilityCheck_service!/2 but returns {:ok, record} or {:error, error}.

feasibilityCheck_service!(record, attrs \\ %{})

Feasibility-checks a service instance (dispatches on the record's resource).

find_entities_by_id(query, params \\ nil, opts \\ nil)

finds entity by id

Arguments

  • query - Return only entities with id including the given value.

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

find_entities_by_id!(query, params \\ nil, opts \\ nil)

finds entity by id

Raises any errors instead of returning them

Arguments

  • query - Return only entities with id including the given value.

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

find_entities_by_name(query, params \\ nil, opts \\ nil)

finds entity by name

Arguments

  • query - Return only entities with names including the given value.

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

find_entities_by_name!(query, params \\ nil, opts \\ nil)

finds entity by name

Raises any errors instead of returning them

Arguments

  • query - Return only entities with names including the given value.

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

find_external_identifiers_by_external_id(query, params \\ nil, opts \\ nil)

finds external identifiers by id

Arguments

  • query - Return only external identifiers with id's including the given value.

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

find_external_identifiers_by_external_id!(query, params \\ nil, opts \\ nil)

finds external identifiers by id

Raises any errors instead of returning them

Arguments

  • query - Return only external identifiers with id's including the given value.

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

find_instances_by_name!(query)

@spec find_instances_by_name!(String.t()) :: [Ash.Resource.record()]

Finds instances whose name contains the query, each projected to its concrete leaf.

find_instances_by_specification_id!(query)

@spec find_instances_by_specification_id!(String.t()) :: [Ash.Resource.record()]

Finds instances by specification id, each projected to its concrete leaf.

find_notes_by_note_id(query, params \\ nil, opts \\ nil)

finds notes by id

Arguments

  • query - Return only notes with id's including the given value.

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

find_notes_by_note_id!(query, params \\ nil, opts \\ nil)

finds notes by id

Raises any errors instead of returning them

Arguments

  • query - Return only notes with id's including the given value.

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

find_parties_by_id!(query)

@spec find_parties_by_id!(String.t()) :: [Ash.Resource.record()]

Finds Parties whose id contains the query, each projected to its concrete world.

find_parties_by_name!(query)

@spec find_parties_by_name!(String.t()) :: [Ash.Resource.record()]

Finds Parties whose name contains the query, each projected to its concrete world.

find_places_by_id!(query)

@spec find_places_by_id!(String.t()) :: [Ash.Resource.record()]

Finds Places whose id contains the query, each projected to its concrete world.

find_places_by_name!(query)

@spec find_places_by_name!(String.t()) :: [Ash.Resource.record()]

Finds Places whose name contains the query, each projected to its concrete world.

find_specifications_by_category(query, params \\ nil, opts \\ nil)

finds specifications by category

Arguments

  • query - Return only specifications with category including the given value.

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

find_specifications_by_category!(query, params \\ nil, opts \\ nil)

finds specifications by category

Raises any errors instead of returning them

Arguments

  • query - Return only specifications with category including the given value.

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

find_specifications_by_name(query, params \\ nil, opts \\ nil)

finds specifications by name

Arguments

  • query - Return only specifications with names including the given value.

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

find_specifications_by_name!(query, params \\ nil, opts \\ nil)

finds specifications by name

Raises any errors instead of returning them

Arguments

  • query - Return only specifications with names including the given value.

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

fire_instance_event(record, attrs \\ %{})

fire_instance_event!(record, attrs \\ %{})

Fires an event on an instance, maintaining the event chain.

first(query, field, opts \\ [])

This function is deprecated. Use `Ash.first/3` instead.

first!(query, field, opts \\ [])

This function is deprecated. Use `Ash.first!/3` instead.

get(resource, id_or_filter, opts \\ [])

This function is deprecated. Use `Ash.get/3` instead.

get!(resource, id_or_filter, opts \\ [])

This function is deprecated. Use `Ash.get!/3` instead.

get_assignable_characteristic_by_id(id, params \\ nil, opts \\ nil)

Calls the read action on Diffo.Provider.AssignableCharacteristic.

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

get_assignable_characteristic_by_id!(id, params \\ nil, opts \\ nil)

Calls the read action on Diffo.Provider.AssignableCharacteristic.

Raises any errors instead of returning them

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

get_assignment_relationship_by_id(id, params \\ nil, opts \\ nil)

Calls the read action on Diffo.Provider.AssignmentRelationship.

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

get_assignment_relationship_by_id!(id, params \\ nil, opts \\ nil)

Calls the read action on Diffo.Provider.AssignmentRelationship.

Raises any errors instead of returning them

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

get_characteristic_by_id(id, params \\ nil, opts \\ nil)

Calls the read action on Diffo.Provider.Characteristic.

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

get_characteristic_by_id!(id, params \\ nil, opts \\ nil)

Calls the read action on Diffo.Provider.Characteristic.

Raises any errors instead of returning them

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

get_defined_simple_relationship_by_id(id, params \\ nil, opts \\ nil)

Calls the read action on Diffo.Provider.DefinedSimpleRelationship.

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

get_defined_simple_relationship_by_id!(id, params \\ nil, opts \\ nil)

Calls the read action on Diffo.Provider.DefinedSimpleRelationship.

Raises any errors instead of returning them

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

get_entity_by_id(id, params \\ nil, opts \\ nil)

Calls the read action on Diffo.Provider.Entity.

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

get_entity_by_id!(id, params \\ nil, opts \\ nil)

Calls the read action on Diffo.Provider.Entity.

Raises any errors instead of returning them

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

get_entity_ref_by_id(id, params \\ nil, opts \\ nil)

Calls the read action on Diffo.Provider.EntityRef.

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

get_entity_ref_by_id!(id, params \\ nil, opts \\ nil)

Calls the read action on Diffo.Provider.EntityRef.

Raises any errors instead of returning them

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

get_event_by_id(id, params \\ nil, opts \\ nil)

Calls the read action on Diffo.Provider.Event.

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

get_event_by_id!(id, params \\ nil, opts \\ nil)

Calls the read action on Diffo.Provider.Event.

Raises any errors instead of returning them

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

get_external_identifier_by_id(id, params \\ nil, opts \\ nil)

Calls the read action on Diffo.Provider.ExternalIdentifier.

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

get_external_identifier_by_id!(id, params \\ nil, opts \\ nil)

Calls the read action on Diffo.Provider.ExternalIdentifier.

Raises any errors instead of returning them

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

get_feature_by_id(id, params \\ nil, opts \\ nil)

Calls the read action on Diffo.Provider.Feature.

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

get_feature_by_id!(id, params \\ nil, opts \\ nil)

Calls the read action on Diffo.Provider.Feature.

Raises any errors instead of returning them

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

get_instance_by_id(id, opts \\ [])

@spec get_instance_by_id(
  String.t(),
  keyword()
) :: {:ok, Ash.Resource.record()} | {:error, term()}

Same as get_instance_by_id!/2 but returns {:ok, record} or {:error, error}.

get_instance_by_id!(id, opts \\ [])

@spec get_instance_by_id!(
  String.t(),
  keyword()
) :: Ash.Resource.record()

Loads an instance by id and projects it to its concrete Service/Resource leaf.

Accepts a :load opt applied to the projected leaf (e.g. load: [:event]).

get_latest_specification_by_name(query, params \\ nil, opts \\ nil)

gets the serviceSpecification or resourceSpecification by name with highest major version

Arguments

  • query - Return only specifications with names including the given value.

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

get_latest_specification_by_name!(query, params \\ nil, opts \\ nil)

gets the serviceSpecification or resourceSpecification by name with highest major version

Raises any errors instead of returning them

Arguments

  • query - Return only specifications with names including the given value.

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

get_note_by_id(id, params \\ nil, opts \\ nil)

Calls the read action on Diffo.Provider.Note.

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

get_note_by_id!(id, params \\ nil, opts \\ nil)

Calls the read action on Diffo.Provider.Note.

Raises any errors instead of returning them

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

get_party_by_id(id)

@spec get_party_by_id(String.t()) :: {:ok, Ash.Resource.record()} | {:error, term()}

Same as get_party_by_id!/1 but returns {:ok, record} or {:error, error}.

get_party_by_id!(id)

@spec get_party_by_id!(String.t()) :: Ash.Resource.record()

Loads a Party by id and projects to the outermost concrete world.

Returns the concrete subtype struct (Provider.Organization, Provider.Individual, MyApp.Carrier, etc.) or the abstract Provider.Party if no concrete world resolves.

get_party_ref_by_id(id, params \\ nil, opts \\ nil)

Calls the read action on Diffo.Provider.PartyRef.

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

get_party_ref_by_id!(id, params \\ nil, opts \\ nil)

Calls the read action on Diffo.Provider.PartyRef.

Raises any errors instead of returning them

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

get_place_by_id(id)

@spec get_place_by_id(String.t()) :: {:ok, Ash.Resource.record()} | {:error, term()}

Same as get_place_by_id!/1 but returns {:ok, record} or {:error, error}.

get_place_by_id!(id)

@spec get_place_by_id!(String.t()) :: Ash.Resource.record()

Loads a Place by id and projects to the outermost concrete world.

Returns the concrete subtype struct (Provider.GeographicSite, MyApp.SydneyExchange, etc.) or the abstract Provider.Place if no concrete world resolves.

get_place_ref_by_id(id, params \\ nil, opts \\ nil)

Calls the read action on Diffo.Provider.PlaceRef.

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

get_place_ref_by_id!(id, params \\ nil, opts \\ nil)

Calls the read action on Diffo.Provider.PlaceRef.

Raises any errors instead of returning them

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

get_process_status_by_id(id, params \\ nil, opts \\ nil)

Calls the read action on Diffo.Provider.ProcessStatus.

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

get_process_status_by_id!(id, params \\ nil, opts \\ nil)

Calls the read action on Diffo.Provider.ProcessStatus.

Raises any errors instead of returning them

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

get_relationship_by_id(id, params \\ nil, opts \\ nil)

Calls the read action on Diffo.Provider.Relationship.

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

get_relationship_by_id!(id, params \\ nil, opts \\ nil)

Calls the read action on Diffo.Provider.Relationship.

Raises any errors instead of returning them

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

get_specification_by_id(id, params \\ nil, opts \\ nil)

Calls the read action on Diffo.Provider.Specification.

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

get_specification_by_id!(id, params \\ nil, opts \\ nil)

Calls the read action on Diffo.Provider.Specification.

Raises any errors instead of returning them

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

lifecycle_resource(record, attrs \\ %{})

Same as lifecycle_resource!/2 but returns {:ok, record} or {:error, error}.

lifecycle_resource!(record, attrs \\ %{})

Sets the TMF lifecycleState of a resource instance.

list(query, field, opts \\ [])

This function is deprecated. Use `Ash.list/3` instead.

list!(query, field, opts \\ [])

This function is deprecated. Use `Ash.list!/3` instead.

list_characteristics(params \\ nil, opts \\ nil)

lists all characteristics

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_characteristics!(params \\ nil, opts \\ nil)

lists all characteristics

Raises any errors instead of returning them

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_entities(params \\ nil, opts \\ nil)

lists all parties

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_entities!(params \\ nil, opts \\ nil)

lists all parties

Raises any errors instead of returning them

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_entity_refs(params \\ nil, opts \\ nil)

lists all entity refs

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_entity_refs!(params \\ nil, opts \\ nil)

lists all entity refs

Raises any errors instead of returning them

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_entity_refs_by_entity_id(entity_id, params \\ nil, opts \\ nil)

lists entity refs by entity id

Arguments

  • entity_id

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_entity_refs_by_entity_id!(entity_id, params \\ nil, opts \\ nil)

lists entity refs by entity id

Raises any errors instead of returning them

Arguments

  • entity_id

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_entity_refs_by_instance_id(instance_id, params \\ nil, opts \\ nil)

lists entity refs by instance id

Arguments

  • instance_id

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_entity_refs_by_instance_id!(instance_id, params \\ nil, opts \\ nil)

lists entity refs by instance id

Raises any errors instead of returning them

Arguments

  • instance_id

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_events(params \\ nil, opts \\ nil)

lists all events

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_events!(params \\ nil, opts \\ nil)

lists all events

Raises any errors instead of returning them

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_events_by_instance_id(instance_id, params \\ nil, opts \\ nil)

lists events by instance id

Arguments

  • instance_id

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_events_by_instance_id!(instance_id, params \\ nil, opts \\ nil)

lists events by instance id

Raises any errors instead of returning them

Arguments

  • instance_id

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_external_identifiers(params \\ nil, opts \\ nil)

lists all external identifiers

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_external_identifiers!(params \\ nil, opts \\ nil)

lists all external identifiers

Raises any errors instead of returning them

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_external_identifiers_by_instance_id(instance_id, params \\ nil, opts \\ nil)

lists external identifiers by instance id

Arguments

  • instance_id

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_external_identifiers_by_instance_id!(instance_id, params \\ nil, opts \\ nil)

lists external identifiers by instance id

Raises any errors instead of returning them

Arguments

  • instance_id

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_external_identifiers_by_owner_id(owner_id, params \\ nil, opts \\ nil)

lists external identifiers by owner id

Arguments

  • owner_id

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_external_identifiers_by_owner_id!(owner_id, params \\ nil, opts \\ nil)

lists external identifiers by owner id

Raises any errors instead of returning them

Arguments

  • owner_id

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_features(params \\ nil, opts \\ nil)

lists all features

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_features!(params \\ nil, opts \\ nil)

lists all features

Raises any errors instead of returning them

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_instances!()

@spec list_instances!() :: [Ash.Resource.record()]

Lists all instances, each projected to its concrete Service/Resource leaf.

list_notes(params \\ nil, opts \\ nil)

lists all notes

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_notes!(params \\ nil, opts \\ nil)

lists all notes

Raises any errors instead of returning them

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_notes_by_author_id(author_id, params \\ nil, opts \\ nil)

lists notes by author id

Arguments

  • author_id

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_notes_by_author_id!(author_id, params \\ nil, opts \\ nil)

lists notes by author id

Raises any errors instead of returning them

Arguments

  • author_id

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_notes_by_instance_id(instance_id, params \\ nil, opts \\ nil)

lists notes by instance id

Arguments

  • instance_id

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_notes_by_instance_id!(instance_id, params \\ nil, opts \\ nil)

lists notes by instance id

Raises any errors instead of returning them

Arguments

  • instance_id

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_parties()

@spec list_parties() :: {:ok, [Ash.Resource.record()]} | {:error, term()}

Same as list_parties!/0 but returns {:ok, list} or {:error, error}.

list_parties!()

@spec list_parties!() :: [Ash.Resource.record()]

Lists all Parties, each projected to its outermost concrete world.

list_party_refs(params \\ nil, opts \\ nil)

lists all party refs

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_party_refs!(params \\ nil, opts \\ nil)

lists all party refs

Raises any errors instead of returning them

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_party_refs_by_instance_id(instance_id, params \\ nil, opts \\ nil)

lists party refs by instance id

Arguments

  • instance_id

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_party_refs_by_instance_id!(instance_id, params \\ nil, opts \\ nil)

lists party refs by instance id

Raises any errors instead of returning them

Arguments

  • instance_id

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_party_refs_by_party_id(party_id, params \\ nil, opts \\ nil)

lists party refs by party id

Arguments

  • party_id

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_party_refs_by_party_id!(party_id, params \\ nil, opts \\ nil)

lists party refs by party id

Raises any errors instead of returning them

Arguments

  • party_id

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_party_refs_by_place_id(place_id, params \\ nil, opts \\ nil)

lists party refs by place id

Arguments

  • place_id

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_party_refs_by_place_id!(place_id, params \\ nil, opts \\ nil)

lists party refs by place id

Raises any errors instead of returning them

Arguments

  • place_id

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_party_refs_by_source_party_id(source_party_id, params \\ nil, opts \\ nil)

lists party refs by source_party id

Arguments

  • source_party_id

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_party_refs_by_source_party_id!(source_party_id, params \\ nil, opts \\ nil)

lists party refs by source_party id

Raises any errors instead of returning them

Arguments

  • source_party_id

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_party_refs_from(arg1)

@spec list_party_refs_from(tagged_source() | Ash.Resource.record()) :: [
  Ash.Resource.record()
]

Lists PartyRefs whose source matches the given Instance/Place/Party.

list_party_refs_targeting(target)

@spec list_party_refs_targeting(String.t() | Ash.Resource.record()) :: [
  Ash.Resource.record()
]

Lists PartyRefs targeting the given Party.

list_place_refs(params \\ nil, opts \\ nil)

lists all place refs

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_place_refs!(params \\ nil, opts \\ nil)

lists all place refs

Raises any errors instead of returning them

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_place_refs_by_instance_id(instance_id, params \\ nil, opts \\ nil)

lists place refs by instance id

Arguments

  • instance_id

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_place_refs_by_instance_id!(instance_id, params \\ nil, opts \\ nil)

lists place refs by instance id

Raises any errors instead of returning them

Arguments

  • instance_id

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_place_refs_by_party_id(party_id, params \\ nil, opts \\ nil)

lists place refs by party id

Arguments

  • party_id

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_place_refs_by_party_id!(party_id, params \\ nil, opts \\ nil)

lists place refs by party id

Raises any errors instead of returning them

Arguments

  • party_id

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_place_refs_by_place_id(place_id, params \\ nil, opts \\ nil)

lists place refs by place id

Arguments

  • place_id

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_place_refs_by_place_id!(place_id, params \\ nil, opts \\ nil)

lists place refs by place id

Raises any errors instead of returning them

Arguments

  • place_id

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_place_refs_by_source_place_id(source_place_id, params \\ nil, opts \\ nil)

lists place refs by source_place id

Arguments

  • source_place_id

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_place_refs_by_source_place_id!(source_place_id, params \\ nil, opts \\ nil)

lists place refs by source_place id

Raises any errors instead of returning them

Arguments

  • source_place_id

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_place_refs_from(arg1)

@spec list_place_refs_from(tagged_source() | Ash.Resource.record()) :: [
  Ash.Resource.record()
]

Lists PlaceRefs whose source matches the given Instance/Party/Place.

list_place_refs_targeting(target)

@spec list_place_refs_targeting(String.t() | Ash.Resource.record()) :: [
  Ash.Resource.record()
]

Lists PlaceRefs targeting the given Place.

list_places()

@spec list_places() :: {:ok, [Ash.Resource.record()]} | {:error, term()}

Same as list_places!/0 but returns {:ok, list} or {:error, error}.

list_places!()

@spec list_places!() :: [Ash.Resource.record()]

Lists all Places, each projected to its outermost concrete world.

list_process_statuses(params \\ nil, opts \\ nil)

lists all process statuses

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_process_statuses!(params \\ nil, opts \\ nil)

lists all process statuses

Raises any errors instead of returning them

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_process_statuses_by_instance_id(instance_id, params \\ nil, opts \\ nil)

lists process statuses by instance id

Arguments

  • instance_id

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_process_statuses_by_instance_id!(instance_id, params \\ nil, opts \\ nil)

lists process statuses by instance id

Raises any errors instead of returning them

Arguments

  • instance_id

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_relationships(params \\ nil, opts \\ nil)

lists all relationships

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_relationships!(params \\ nil, opts \\ nil)

lists all relationships

Raises any errors instead of returning them

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_resource_relationships_from(instance_id, params \\ nil, opts \\ nil)

lists resource relationships from the instance

Arguments

  • instance_id

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_resource_relationships_from!(instance_id, params \\ nil, opts \\ nil)

lists resource relationships from the instance

Raises any errors instead of returning them

Arguments

  • instance_id

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_service_relationships_from(instance_id, params \\ nil, opts \\ nil)

lists service relationships from the instance

Arguments

  • instance_id

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_service_relationships_from!(instance_id, params \\ nil, opts \\ nil)

lists service relationships from the instance

Raises any errors instead of returning them

Arguments

  • instance_id

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_specifications(params \\ nil, opts \\ nil)

lists all serviceSpecification and resourceSpecification

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

list_specifications!(params \\ nil, opts \\ nil)

lists all serviceSpecification and resourceSpecification

Raises any errors instead of returning them

Options

  • :page - Pagination options, see Ash.read/2 for more.

  • :load (term/0) - A load statement to add onto the query

  • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

  • :lock (term/0) - A lock statement to add onto the query

  • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.
    The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer. The default value is false.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

  • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.
    See Ash.Query.load/2. The default value is false.

  • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. Valid values are :filter, :error The default value is :filter.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

  • :not_found_error? (boolean/0) - Whether or not to return or raise a NotFound error or to return nil when a get? action/interface is called.

  • :stream? (boolean/0) - If true, a stream of the results will be returned The default value is false.

  • :stream_options (keyword/0) - Options passed to Ash.stream!, if stream?: true is given

    • :batch_size (integer/0) - How many records to request in each query run. Defaults to the pagination limits on the resource, or 250.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

load(data, query, opts \\ [])

This function is deprecated. Use `Ash.load/3` instead.

load!(data, query, opts \\ [])

This function is deprecated. Use `Ash.load!/3` instead.

max(query, field, opts \\ [])

This function is deprecated. Use `Ash.max/3` instead.

max!(query, field, opts \\ [])

This function is deprecated. Use `Ash.max!/3` instead.

min(query, field, opts \\ [])

This function is deprecated. Use `Ash.min/3` instead.

min!(query, field, opts \\ [])

This function is deprecated. Use `Ash.min!/3` instead.

name_instance(record, attrs \\ %{})

name_instance!(record, attrs \\ %{})

Renames an instance.

next_minor_specification(record, params \\ nil, opts \\ nil)

increments the minor version and resets the patch version

Options

  • :params (map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.

  • :atomic_upgrade? (boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_update, if a query, list, or stream of inputs is provided.

    • :atomic_update (map/0) - A map of atomic updates to apply. See Ash.Changeset.atomic_update/3 for more.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is [:atomic].

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

next_minor_specification!(record, params \\ nil, opts \\ nil)

increments the minor version and resets the patch version

Raises any errors instead of returning them

Options

  • :params (map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.

  • :atomic_upgrade? (boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_update, if a query, list, or stream of inputs is provided.

    • :atomic_update (map/0) - A map of atomic updates to apply. See Ash.Changeset.atomic_update/3 for more.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is [:atomic].

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

next_patch_specification(record, params \\ nil, opts \\ nil)

increments the patch version

Options

  • :params (map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.

  • :atomic_upgrade? (boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_update, if a query, list, or stream of inputs is provided.

    • :atomic_update (map/0) - A map of atomic updates to apply. See Ash.Changeset.atomic_update/3 for more.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is [:atomic].

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

next_patch_specification!(record, params \\ nil, opts \\ nil)

increments the patch version

Raises any errors instead of returning them

Options

  • :params (map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.

  • :atomic_upgrade? (boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_update, if a query, list, or stream of inputs is provided.

    • :atomic_update (map/0) - A map of atomic updates to apply. See Ash.Changeset.atomic_update/3 for more.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is [:atomic].

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

page(page, request)

This function is deprecated. Use `Ash.page/2` instead.

page!(page, request)

This function is deprecated. Use `Ash.page!/2` instead.

query_to_find_entities_by_id(query, params_or_opts \\ %{}, opts \\ [])

Returns the query corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

query_to_find_entities_by_name(query, params_or_opts \\ %{}, opts \\ [])

Returns the query corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

query_to_find_external_identifiers_by_external_id(query, params_or_opts \\ %{}, opts \\ [])

Returns the query corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

query_to_find_notes_by_note_id(query, params_or_opts \\ %{}, opts \\ [])

Returns the query corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

query_to_find_specifications_by_category(query, params_or_opts \\ %{}, opts \\ [])

Returns the query corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

query_to_find_specifications_by_name(query, params_or_opts \\ %{}, opts \\ [])

Returns the query corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

query_to_get_assignable_characteristic_by_id(id, params_or_opts \\ %{}, opts \\ [])

Returns the query corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

query_to_get_assignment_relationship_by_id(id, params_or_opts \\ %{}, opts \\ [])

Returns the query corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

query_to_get_characteristic_by_id(id, params_or_opts \\ %{}, opts \\ [])

Returns the query corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

query_to_get_defined_simple_relationship_by_id(id, params_or_opts \\ %{}, opts \\ [])

Returns the query corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

query_to_get_entity_by_id(id, params_or_opts \\ %{}, opts \\ [])

Returns the query corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

query_to_get_entity_ref_by_id(id, params_or_opts \\ %{}, opts \\ [])

Returns the query corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

query_to_get_event_by_id(id, params_or_opts \\ %{}, opts \\ [])

Returns the query corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

query_to_get_external_identifier_by_id(id, params_or_opts \\ %{}, opts \\ [])

Returns the query corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

query_to_get_feature_by_id(id, params_or_opts \\ %{}, opts \\ [])

Returns the query corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

query_to_get_latest_specification_by_name(query, params_or_opts \\ %{}, opts \\ [])

Returns the query corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

query_to_get_note_by_id(id, params_or_opts \\ %{}, opts \\ [])

Returns the query corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

query_to_get_party_ref_by_id(id, params_or_opts \\ %{}, opts \\ [])

Returns the query corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

query_to_get_place_ref_by_id(id, params_or_opts \\ %{}, opts \\ [])

Returns the query corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

query_to_get_process_status_by_id(id, params_or_opts \\ %{}, opts \\ [])

Returns the query corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

query_to_get_relationship_by_id(id, params_or_opts \\ %{}, opts \\ [])

Returns the query corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

query_to_get_specification_by_id(id, params_or_opts \\ %{}, opts \\ [])

Returns the query corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

query_to_list_characteristics(params_or_opts \\ %{}, opts \\ [])

Returns the query corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

query_to_list_entities(params_or_opts \\ %{}, opts \\ [])

Returns the query corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

query_to_list_entity_refs(params_or_opts \\ %{}, opts \\ [])

Returns the query corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

query_to_list_entity_refs_by_entity_id(entity_id, params_or_opts \\ %{}, opts \\ [])

Returns the query corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

query_to_list_entity_refs_by_instance_id(instance_id, params_or_opts \\ %{}, opts \\ [])

Returns the query corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

query_to_list_events(params_or_opts \\ %{}, opts \\ [])

Returns the query corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

query_to_list_events_by_instance_id(instance_id, params_or_opts \\ %{}, opts \\ [])

Returns the query corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

query_to_list_external_identifiers(params_or_opts \\ %{}, opts \\ [])

Returns the query corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

query_to_list_external_identifiers_by_instance_id(instance_id, params_or_opts \\ %{}, opts \\ [])

Returns the query corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

query_to_list_external_identifiers_by_owner_id(owner_id, params_or_opts \\ %{}, opts \\ [])

Returns the query corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

query_to_list_features(params_or_opts \\ %{}, opts \\ [])

Returns the query corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

query_to_list_notes(params_or_opts \\ %{}, opts \\ [])

Returns the query corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

query_to_list_notes_by_author_id(author_id, params_or_opts \\ %{}, opts \\ [])

Returns the query corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

query_to_list_notes_by_instance_id(instance_id, params_or_opts \\ %{}, opts \\ [])

Returns the query corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

query_to_list_party_refs(params_or_opts \\ %{}, opts \\ [])

Returns the query corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

query_to_list_party_refs_by_instance_id(instance_id, params_or_opts \\ %{}, opts \\ [])

Returns the query corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

query_to_list_party_refs_by_party_id(party_id, params_or_opts \\ %{}, opts \\ [])

Returns the query corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

query_to_list_party_refs_by_place_id(place_id, params_or_opts \\ %{}, opts \\ [])

Returns the query corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

query_to_list_party_refs_by_source_party_id(source_party_id, params_or_opts \\ %{}, opts \\ [])

Returns the query corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

query_to_list_place_refs(params_or_opts \\ %{}, opts \\ [])

Returns the query corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

query_to_list_place_refs_by_instance_id(instance_id, params_or_opts \\ %{}, opts \\ [])

Returns the query corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

query_to_list_place_refs_by_party_id(party_id, params_or_opts \\ %{}, opts \\ [])

Returns the query corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

query_to_list_place_refs_by_place_id(place_id, params_or_opts \\ %{}, opts \\ [])

Returns the query corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

query_to_list_place_refs_by_source_place_id(source_place_id, params_or_opts \\ %{}, opts \\ [])

Returns the query corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

query_to_list_process_statuses(params_or_opts \\ %{}, opts \\ [])

Returns the query corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

query_to_list_process_statuses_by_instance_id(instance_id, params_or_opts \\ %{}, opts \\ [])

Returns the query corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

query_to_list_relationships(params_or_opts \\ %{}, opts \\ [])

Returns the query corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

query_to_list_resource_relationships_from(instance_id, params_or_opts \\ %{}, opts \\ [])

Returns the query corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

query_to_list_service_relationships_from(instance_id, params_or_opts \\ %{}, opts \\ [])

Returns the query corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

query_to_list_specifications(params_or_opts \\ %{}, opts \\ [])

Returns the query corresponding to the action.

Options

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :query - A query to seed the action with.

read(query, opts \\ [])

This function is deprecated. Use `Ash.read/2` instead.

read!(query, opts \\ [])

This function is deprecated. Use `Ash.read!/2` instead.

read_one(query, opts \\ [])

This function is deprecated. Use `Ash.read_one/2` instead.

read_one!(query, opts \\ [])

This function is deprecated. Use `Ash.read_one!/2` instead.

relate_feature_characteristics(record, params \\ nil, opts \\ nil)

relates characteristics to the feature

Inputs

  • characteristics

Options

  • :params (map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.

  • :atomic_upgrade? (boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_update, if a query, list, or stream of inputs is provided.

    • :atomic_update (map/0) - A map of atomic updates to apply. See Ash.Changeset.atomic_update/3 for more.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is [:atomic].

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

relate_feature_characteristics!(record, params \\ nil, opts \\ nil)

relates characteristics to the feature

Raises any errors instead of returning them

Inputs

  • characteristics

Options

  • :params (map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.

  • :atomic_upgrade? (boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_update, if a query, list, or stream of inputs is provided.

    • :atomic_update (map/0) - A map of atomic updates to apply. See Ash.Changeset.atomic_update/3 for more.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is [:atomic].

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

relate_instance_characteristics(record, attrs \\ %{})

relate_instance_characteristics!(record, attrs \\ %{})

Relates characteristics to an instance.

relate_instance_features(record, attrs \\ %{})

relate_instance_features!(record, attrs \\ %{})

Relates features to an instance.

relate_relationship_characteristics(record, params \\ nil, opts \\ nil)

relates characteristics to the relationship

Inputs

  • characteristics

Options

  • :params (map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.

  • :atomic_upgrade? (boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_update, if a query, list, or stream of inputs is provided.

    • :atomic_update (map/0) - A map of atomic updates to apply. See Ash.Changeset.atomic_update/3 for more.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is [:atomic].

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

relate_relationship_characteristics!(record, params \\ nil, opts \\ nil)

relates characteristics to the relationship

Raises any errors instead of returning them

Inputs

  • characteristics

Options

  • :params (map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.

  • :atomic_upgrade? (boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_update, if a query, list, or stream of inputs is provided.

    • :atomic_update (map/0) - A map of atomic updates to apply. See Ash.Changeset.atomic_update/3 for more.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is [:atomic].

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

reload(record, opts \\ [])

This function is deprecated. Use `Ash.reload/2` instead.

reload!(record, opts \\ [])

This function is deprecated. Use `Ash.reload!/2` instead.

reserve_service(record)

reserve_service!(record)

Reserves a service instance.

respecify_instance(record, attrs \\ %{})

respecify_instance!(record, attrs \\ %{})

Respecifies an instance (changes its specification).

run_action(input, opts \\ [])

This function is deprecated. Use `Ash.run_action/2` instead.

run_action!(input, opts \\ [])

This function is deprecated. Use `Ash.run_action/2` instead.

status_service(record, attrs \\ %{})

status_service!(record, attrs \\ %{})

Updates the operating status of a service instance.

stream!(query, opts \\ [])

This function is deprecated. Use `Ash.stream!/2` instead.

sum(query, field, opts \\ [])

This function is deprecated. Use `Ash.sum/3` instead.

sum!(query, field, opts \\ [])

This function is deprecated. Use `Ash.sum!/3` instead.

suspend_service(record)

suspend_service!(record)

Suspends a service instance.

terminate_service(record)

terminate_service!(record)

Terminates a service instance.

unrelate_feature_characteristics(record, params \\ nil, opts \\ nil)

unrelates characteristics from the feature

Inputs

  • characteristics

Options

  • :params (map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.

  • :atomic_upgrade? (boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_update, if a query, list, or stream of inputs is provided.

    • :atomic_update (map/0) - A map of atomic updates to apply. See Ash.Changeset.atomic_update/3 for more.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is [:atomic].

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

unrelate_feature_characteristics!(record, params \\ nil, opts \\ nil)

unrelates characteristics from the feature

Raises any errors instead of returning them

Inputs

  • characteristics

Options

  • :params (map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.

  • :atomic_upgrade? (boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_update, if a query, list, or stream of inputs is provided.

    • :atomic_update (map/0) - A map of atomic updates to apply. See Ash.Changeset.atomic_update/3 for more.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is [:atomic].

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

unrelate_instance_characteristics(record, attrs \\ %{})

unrelate_instance_characteristics!(record, attrs \\ %{})

Unrelates characteristics from an instance.

unrelate_instance_features(record, attrs \\ %{})

unrelate_instance_features!(record, attrs \\ %{})

Unrelates features from an instance.

unrelate_relationship_characteristics(record, params \\ nil, opts \\ nil)

unrelates characteristic from the relationship

Inputs

  • characteristics

Options

  • :params (map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.

  • :atomic_upgrade? (boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_update, if a query, list, or stream of inputs is provided.

    • :atomic_update (map/0) - A map of atomic updates to apply. See Ash.Changeset.atomic_update/3 for more.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is [:atomic].

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

unrelate_relationship_characteristics!(record, params \\ nil, opts \\ nil)

unrelates characteristic from the relationship

Raises any errors instead of returning them

Inputs

  • characteristics

Options

  • :params (map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.

  • :atomic_upgrade? (boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_update, if a query, list, or stream of inputs is provided.

    • :atomic_update (map/0) - A map of atomic updates to apply. See Ash.Changeset.atomic_update/3 for more.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is [:atomic].

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

update(changeset, opts \\ [])

This function is deprecated. Use `Ash.update/2` instead.

update!(changeset, opts \\ [])

This function is deprecated. Use `Ash.update!/2` instead.

update_assignable_characteristic(record, params \\ nil, opts \\ nil)

Calls the update action on Diffo.Provider.AssignableCharacteristic.

Inputs

  • first - the first assignable value in the pool
  • last - the last assignable value in the pool
  • algorithm - the selection algorithm for auto-assign
  • assignable_type - the type label of the assignable thing (e.g. "ADSL2+")

Options

  • :params (map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.

  • :atomic_upgrade? (boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_update, if a query, list, or stream of inputs is provided.

    • :atomic_update (map/0) - A map of atomic updates to apply. See Ash.Changeset.atomic_update/3 for more.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is [:atomic].

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

update_assignable_characteristic!(record, params \\ nil, opts \\ nil)

Calls the update action on Diffo.Provider.AssignableCharacteristic.

Raises any errors instead of returning them

Inputs

  • first - the first assignable value in the pool
  • last - the last assignable value in the pool
  • algorithm - the selection algorithm for auto-assign
  • assignable_type - the type label of the assignable thing (e.g. "ADSL2+")

Options

  • :params (map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.

  • :atomic_upgrade? (boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_update, if a query, list, or stream of inputs is provided.

    • :atomic_update (map/0) - A map of atomic updates to apply. See Ash.Changeset.atomic_update/3 for more.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is [:atomic].

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

update_characteristic(record, params \\ nil, opts \\ nil)

updates the characteristic value or instance, feature or relationship

Inputs

  • value - the value of the characteristic
  • values - the array of values of the characteristic
  • instance_id
  • feature_id
  • relationship_id
  • is_array - true when this characteristic holds an array of values; defaults false

Options

  • :params (map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.

  • :atomic_upgrade? (boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_update, if a query, list, or stream of inputs is provided.

    • :atomic_update (map/0) - A map of atomic updates to apply. See Ash.Changeset.atomic_update/3 for more.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is [:atomic].

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

update_characteristic!(record, params \\ nil, opts \\ nil)

updates the characteristic value or instance, feature or relationship

Raises any errors instead of returning them

Inputs

  • value - the value of the characteristic
  • values - the array of values of the characteristic
  • instance_id
  • feature_id
  • relationship_id
  • is_array - true when this characteristic holds an array of values; defaults false

Options

  • :params (map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.

  • :atomic_upgrade? (boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_update, if a query, list, or stream of inputs is provided.

    • :atomic_update (map/0) - A map of atomic updates to apply. See Ash.Changeset.atomic_update/3 for more.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is [:atomic].

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

update_entity(record, params \\ nil, opts \\ nil)

updates the entity

Inputs

  • name - the name of the entity
  • type - the type of the entity
  • href - the href of the entity
  • referred_type - the type of the entity

Options

  • :params (map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.

  • :atomic_upgrade? (boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_update, if a query, list, or stream of inputs is provided.

    • :atomic_update (map/0) - A map of atomic updates to apply. See Ash.Changeset.atomic_update/3 for more.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is [:atomic].

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

update_entity!(record, params \\ nil, opts \\ nil)

updates the entity

Raises any errors instead of returning them

Inputs

  • name - the name of the entity
  • type - the type of the entity
  • href - the href of the entity
  • referred_type - the type of the entity

Options

  • :params (map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.

  • :atomic_upgrade? (boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_update, if a query, list, or stream of inputs is provided.

    • :atomic_update (map/0) - A map of atomic updates to apply. See Ash.Changeset.atomic_update/3 for more.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is [:atomic].

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

update_entity_ref(record, params \\ nil, opts \\ nil)

updates the entity ref role

Inputs

  • role - the role of the entity to the instance

Options

  • :params (map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.

  • :atomic_upgrade? (boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_update, if a query, list, or stream of inputs is provided.

    • :atomic_update (map/0) - A map of atomic updates to apply. See Ash.Changeset.atomic_update/3 for more.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is [:atomic].

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

update_entity_ref!(record, params \\ nil, opts \\ nil)

updates the entity ref role

Raises any errors instead of returning them

Inputs

  • role - the role of the entity to the instance

Options

  • :params (map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.

  • :atomic_upgrade? (boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_update, if a query, list, or stream of inputs is provided.

    • :atomic_update (map/0) - A map of atomic updates to apply. See Ash.Changeset.atomic_update/3 for more.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is [:atomic].

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

update_external_identifier(record, params \\ nil, opts \\ nil)

updates the external identifier

Inputs

  • type - the type of this external identifier, this is an optional value
  • instance_id
  • owner_id
  • external_id - the id of the external identifier, this is an optional value

Options

  • :params (map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.

  • :atomic_upgrade? (boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_update, if a query, list, or stream of inputs is provided.

    • :atomic_update (map/0) - A map of atomic updates to apply. See Ash.Changeset.atomic_update/3 for more.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is [:atomic].

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

update_external_identifier!(record, params \\ nil, opts \\ nil)

updates the external identifier

Raises any errors instead of returning them

Inputs

  • type - the type of this external identifier, this is an optional value
  • instance_id
  • owner_id
  • external_id - the id of the external identifier, this is an optional value

Options

  • :params (map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.

  • :atomic_upgrade? (boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_update, if a query, list, or stream of inputs is provided.

    • :atomic_update (map/0) - A map of atomic updates to apply. See Ash.Changeset.atomic_update/3 for more.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is [:atomic].

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

update_feature(record, params \\ nil, opts \\ nil)

updates the feature isEnabled or instance relationship

Inputs

  • instance_id
  • isEnabled - indicates whether the feature is enabled

Options

  • :params (map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.

  • :atomic_upgrade? (boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_update, if a query, list, or stream of inputs is provided.

    • :atomic_update (map/0) - A map of atomic updates to apply. See Ash.Changeset.atomic_update/3 for more.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is [:atomic].

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

update_feature!(record, params \\ nil, opts \\ nil)

updates the feature isEnabled or instance relationship

Raises any errors instead of returning them

Inputs

  • instance_id
  • isEnabled - indicates whether the feature is enabled

Options

  • :params (map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.

  • :atomic_upgrade? (boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_update, if a query, list, or stream of inputs is provided.

    • :atomic_update (map/0) - A map of atomic updates to apply. See Ash.Changeset.atomic_update/3 for more.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is [:atomic].

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

update_note(record, params \\ nil, opts \\ nil)

updates the note, touching the timestamp

Inputs

  • text - the text of this note, this is a mandatory value
  • instance_id
  • author_id
  • note_id - the id of the note, this is an optional value

Options

  • :params (map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.

  • :atomic_upgrade? (boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_update, if a query, list, or stream of inputs is provided.

    • :atomic_update (map/0) - A map of atomic updates to apply. See Ash.Changeset.atomic_update/3 for more.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is [:atomic].

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

update_note!(record, params \\ nil, opts \\ nil)

updates the note, touching the timestamp

Raises any errors instead of returning them

Inputs

  • text - the text of this note, this is a mandatory value
  • instance_id
  • author_id
  • note_id - the id of the note, this is an optional value

Options

  • :params (map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.

  • :atomic_upgrade? (boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_update, if a query, list, or stream of inputs is provided.

    • :atomic_update (map/0) - A map of atomic updates to apply. See Ash.Changeset.atomic_update/3 for more.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is [:atomic].

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

update_party(record, attrs)

@spec update_party(Ash.Resource.record(), map()) ::
  {:ok, Ash.Resource.record()} | {:error, term()}

Same as update_party!/2 but returns {:ok, record} or {:error, error}.

update_party!(record, attrs)

@spec update_party!(Ash.Resource.record(), map()) :: Ash.Resource.record()

Updates a Party by dispatching on the record's struct module.

Cascade leaves (Provider.Organization/Individual) update via their :define action; the abstract Provider.Party updates via its inherited :update action.

update_party_ref(record, params \\ nil, opts \\ nil)

updates the party ref role

Inputs

  • role - the role of the party to the instance, place or source party

Options

  • :params (map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.

  • :atomic_upgrade? (boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_update, if a query, list, or stream of inputs is provided.

    • :atomic_update (map/0) - A map of atomic updates to apply. See Ash.Changeset.atomic_update/3 for more.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is [:atomic].

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

update_party_ref!(record, params \\ nil, opts \\ nil)

updates the party ref role

Raises any errors instead of returning them

Inputs

  • role - the role of the party to the instance, place or source party

Options

  • :params (map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.

  • :atomic_upgrade? (boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_update, if a query, list, or stream of inputs is provided.

    • :atomic_update (map/0) - A map of atomic updates to apply. See Ash.Changeset.atomic_update/3 for more.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is [:atomic].

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

update_place(record, attrs)

@spec update_place(Ash.Resource.record(), map()) ::
  {:ok, Ash.Resource.record()} | {:error, term()}

Same as update_place!/2 but returns {:ok, record} or {:error, error}.

update_place!(record, attrs)

@spec update_place!(Ash.Resource.record(), map()) :: Ash.Resource.record()

Updates a Place by dispatching on the record's struct module.

Cascade leaves (Provider.GeographicAddress/Site/Location) update via their :define action; the abstract Provider.Place updates via its inherited :update action.

update_place_ref(record, params \\ nil, opts \\ nil)

updates the place ref role

Inputs

  • role - the role of the place to the instance, party or source place

Options

  • :params (map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.

  • :atomic_upgrade? (boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_update, if a query, list, or stream of inputs is provided.

    • :atomic_update (map/0) - A map of atomic updates to apply. See Ash.Changeset.atomic_update/3 for more.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is [:atomic].

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

update_place_ref!(record, params \\ nil, opts \\ nil)

updates the place ref role

Raises any errors instead of returning them

Inputs

  • role - the role of the place to the instance, party or source place

Options

  • :params (map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.

  • :atomic_upgrade? (boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_update, if a query, list, or stream of inputs is provided.

    • :atomic_update (map/0) - A map of atomic updates to apply. See Ash.Changeset.atomic_update/3 for more.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is [:atomic].

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

update_process_status(record, params \\ nil, opts \\ nil)

updates a process status, touching the timestamp

Inputs

  • code - the code of this process status, this is a mandatory value
  • message - the message of this process status, this is a mandatory value
  • severity - the severity of this process status, this is a mandatory value
  • parameterized_message - the parameterized message of this process status, this is an optional value

Options

  • :params (map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.

  • :atomic_upgrade? (boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_update, if a query, list, or stream of inputs is provided.

    • :atomic_update (map/0) - A map of atomic updates to apply. See Ash.Changeset.atomic_update/3 for more.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is [:atomic].

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

update_process_status!(record, params \\ nil, opts \\ nil)

updates a process status, touching the timestamp

Raises any errors instead of returning them

Inputs

  • code - the code of this process status, this is a mandatory value
  • message - the message of this process status, this is a mandatory value
  • severity - the severity of this process status, this is a mandatory value
  • parameterized_message - the parameterized message of this process status, this is an optional value

Options

  • :params (map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.

  • :atomic_upgrade? (boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_update, if a query, list, or stream of inputs is provided.

    • :atomic_update (map/0) - A map of atomic updates to apply. See Ash.Changeset.atomic_update/3 for more.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is [:atomic].

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

update_relationship(record, params \\ nil, opts \\ nil)

updates the relationship type and/or alias

Inputs

  • alias - the alias of this relationship, used for supporting service or resource
  • type - the type of the relationship from the source to the target

Options

  • :params (map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.

  • :atomic_upgrade? (boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_update, if a query, list, or stream of inputs is provided.

    • :atomic_update (map/0) - A map of atomic updates to apply. See Ash.Changeset.atomic_update/3 for more.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is [:atomic].

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.

update_relationship!(record, params \\ nil, opts \\ nil)

updates the relationship type and/or alias

Raises any errors instead of returning them

Inputs

  • alias - the alias of this relationship, used for supporting service or resource
  • type - the type of the relationship from the source to the target

Options

  • :params (map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.

  • :atomic_upgrade? (boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value is true.

  • :timeout (timeout/0) - A positive integer, or :infinity. If none is provided, the timeout configured on the domain is used.

  • :tracer (one or a list of module that adopts Ash.Tracer) - A tracer that implements the Ash.Tracer behaviour. See that module for more.

  • :action (term/0) - The action to use, either an Action struct or the name of the action

  • :authorize? - If an actor option is provided (even if it is nil), authorization happens automatically. If not, this flag can be used to authorize with no user.

  • :context (map/0) - Context to set on the query, changeset, or input

  • :tenant (value that implements the Ash.ToTenant protocol) - A tenant to set on the query or changeset

  • :actor (term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access

  • :scope (term/0) - A value that implements the Ash.Scope.ToOpts protocol, for passing around actor/tenant/context in a single value. See Ash.Scope.ToOpts for more.

  • :return_notifications? (boolean/0) - Use this if you're running ash actions in your own transaction and you want to manually handle sending notifications.
    If a transaction is ongoing, and this is false, notifications will be discarded, otherwise the return value is {:ok, result, notifications} (or {:ok, notifications})
    To send notifications later, use Ash.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value is false.

  • :rollback_on_error? (boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
    If the action has transaction? false this option has no effect. If an error is returned from the data layer and the resource is in a transaction, the transaction is always rolled back, regardless. The default value is true.

  • :notification_metadata (term/0) - Metadata to be merged into the metadata field for all notifications sent from this operation. The default value is %{}.

  • :skip_unknown_inputs - A list of inputs that, if provided, will be ignored if they are not recognized by the action. Use :* to indicate all unknown keys.

  • :load (term/0) - A load statement to add onto the changeset

  • :bulk_options (keyword/0) - Options passed to Ash.bulk_update, if a query, list, or stream of inputs is provided.

    • :atomic_update (map/0) - A map of atomic updates to apply. See Ash.Changeset.atomic_update/3 for more.

    • :stream_batch_size (integer/0) - Batch size to use if provided a query and the query must be streamed

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records if the :stream strategy is chosen. See the Ash.stream!/2 docs for more. The default value is :keyset.

    • :authorize_query? (boolean/0) - If a query is given, determines whether or not authorization is run on that query. The default value is true.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :filter (term/0) - A filter to apply to records. This is also applied to a stream of inputs.

    • :strategy - The strategy or strategies to enable. :stream is used in all cases if the data layer does not support atomics. The default value is [:atomic].

    • :transform_changeset (function of arity 1) - A function that takes and returns a changeset, applied to each changeset after it is built but before validation. Used internally by managed relationships to set foreign keys and context.

    • :allow_stream_with - The 'worst' strategy allowed to be used to fetch records. See Ash.stream!/2 docs for more. The default value is :keyset.

    • :stream_with - The specific strategy to use to fetch records. See Ash.stream!/2 docs for more.

    • :max_concurrency (non_neg_integer/0) - The maximum number of processes allowed to be started for parallel loading of relationships and calculations. Defaults to System.schedulers_online() * 2

    • :lock (term/0) - A lock statement to add onto the query

    • :return_query? (boolean/0) - If true, the query that was ultimately used is returned as a third tuple element.

      The query goes through many potential changes during a request, potentially adding authorization filters, or replacing relationships for other data layers with their corresponding ids. This option can be used to get the true query that was sent to the data layer.

      The default value is false.

    • :reuse_values? (boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value is false.

    • :strict? (boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.

      See Ash.Query.load/2.

      The default value is false.

    • :authorize_with - If set to :error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is :filter.

    • :read_action (atom/0) - The action to use when building the read query.

    • :assume_casted? (boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value is false.

    • :select (list of atom/0) - A select statement to apply to records. Ignored if return_records? is not true.

    • :authorize_query_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_changeset_with - If set to :error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Uses authorize_with if not set.

    • :authorize_with - If set to :error, instead of filtering unauthorized query results, unauthorized query results will raise an appropriate forbidden error. The default value is :filter.

    • :private_arguments (map/0) - Private argument values to set on each changeset before validations and changes are run. The default value is %{}.

    • :sorted? (boolean/0) - Whether or not to sort results by their input position, in cases where return_records?: true was provided. The default value is false.

    • :return_records? (boolean/0) - Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts. The default value is false.

    • :return_errors? (boolean/0) - Whether to return all errors that occur during the operation. Defaults to the value of :bulk_actions_default_to_errors? in your config, or false if not set. Returning all errors may be expensive for large inserts. The default value is false.

    • :batch_size (pos_integer/0) - The number of records to include in each batch. Defaults to the default_limit or max_page_size of the action, or 100.

    • :return_stream? (boolean/0) - If set to true, instead of an Ash.BulkResult, a mixed stream is returned.

      Potential elements:

      {:notification, notification} - if return_notifications? is set to true {:ok, record} - if return_records? is set to true {:error, error} - an error that occurred. May be changeset or an individual error.

      The default value is false.

    • :return_nothing? (boolean/0) - Mutes warnings about returning nothing.

      Only relevant if return_stream? is set to true and all other return_*? options are set to false.

      The default value is false.

    • :stop_on_error? (boolean/0) - If true, the first encountered error will stop the action and be returned. Otherwise, errors will be skipped. The default value is false.

    • :notify? (boolean/0) - Whether or not to generate any notifications. If this is set to true then the data layer must return the results from each batch. This may be intensive for large bulk actions.

      Notifications will be automatically sent unless return_notifications? is set to true.

      The default value is false.

    • :transaction - Whether or not to wrap the entire execution in a transaction, each batch, or not at all.

      Keep in mind:

      before_transaction and after_transaction hooks attached to changesets will have to be run inside the transaction if you choose transaction: :all.

      The default value is :batch.

    • :max_concurrency (non_neg_integer/0) - If set to a value greater than 0, up to that many tasks will be started to run batches asynchronously The default value is 0.

  • :private_arguments (map/0) - Private argument values to set before validations and changes. The default value is %{}.