DiffoExample.Nbn (DiffoExample v0.2.1)

Copy Markdown View Source

Diffo - TMF Service and Resource Management with a difference

Nbn - example NBN domain

Models NBN network resources including the Ethernet circuit (NbnEthernet) and its constituent resources: UNI (dedicated), AVC (dedicated), NTD, CVC (aggregates AVCs, terminates at NNI Group), NNI Group, and NNI.

An example showing how TMF Resources for a fictional NBN domain can be extended from the Provider domain

Summary

Functions

Calls the activate action on DiffoExample.Nbn.Rsp.

Calls the activate action on DiffoExample.Nbn.Rsp.

assigns a C-VLAN ID from the CVC pool to an AVC

assigns a C-VLAN ID from the CVC pool to an AVC

assigns a port from the NTD pool to a UNI

assigns a port from the NTD pool to a UNI

assigns an S-VLAN ID from the NNI Group pool to a CVC

assigns an S-VLAN ID from the NNI Group pool to a CVC

creates a new AVC resource instance

creates a new AVC resource instance

creates a new CVC resource instance

creates a new CVC resource instance

creates a new NBN Ethernet access resource instance

creates a new NBN Ethernet access resource instance

creates a new NNI resource instance

creates a new NNI resource instance

creates a new NNI Group resource instance

creates a new NNI Group resource instance

creates a new NTD resource instance

creates a new NTD resource instance

creates a new UNI resource instance

creates a new UNI resource instance

Runs authorization checks for DiffoExample.Nbn.Rsp.activate

Runs authorization checks for DiffoExample.Nbn.Rsp.activate, returning a boolean.

Runs authorization checks for DiffoExample.Nbn.Cvc.assign_cvlan

Runs authorization checks for DiffoExample.Nbn.Cvc.assign_cvlan, returning a boolean.

Runs authorization checks for DiffoExample.Nbn.Ntd.assign_port

Runs authorization checks for DiffoExample.Nbn.Ntd.assign_port, returning a boolean.

Runs authorization checks for DiffoExample.Nbn.NniGroup.assign_svlan

Runs authorization checks for DiffoExample.Nbn.NniGroup.assign_svlan, returning a boolean.

Runs authorization checks for DiffoExample.Nbn.Avc.build

Runs authorization checks for DiffoExample.Nbn.Avc.build, returning a boolean.

Runs authorization checks for DiffoExample.Nbn.Cvc.build

Runs authorization checks for DiffoExample.Nbn.Cvc.build, returning a boolean.

Runs authorization checks for DiffoExample.Nbn.NbnEthernet.build

Runs authorization checks for DiffoExample.Nbn.NbnEthernet.build, returning a boolean.

Runs authorization checks for DiffoExample.Nbn.Nni.build

Runs authorization checks for DiffoExample.Nbn.Nni.build, returning a boolean.

Runs authorization checks for DiffoExample.Nbn.NniGroup.build

Runs authorization checks for DiffoExample.Nbn.NniGroup.build, returning a boolean.

Runs authorization checks for DiffoExample.Nbn.Ntd.build

Runs authorization checks for DiffoExample.Nbn.Ntd.build, returning a boolean.

Runs authorization checks for DiffoExample.Nbn.Uni.build

Runs authorization checks for DiffoExample.Nbn.Uni.build, returning a boolean.

Runs authorization checks for DiffoExample.Nbn.Rsp.build

Runs authorization checks for DiffoExample.Nbn.Rsp.build, returning a boolean.

Runs authorization checks for DiffoExample.Nbn.Rsp.deactivate

Runs authorization checks for DiffoExample.Nbn.Rsp.deactivate, returning a boolean.

Runs authorization checks for DiffoExample.Nbn.Avc.define

Runs authorization checks for DiffoExample.Nbn.Avc.define, returning a boolean.

Runs authorization checks for DiffoExample.Nbn.Cvc.define

Runs authorization checks for DiffoExample.Nbn.Cvc.define, returning a boolean.

Runs authorization checks for DiffoExample.Nbn.NbnEthernet.define

Runs authorization checks for DiffoExample.Nbn.NbnEthernet.define, returning a boolean.

Runs authorization checks for DiffoExample.Nbn.Nni.define

Runs authorization checks for DiffoExample.Nbn.Nni.define, returning a boolean.

Runs authorization checks for DiffoExample.Nbn.NniGroup.define

Runs authorization checks for DiffoExample.Nbn.NniGroup.define, returning a boolean.

Runs authorization checks for DiffoExample.Nbn.Ntd.define

Runs authorization checks for DiffoExample.Nbn.Ntd.define, returning a boolean.

Runs authorization checks for DiffoExample.Nbn.Uni.define

Runs authorization checks for DiffoExample.Nbn.Uni.define, returning a boolean.

Runs authorization checks for DiffoExample.Nbn.Avc.read

Runs authorization checks for DiffoExample.Nbn.Avc.read, returning a boolean.

Runs authorization checks for DiffoExample.Nbn.Cvc.read

Runs authorization checks for DiffoExample.Nbn.Cvc.read, returning a boolean.

Runs authorization checks for DiffoExample.Nbn.NbnEthernet.read

Runs authorization checks for DiffoExample.Nbn.NbnEthernet.read, returning a boolean.

Runs authorization checks for DiffoExample.Nbn.Nni.read

Runs authorization checks for DiffoExample.Nbn.Nni.read, returning a boolean.

Runs authorization checks for DiffoExample.Nbn.NniGroup.read

Runs authorization checks for DiffoExample.Nbn.NniGroup.read, returning a boolean.

Runs authorization checks for DiffoExample.Nbn.Ntd.read

Runs authorization checks for DiffoExample.Nbn.Ntd.read, returning a boolean.

Runs authorization checks for DiffoExample.Nbn.Rsp.read

Runs authorization checks for DiffoExample.Nbn.Rsp.read, returning a boolean.

Runs authorization checks for DiffoExample.Nbn.Rsp.read

Runs authorization checks for DiffoExample.Nbn.Rsp.read, returning a boolean.

Runs authorization checks for DiffoExample.Nbn.Uni.read

Runs authorization checks for DiffoExample.Nbn.Uni.read, returning a boolean.

Runs authorization checks for DiffoExample.Nbn.Rsp.inventory

Runs authorization checks for DiffoExample.Nbn.Rsp.inventory, returning a boolean.

Runs authorization checks for DiffoExample.Nbn.Avc.mine

Runs authorization checks for DiffoExample.Nbn.Avc.mine, returning a boolean.

Runs authorization checks for DiffoExample.Nbn.Cvc.mine

Runs authorization checks for DiffoExample.Nbn.Cvc.mine, returning a boolean.

Runs authorization checks for DiffoExample.Nbn.NbnEthernet.mine

Runs authorization checks for DiffoExample.Nbn.NbnEthernet.mine, returning a boolean.

Runs authorization checks for DiffoExample.Nbn.Uni.mine

Runs authorization checks for DiffoExample.Nbn.Uni.mine, returning a boolean.

Runs authorization checks for DiffoExample.Nbn.Avc.relate

Runs authorization checks for DiffoExample.Nbn.Avc.relate, returning a boolean.

Runs authorization checks for DiffoExample.Nbn.Cvc.relate

Runs authorization checks for DiffoExample.Nbn.Cvc.relate, returning a boolean.

Runs authorization checks for DiffoExample.Nbn.NbnEthernet.relate

Runs authorization checks for DiffoExample.Nbn.NbnEthernet.relate, returning a boolean.

Runs authorization checks for DiffoExample.Nbn.Nni.relate

Runs authorization checks for DiffoExample.Nbn.Nni.relate, returning a boolean.

Runs authorization checks for DiffoExample.Nbn.NniGroup.relate

Runs authorization checks for DiffoExample.Nbn.NniGroup.relate, returning a boolean.

Runs authorization checks for DiffoExample.Nbn.Ntd.relate

Runs authorization checks for DiffoExample.Nbn.Ntd.relate, returning a boolean.

Runs authorization checks for DiffoExample.Nbn.Uni.relate

Runs authorization checks for DiffoExample.Nbn.Uni.relate, returning a boolean.

Runs authorization checks for DiffoExample.Nbn.Rsp.suspend

Runs authorization checks for DiffoExample.Nbn.Rsp.suspend, returning a boolean.

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 build action on DiffoExample.Nbn.Rsp.

Calls the build action on DiffoExample.Nbn.Rsp.

Calls the deactivate action on DiffoExample.Nbn.Rsp.

Calls the deactivate action on DiffoExample.Nbn.Rsp.

read a service or resource instance

read a service or resource instance

read a service or resource instance

read a service or resource instance

read a service or resource instance

read a service or resource instance

read a service or resource instance

read a service or resource instance

read a service or resource instance

read a service or resource instance

read a service or resource instance

read a service or resource instance

Calls the read action on DiffoExample.Nbn.Rsp.

Calls the read action on DiffoExample.Nbn.Rsp.

Calls the read action on DiffoExample.Nbn.Rsp.

Calls the read action on DiffoExample.Nbn.Rsp.

read a service or resource instance

read a service or resource instance

Calls the inventory action on DiffoExample.Nbn.Rsp.

Calls the inventory action on DiffoExample.Nbn.Rsp.

updates the AVC with data mined from related instances

updates the AVC with data mined from related instances

updates the CVC with data mined from related instances

updates the CVC with data mined from related instances

updates the NBN Ethernet access with data mined from related instances

updates the NBN Ethernet access with data mined from related instances

updates the UNI with data mined from related instances

updates the UNI with data mined from related instances

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.

relates the AVC with other instances

relates the AVC with other instances

relates the CVC with other instances (e.g. AVC aggregation, NNI Group termination)

relates the CVC with other instances (e.g. AVC aggregation, NNI Group termination)

relates the NBN Ethernet access with other instances (e.g. UNI)

relates the NBN Ethernet access with other instances (e.g. UNI)

relates the NNI with other instances (e.g. its parent NNI Group)

relates the NNI with other instances (e.g. its parent NNI Group)

relates the NNI Group with other instances (e.g. NNI resources it comprises)

relates the NNI Group with other instances (e.g. NNI resources it comprises)

relates the NTD with other instances (e.g. UNI)

relates the NTD with other instances (e.g. UNI)

relates the UNI with other instances (e.g. NTD, NBN Ethernet access)

relates the UNI with other instances (e.g. NTD, NBN Ethernet access)

Calls the suspend action on DiffoExample.Nbn.Rsp.

Calls the suspend action on DiffoExample.Nbn.Rsp.

Functions

activate_rsp(record, params \\ nil, opts \\ nil)

Calls the activate action on DiffoExample.Nbn.Rsp.

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 %{}.

activate_rsp!(record, params \\ nil, opts \\ nil)

Calls the activate action on DiffoExample.Nbn.Rsp.

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 %{}.

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.

assign_cvlan(record, params \\ nil, opts \\ nil)

assigns a C-VLAN ID from the CVC pool to an AVC

Inputs

  • assignment

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 %{}.

assign_cvlan!(record, params \\ nil, opts \\ nil)

assigns a C-VLAN ID from the CVC pool to an AVC

Raises any errors instead of returning them

Inputs

  • assignment

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 %{}.

assign_port(record, params \\ nil, opts \\ nil)

assigns a port from the NTD pool to a UNI

Inputs

  • assignment

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 %{}.

assign_port!(record, params \\ nil, opts \\ nil)

assigns a port from the NTD pool to a UNI

Raises any errors instead of returning them

Inputs

  • assignment

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 %{}.

assign_svlan(record, params \\ nil, opts \\ nil)

assigns an S-VLAN ID from the NNI Group pool to a CVC

Inputs

  • assignment

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 %{}.

assign_svlan!(record, params \\ nil, opts \\ nil)

assigns an S-VLAN ID from the NNI Group pool to a CVC

Raises any errors instead of returning them

Inputs

  • assignment

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 %{}.

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.

build_avc(params \\ nil, opts \\ nil)

creates a new AVC resource instance

Inputs

  • id - a uuid4, unique to this instance, generated by default
  • which - the which of the instance, either expected or actual
  • relationships
  • parties
  • places

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 %{}.

build_avc!(params \\ nil, opts \\ nil)

creates a new AVC resource instance

Raises any errors instead of returning them

Inputs

  • id - a uuid4, unique to this instance, generated by default
  • which - the which of the instance, either expected or actual
  • relationships
  • parties
  • places

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 %{}.

build_cvc(params \\ nil, opts \\ nil)

creates a new CVC resource instance

Inputs

  • id - a uuid4, unique to this instance, generated by default
  • which - the which of the instance, either expected or actual
  • relationships
  • parties
  • places

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 %{}.

build_cvc!(params \\ nil, opts \\ nil)

creates a new CVC resource instance

Raises any errors instead of returning them

Inputs

  • id - a uuid4, unique to this instance, generated by default
  • which - the which of the instance, either expected or actual
  • relationships
  • parties
  • places

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 %{}.

build_nbn_ethernet(params \\ nil, opts \\ nil)

creates a new NBN Ethernet access resource instance

Inputs

  • id - a uuid4, unique to this instance, generated by default
  • which - the which of the instance, either expected or actual
  • relationships
  • parties
  • places

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 %{}.

build_nbn_ethernet!(params \\ nil, opts \\ nil)

creates a new NBN Ethernet access resource instance

Raises any errors instead of returning them

Inputs

  • id - a uuid4, unique to this instance, generated by default
  • which - the which of the instance, either expected or actual
  • relationships
  • parties
  • places

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 %{}.

build_nni(params \\ nil, opts \\ nil)

creates a new NNI resource instance

Inputs

  • id - a uuid4, unique to this instance, generated by default
  • which - the which of the instance, either expected or actual
  • relationships
  • parties
  • places

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 %{}.

build_nni!(params \\ nil, opts \\ nil)

creates a new NNI resource instance

Raises any errors instead of returning them

Inputs

  • id - a uuid4, unique to this instance, generated by default
  • which - the which of the instance, either expected or actual
  • relationships
  • parties
  • places

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 %{}.

build_nni_group(params \\ nil, opts \\ nil)

creates a new NNI Group resource instance

Inputs

  • id - a uuid4, unique to this instance, generated by default
  • name - the name of this service or resource instance
  • which - the which of the instance, either expected or actual
  • relationships
  • parties
  • places

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 %{}.

build_nni_group!(params \\ nil, opts \\ nil)

creates a new NNI Group resource instance

Raises any errors instead of returning them

Inputs

  • id - a uuid4, unique to this instance, generated by default
  • name - the name of this service or resource instance
  • which - the which of the instance, either expected or actual
  • relationships
  • parties
  • places

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 %{}.

build_ntd(params \\ nil, opts \\ nil)

creates a new NTD resource instance

Inputs

  • id - a uuid4, unique to this instance, generated by default
  • which - the which of the instance, either expected or actual
  • relationships
  • parties
  • places

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 %{}.

build_ntd!(params \\ nil, opts \\ nil)

creates a new NTD resource instance

Raises any errors instead of returning them

Inputs

  • id - a uuid4, unique to this instance, generated by default
  • which - the which of the instance, either expected or actual
  • relationships
  • parties
  • places

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 %{}.

build_uni(params \\ nil, opts \\ nil)

creates a new UNI resource instance

Inputs

  • id - a uuid4, unique to this instance, generated by default
  • which - the which of the instance, either expected or actual
  • relationships
  • parties
  • places

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 %{}.

build_uni!(params \\ nil, opts \\ nil)

creates a new UNI resource instance

Raises any errors instead of returning them

Inputs

  • id - a uuid4, unique to this instance, generated by default
  • which - the which of the instance, either expected or actual
  • relationships
  • parties
  • places

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 %{}.

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_activate_rsp(actor, record, params_or_opts \\ %{}, opts \\ [])

Runs authorization checks for DiffoExample.Nbn.Rsp.activate

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.

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

Runs authorization checks for DiffoExample.Nbn.Rsp.activate, 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.

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

Runs authorization checks for DiffoExample.Nbn.Cvc.assign_cvlan

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.

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

Runs authorization checks for DiffoExample.Nbn.Cvc.assign_cvlan, 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.

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

Runs authorization checks for DiffoExample.Nbn.Ntd.assign_port

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.

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

Runs authorization checks for DiffoExample.Nbn.Ntd.assign_port, 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.

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

Runs authorization checks for DiffoExample.Nbn.NniGroup.assign_svlan

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.

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

Runs authorization checks for DiffoExample.Nbn.NniGroup.assign_svlan, 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.

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

Runs authorization checks for DiffoExample.Nbn.Avc.build

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.

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

Runs authorization checks for DiffoExample.Nbn.Avc.build, 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.

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

Runs authorization checks for DiffoExample.Nbn.Cvc.build

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.

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

Runs authorization checks for DiffoExample.Nbn.Cvc.build, 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.

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

Runs authorization checks for DiffoExample.Nbn.NbnEthernet.build

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.

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

Runs authorization checks for DiffoExample.Nbn.NbnEthernet.build, 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.

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

Runs authorization checks for DiffoExample.Nbn.Nni.build

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.

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

Runs authorization checks for DiffoExample.Nbn.Nni.build, 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.

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

Runs authorization checks for DiffoExample.Nbn.NniGroup.build

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.

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

Runs authorization checks for DiffoExample.Nbn.NniGroup.build, 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.

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

Runs authorization checks for DiffoExample.Nbn.Ntd.build

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.

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

Runs authorization checks for DiffoExample.Nbn.Ntd.build, 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.

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

Runs authorization checks for DiffoExample.Nbn.Uni.build

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.

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

Runs authorization checks for DiffoExample.Nbn.Uni.build, 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.

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

Runs authorization checks for DiffoExample.Nbn.Rsp.build

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.

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

Runs authorization checks for DiffoExample.Nbn.Rsp.build, 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.

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

Runs authorization checks for DiffoExample.Nbn.Rsp.deactivate

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.

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

Runs authorization checks for DiffoExample.Nbn.Rsp.deactivate, 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.

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

Runs authorization checks for DiffoExample.Nbn.Avc.define

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.

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

Runs authorization checks for DiffoExample.Nbn.Avc.define, 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.

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

Runs authorization checks for DiffoExample.Nbn.Cvc.define

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.

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

Runs authorization checks for DiffoExample.Nbn.Cvc.define, 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.

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

Runs authorization checks for DiffoExample.Nbn.NbnEthernet.define

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.

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

Runs authorization checks for DiffoExample.Nbn.NbnEthernet.define, 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.

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

Runs authorization checks for DiffoExample.Nbn.Nni.define

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.

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

Runs authorization checks for DiffoExample.Nbn.Nni.define, 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.

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

Runs authorization checks for DiffoExample.Nbn.NniGroup.define

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.

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

Runs authorization checks for DiffoExample.Nbn.NniGroup.define, 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.

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

Runs authorization checks for DiffoExample.Nbn.Ntd.define

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.

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

Runs authorization checks for DiffoExample.Nbn.Ntd.define, 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.

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

Runs authorization checks for DiffoExample.Nbn.Uni.define

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.

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

Runs authorization checks for DiffoExample.Nbn.Uni.define, 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.

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

Runs authorization checks for DiffoExample.Nbn.Avc.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.

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

Runs authorization checks for DiffoExample.Nbn.Avc.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.

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

Runs authorization checks for DiffoExample.Nbn.Cvc.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.

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

Runs authorization checks for DiffoExample.Nbn.Cvc.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.

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

Runs authorization checks for DiffoExample.Nbn.NbnEthernet.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.

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

Runs authorization checks for DiffoExample.Nbn.NbnEthernet.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.

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

Runs authorization checks for DiffoExample.Nbn.Nni.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.

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

Runs authorization checks for DiffoExample.Nbn.Nni.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.

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

Runs authorization checks for DiffoExample.Nbn.NniGroup.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.

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

Runs authorization checks for DiffoExample.Nbn.NniGroup.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.

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

Runs authorization checks for DiffoExample.Nbn.Ntd.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.

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

Runs authorization checks for DiffoExample.Nbn.Ntd.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.

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

Runs authorization checks for DiffoExample.Nbn.Rsp.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.

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

Runs authorization checks for DiffoExample.Nbn.Rsp.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.

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

Runs authorization checks for DiffoExample.Nbn.Rsp.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.

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

Runs authorization checks for DiffoExample.Nbn.Rsp.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.

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

Runs authorization checks for DiffoExample.Nbn.Uni.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.

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

Runs authorization checks for DiffoExample.Nbn.Uni.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.

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

Runs authorization checks for DiffoExample.Nbn.Rsp.inventory

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.

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

Runs authorization checks for DiffoExample.Nbn.Rsp.inventory, 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.

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

Runs authorization checks for DiffoExample.Nbn.Avc.mine

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.

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

Runs authorization checks for DiffoExample.Nbn.Avc.mine, 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.

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

Runs authorization checks for DiffoExample.Nbn.Cvc.mine

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.

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

Runs authorization checks for DiffoExample.Nbn.Cvc.mine, 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.

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

Runs authorization checks for DiffoExample.Nbn.NbnEthernet.mine

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.

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

Runs authorization checks for DiffoExample.Nbn.NbnEthernet.mine, 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.

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

Runs authorization checks for DiffoExample.Nbn.Uni.mine

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.

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

Runs authorization checks for DiffoExample.Nbn.Uni.mine, 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.

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

Runs authorization checks for DiffoExample.Nbn.Avc.relate

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.

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

Runs authorization checks for DiffoExample.Nbn.Avc.relate, 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.

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

Runs authorization checks for DiffoExample.Nbn.Cvc.relate

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.

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

Runs authorization checks for DiffoExample.Nbn.Cvc.relate, 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.

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

Runs authorization checks for DiffoExample.Nbn.NbnEthernet.relate

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.

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

Runs authorization checks for DiffoExample.Nbn.NbnEthernet.relate, 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.

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

Runs authorization checks for DiffoExample.Nbn.Nni.relate

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.

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

Runs authorization checks for DiffoExample.Nbn.Nni.relate, 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.

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

Runs authorization checks for DiffoExample.Nbn.NniGroup.relate

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.

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

Runs authorization checks for DiffoExample.Nbn.NniGroup.relate, 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.

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

Runs authorization checks for DiffoExample.Nbn.Ntd.relate

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.

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

Runs authorization checks for DiffoExample.Nbn.Ntd.relate, 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.

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

Runs authorization checks for DiffoExample.Nbn.Uni.relate

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.

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

Runs authorization checks for DiffoExample.Nbn.Uni.relate, 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.

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

Runs authorization checks for DiffoExample.Nbn.Rsp.suspend

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.

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

Runs authorization checks for DiffoExample.Nbn.Rsp.suspend, 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.

changeset_to_activate_rsp(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_assign_cvlan(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_assign_port(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_assign_svlan(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_build_avc(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_build_cvc(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_build_nbn_ethernet(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_build_nni(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_build_nni_group(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_build_ntd(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_build_uni(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_rsp(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_deactivate_rsp(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_define_avc(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_define_cvc(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_define_nbn_ethernet(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_define_nni(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_define_nni_group(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_define_ntd(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_define_uni(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_mine_avc(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_mine_cvc(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_mine_nbn_ethernet(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_mine_uni(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_avc(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_cvc(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_nbn_ethernet(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_nni(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_nni_group(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_ntd(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_uni(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_suspend_rsp(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_rsp(params \\ nil, opts \\ nil)

Calls the build action on DiffoExample.Nbn.Rsp.

Inputs

  • id - the id of this party, domain-assigned or a generated uuid4 by default
  • name - the name of this party
  • short_name - atom identifier used as the actor for authorisation

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_rsp!(params \\ nil, opts \\ nil)

Calls the build action on DiffoExample.Nbn.Rsp.

Raises any errors instead of returning them

Inputs

  • id - the id of this party, domain-assigned or a generated uuid4 by default
  • name - the name of this party
  • short_name - atom identifier used as the actor for authorisation

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_rsp(record, params \\ nil, opts \\ nil)

Calls the deactivate action on DiffoExample.Nbn.Rsp.

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 %{}.

deactivate_rsp!(record, params \\ nil, opts \\ nil)

Calls the deactivate action on DiffoExample.Nbn.Rsp.

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 %{}.

default_short_name()

define_avc(record, params \\ nil, opts \\ nil)

defines the AVC

Inputs

  • characteristic_value_updates

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 %{}.

define_avc!(record, params \\ nil, opts \\ nil)

defines the AVC

Raises any errors instead of returning them

Inputs

  • characteristic_value_updates

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 %{}.

define_cvc(record, params \\ nil, opts \\ nil)

defines the CVC

Inputs

  • characteristic_value_updates

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 %{}.

define_cvc!(record, params \\ nil, opts \\ nil)

defines the CVC

Raises any errors instead of returning them

Inputs

  • characteristic_value_updates

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 %{}.

define_nbn_ethernet(record, params \\ nil, opts \\ nil)

defines the NBN Ethernet access

Inputs

  • characteristic_value_updates

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 %{}.

define_nbn_ethernet!(record, params \\ nil, opts \\ nil)

defines the NBN Ethernet access

Raises any errors instead of returning them

Inputs

  • characteristic_value_updates

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 %{}.

define_nni(record, params \\ nil, opts \\ nil)

defines the NNI

Inputs

  • characteristic_value_updates

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 %{}.

define_nni!(record, params \\ nil, opts \\ nil)

defines the NNI

Raises any errors instead of returning them

Inputs

  • characteristic_value_updates

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 %{}.

define_nni_group(record, params \\ nil, opts \\ nil)

defines the NNI Group

Inputs

  • characteristic_value_updates

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 %{}.

define_nni_group!(record, params \\ nil, opts \\ nil)

defines the NNI Group

Raises any errors instead of returning them

Inputs

  • characteristic_value_updates

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 %{}.

define_ntd(record, params \\ nil, opts \\ nil)

defines the NTD

Inputs

  • characteristic_value_updates

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 %{}.

define_ntd!(record, params \\ nil, opts \\ nil)

defines the NTD

Raises any errors instead of returning them

Inputs

  • characteristic_value_updates

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 %{}.

define_uni(record, params \\ nil, opts \\ nil)

defines the UNI

Inputs

  • characteristic_value_updates

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 %{}.

define_uni!(record, params \\ nil, opts \\ nil)

defines the UNI

Raises any errors instead of returning them

Inputs

  • characteristic_value_updates

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.

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_avc_by_id(id, params \\ nil, opts \\ nil)

read a service or resource instance

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_avc_by_id!(id, params \\ nil, opts \\ nil)

read a service or resource instance

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_cvc_by_id(id, params \\ nil, opts \\ nil)

read a service or resource instance

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_cvc_by_id!(id, params \\ nil, opts \\ nil)

read a service or resource instance

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_nbn_ethernet_by_id(id, params \\ nil, opts \\ nil)

read a service or resource instance

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_nbn_ethernet_by_id!(id, params \\ nil, opts \\ nil)

read a service or resource instance

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_nni_by_id(id, params \\ nil, opts \\ nil)

read a service or resource instance

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_nni_by_id!(id, params \\ nil, opts \\ nil)

read a service or resource instance

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_nni_group_by_id(id, params \\ nil, opts \\ nil)

read a service or resource instance

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_nni_group_by_id!(id, params \\ nil, opts \\ nil)

read a service or resource instance

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_ntd_by_id(id, params \\ nil, opts \\ nil)

read a service or resource instance

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_ntd_by_id!(id, params \\ nil, opts \\ nil)

read a service or resource instance

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_rsp_by_epid(id, params \\ nil, opts \\ nil)

Calls the read action on DiffoExample.Nbn.Rsp.

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_rsp_by_epid!(id, params \\ nil, opts \\ nil)

Calls the read action on DiffoExample.Nbn.Rsp.

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_rsp_by_short_name(short_name, params \\ nil, opts \\ nil)

Calls the read action on DiffoExample.Nbn.Rsp.

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_rsp_by_short_name!(short_name, params \\ nil, opts \\ nil)

Calls the read action on DiffoExample.Nbn.Rsp.

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_uni_by_id(id, params \\ nil, opts \\ nil)

read a service or resource instance

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_uni_by_id!(id, params \\ nil, opts \\ nil)

read a service or resource instance

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.

json_api_match_route(arg1, arg2)

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_rsps(params \\ nil, opts \\ nil)

Calls the inventory action on DiffoExample.Nbn.Rsp.

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_rsps!(params \\ nil, opts \\ nil)

Calls the inventory action on DiffoExample.Nbn.Rsp.

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.

mine_avc(record, params \\ nil, opts \\ nil)

updates the AVC with data mined from related instances

Inputs

  • characteristic_value_updates

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 %{}.

mine_avc!(record, params \\ nil, opts \\ nil)

updates the AVC with data mined from related instances

Raises any errors instead of returning them

Inputs

  • characteristic_value_updates

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 %{}.

mine_cvc(record, params \\ nil, opts \\ nil)

updates the CVC with data mined from related instances

Inputs

  • characteristic_value_updates

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 %{}.

mine_cvc!(record, params \\ nil, opts \\ nil)

updates the CVC with data mined from related instances

Raises any errors instead of returning them

Inputs

  • characteristic_value_updates

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 %{}.

mine_nbn_ethernet(record, params \\ nil, opts \\ nil)

updates the NBN Ethernet access with data mined from related instances

Inputs

  • characteristic_value_updates

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 %{}.

mine_nbn_ethernet!(record, params \\ nil, opts \\ nil)

updates the NBN Ethernet access with data mined from related instances

Raises any errors instead of returning them

Inputs

  • characteristic_value_updates

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 %{}.

mine_uni(record, params \\ nil, opts \\ nil)

updates the UNI with data mined from related instances

Inputs

  • characteristic_value_updates

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 %{}.

mine_uni!(record, params \\ nil, opts \\ nil)

updates the UNI with data mined from related instances

Raises any errors instead of returning them

Inputs

  • characteristic_value_updates

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_get_avc_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_cvc_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_nbn_ethernet_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_nni_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_nni_group_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_ntd_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_rsp_by_epid(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_rsp_by_short_name(short_name, 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_uni_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_rsps(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_avc(record, params \\ nil, opts \\ nil)

relates the AVC with other instances

Inputs

  • relationships

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_avc!(record, params \\ nil, opts \\ nil)

relates the AVC with other instances

Raises any errors instead of returning them

Inputs

  • relationships

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_cvc(record, params \\ nil, opts \\ nil)

relates the CVC with other instances (e.g. AVC aggregation, NNI Group termination)

Inputs

  • relationships

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_cvc!(record, params \\ nil, opts \\ nil)

relates the CVC with other instances (e.g. AVC aggregation, NNI Group termination)

Raises any errors instead of returning them

Inputs

  • relationships

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_nbn_ethernet(record, params \\ nil, opts \\ nil)

relates the NBN Ethernet access with other instances (e.g. UNI)

Inputs

  • relationships

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_nbn_ethernet!(record, params \\ nil, opts \\ nil)

relates the NBN Ethernet access with other instances (e.g. UNI)

Raises any errors instead of returning them

Inputs

  • relationships

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_nni(record, params \\ nil, opts \\ nil)

relates the NNI with other instances (e.g. its parent NNI Group)

Inputs

  • relationships

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_nni!(record, params \\ nil, opts \\ nil)

relates the NNI with other instances (e.g. its parent NNI Group)

Raises any errors instead of returning them

Inputs

  • relationships

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_nni_group(record, params \\ nil, opts \\ nil)

relates the NNI Group with other instances (e.g. NNI resources it comprises)

Inputs

  • relationships

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_nni_group!(record, params \\ nil, opts \\ nil)

relates the NNI Group with other instances (e.g. NNI resources it comprises)

Raises any errors instead of returning them

Inputs

  • relationships

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_ntd(record, params \\ nil, opts \\ nil)

relates the NTD with other instances (e.g. UNI)

Inputs

  • relationships

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_ntd!(record, params \\ nil, opts \\ nil)

relates the NTD with other instances (e.g. UNI)

Raises any errors instead of returning them

Inputs

  • relationships

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_uni(record, params \\ nil, opts \\ nil)

relates the UNI with other instances (e.g. NTD, NBN Ethernet access)

Inputs

  • relationships

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_uni!(record, params \\ nil, opts \\ nil)

relates the UNI with other instances (e.g. NTD, NBN Ethernet access)

Raises any errors instead of returning them

Inputs

  • relationships

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.

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.

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_rsp(record, params \\ nil, opts \\ nil)

Calls the suspend action on DiffoExample.Nbn.Rsp.

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 %{}.

suspend_rsp!(record, params \\ nil, opts \\ nil)

Calls the suspend action on DiffoExample.Nbn.Rsp.

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 %{}.

update(changeset, opts \\ [])

This function is deprecated. Use `Ash.update/2` instead.

update!(changeset, opts \\ [])

This function is deprecated. Use `Ash.update!/2` instead.