The migration extension's Ash domain. The extension moves a site from another CMS into a Mishka CMS site. No source ships yet: WordPress is planned as the first, and Joomla and others come later as plugins that reuse the same mapping, dry run, import job and report.
MishkaCmsMigration.MigrationRun— one move: its source, its choices, its life and its report.MishkaCmsMigration.MigrationItem— what the last dry run would do with each item of a source and what the last import wrote for it, so a re-run updates instead of duplicating and keeps what an admin changed in the CMS.MishkaCmsMigration.MigrationLog— a run's log: each step of its life, which the Migration page's Logs and the core's activity log show (MishkaCmsMigration.Activity).
A source is a plugin behind MishkaCmsMigration.Source, each kind of item is written through an
existing CMS action by a MishkaCmsMigration.Target, the jobs are the run's AshOban triggers
(MishkaCmsMigration.Workers), and an import fires the events of MishkaCmsMigration.Events.
Installing the extension on a site creates the permission names its runs are gated by
(MishkaCmsMigration.Provision).
Usage
"wordpress" below stands for an installed source: until a source with that id is installed,
create_run refuses the run (MishkaCmsMigration.Source.fetch/1).
{:ok, run} =
MishkaCmsMigration.create_run(
%{source: "wordpress", source_host: "example.com",
connection: %{"url" => "https://example.com", "user" => "admin"},
options: %{pages: "draft"}, secret: "abcd efgh ijkl"},
actor: admin, tenant: site.id
)
{:ok, run} = MishkaCmsMigration.start_dry_run(run, actor: admin, tenant: site.id)
{:ok, run} = MishkaCmsMigration.start_import(run, actor: admin, tenant: site.id)Once the run is no longer running, some of its items alone, by the ids of their
MishkaCmsMigration.MigrationItems:
{:ok, run} = MishkaCmsMigration.import_items(run, [item.id], actor: admin, tenant: site.id)
Summary
Functions
Brings a left out item back into the next dry run and import
Brings a left out item back into the next dry run and import
Runs authorization checks for MishkaCmsMigration.MigrationItem.bring_back
Runs authorization checks for MishkaCmsMigration.MigrationItem.bring_back, returning a boolean.
Runs authorization checks for MishkaCmsMigration.MigrationRun.cancel
Runs authorization checks for MishkaCmsMigration.MigrationRun.cancel, returning a boolean.
Runs authorization checks for MishkaCmsMigration.MigrationRun.create
Runs authorization checks for MishkaCmsMigration.MigrationRun.create, returning a boolean.
Runs authorization checks for MishkaCmsMigration.MigrationItem.choose
Runs authorization checks for MishkaCmsMigration.MigrationItem.choose, returning a boolean.
Runs authorization checks for MishkaCmsMigration.MigrationItem.decide
Runs authorization checks for MishkaCmsMigration.MigrationItem.decide, returning a boolean.
Runs authorization checks for MishkaCmsMigration.MigrationRun.dry_run_items
Runs authorization checks for MishkaCmsMigration.MigrationRun.dry_run_items, returning a boolean.
Runs authorization checks for MishkaCmsMigration.MigrationRun.fail
Runs authorization checks for MishkaCmsMigration.MigrationRun.fail, returning a boolean.
Runs authorization checks for MishkaCmsMigration.MigrationRun.finish_dry_run
Runs authorization checks for MishkaCmsMigration.MigrationRun.finish_dry_run, returning a boolean.
Runs authorization checks for MishkaCmsMigration.MigrationRun.finish_import
Runs authorization checks for MishkaCmsMigration.MigrationRun.finish_import, returning a boolean.
Runs authorization checks for MishkaCmsMigration.MigrationRun.finish_items
Runs authorization checks for MishkaCmsMigration.MigrationRun.finish_items, returning a boolean.
Runs authorization checks for MishkaCmsMigration.MigrationItem.forget_deleted_decision
Runs authorization checks for MishkaCmsMigration.MigrationItem.forget_deleted_decision, returning a boolean.
Runs authorization checks for MishkaCmsMigration.MigrationRun.read
Runs authorization checks for MishkaCmsMigration.MigrationRun.read, returning a boolean.
Runs authorization checks for MishkaCmsMigration.MigrationRun.import_items
Runs authorization checks for MishkaCmsMigration.MigrationRun.import_items, returning a boolean.
Runs authorization checks for MishkaCmsMigration.MigrationItem.by_file_hash
Runs authorization checks for MishkaCmsMigration.MigrationItem.by_file_hash, returning a boolean.
Runs authorization checks for MishkaCmsMigration.MigrationItem.by_sources
Runs authorization checks for MishkaCmsMigration.MigrationItem.by_sources, returning a boolean.
Runs authorization checks for MishkaCmsMigration.MigrationItem.waiting_for_decision
Runs authorization checks for MishkaCmsMigration.MigrationItem.waiting_for_decision, returning a boolean.
Runs authorization checks for MishkaCmsMigration.MigrationItem.leave_out
Runs authorization checks for MishkaCmsMigration.MigrationItem.leave_out, returning a boolean.
Runs authorization checks for MishkaCmsMigration.MigrationItem.left_out_by_slugs
Runs authorization checks for MishkaCmsMigration.MigrationItem.left_out_by_slugs, returning a boolean.
Runs authorization checks for MishkaCmsMigration.MigrationItem.choose
Runs authorization checks for MishkaCmsMigration.MigrationItem.choose, returning a boolean.
Runs authorization checks for MishkaCmsMigration.MigrationItem.record
Runs authorization checks for MishkaCmsMigration.MigrationItem.record, returning a boolean.
Runs authorization checks for MishkaCmsMigration.MigrationItem.record_outcome
Runs authorization checks for MishkaCmsMigration.MigrationItem.record_outcome, returning a boolean.
Runs authorization checks for MishkaCmsMigration.MigrationItem.record_plan
Runs authorization checks for MishkaCmsMigration.MigrationItem.record_plan, returning a boolean.
Runs authorization checks for MishkaCmsMigration.MigrationLog.record
Runs authorization checks for MishkaCmsMigration.MigrationLog.record, returning a boolean.
Runs authorization checks for MishkaCmsMigration.MigrationRun.record_progress
Runs authorization checks for MishkaCmsMigration.MigrationRun.record_progress, returning a boolean.
Runs authorization checks for MishkaCmsMigration.MigrationRun.start_dry_run
Runs authorization checks for MishkaCmsMigration.MigrationRun.start_dry_run, returning a boolean.
Runs authorization checks for MishkaCmsMigration.MigrationRun.start_import
Runs authorization checks for MishkaCmsMigration.MigrationRun.start_import, returning a boolean.
Ends a run: its job is cancelled, its secret and file cleared, and it cannot run again
Ends a run: its job is cancelled, its secret and file cleared, and it cannot run again
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.
Creates a run on the tenant's site, started by the actor, once its source answers
Creates a run on the tenant's site, started by the actor, once its source answers
Maps the item to a record the CMS holds or back (nil), or decides its conflict
Maps the item to a record the CMS holds or back (nil), or decides its conflict
Answers one conflict with one choice on every item that waits for it, in one update
Answers one conflict with one choice on every item that waits for it, in one update
Queues a dry run of the picked items alone, which puts the run back where it was
Queues a dry run of the picked items alone, which puts the run back where it was
System-internal: saves why a dry run or an import could not go on
System-internal: saves why a dry run or an import could not go on
System-internal: saves the dry run's report
System-internal: saves the dry run's report
System-internal: saves the import's report
System-internal: saves the import's report
System-internal: saves the report a job of picked items merged and puts the run back
System-internal: saves the report a job of picked items merged and puts the run back
System-internal: forgets the decision on a deleted CMS record once the item has a record again
System-internal: forgets the decision on a deleted CMS record once the item has a record again
A site's runs
A site's runs
Queues the import of the picked items alone, which puts the run back where it was
Queues the import of the picked items alone, which puts the run back where it was
The earliest item of the site whose file has these bytes (a SHA-256), if any
The earliest item of the site whose file has these bytes (a SHA-256), if any
The items of a source host and kind with any of the given source ids
The items of a source host and kind with any of the given source ids
The items of a source host that wait for a decision no admin has made
The items of a source host that wait for a decision no admin has made
Leaves the item out of every later dry run and import, keeping its CMS record
Leaves the item out of every later dry run and import, keeping its CMS record
The items of a source host and kind an admin left out, with any of the given slugs
The items of a source host and kind an admin left out, with any of the given slugs
Maps the item to a record the CMS holds or back (nil), or decides its conflict
Maps the item to a record the CMS holds or back (nil), or decides its conflict
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.
System-internal: an item whose CMS record an import wrote
System-internal: an item whose CMS record an import wrote
System-internal: an item an import skipped or failed, keeping what was last written
System-internal: an item an import skipped or failed, keeping what was last written
System-internal: what a dry run would do with an item, keeping what imports recorded
System-internal: what a dry run would do with an item, keeping what imports recorded
System-internal: one step of a run, once it is saved
System-internal: one step of a run, once it is saved
System-internal: how far the running job is, saved after each page it walks
System-internal: how far the running job is, saved after each page it walks
Queues a dry run, a first one or Run again: what an import would create, update and skip, writing nothing
Queues a dry run, a first one or Run again: what an import would create, update and skip, writing nothing
Queues the import of a run whose dry run has reported
Queues the import of a run whose dry run has reported
Functions
Brings a left out item back into the next dry run and import
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 istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor 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, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis 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 istrue.: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:strict?(boolean/0) - If set to true, only the fields listed for a relationship inloadare loaded on it, as with thestrict?option toAsh.load/3. The default value isfalse.:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for 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:streamstrategy is chosen. See theAsh.stream!/2docs 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 istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs 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 toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true)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 isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif 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 wherereturn_records?: truewas provided. The default value isfalse.: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 isfalse.: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, orfalseif not set. Returning all errors may be expensive for large inserts. The default value istrue.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned.Potential elements:
{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{: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 totrueand all otherreturn_*?options are set tofalse.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 istrue.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen 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 totrue.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_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :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 is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Brings a left out item back into the next dry run and import
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 istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor 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, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis 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 istrue.: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:strict?(boolean/0) - If set to true, only the fields listed for a relationship inloadare loaded on it, as with thestrict?option toAsh.load/3. The default value isfalse.:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for 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:streamstrategy is chosen. See theAsh.stream!/2docs 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 istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs 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 toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true)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 isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif 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 wherereturn_records?: truewas provided. The default value isfalse.: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 isfalse.: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, orfalseif not set. Returning all errors may be expensive for large inserts. The default value istrue.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned.Potential elements:
{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{: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 totrueand all otherreturn_*?options are set tofalse.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 istrue.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen 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 totrue.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_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :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 is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
@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()}
@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()
Runs authorization checks for MishkaCmsMigration.MigrationItem.bring_back
Accepts an actor or a scope as the first argument.
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) The default value is `false`.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument tocan/3. SeeAsh.Scopefor more.:context(map/0) - Context to set on the query/changeset/action_input being authorized:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:as_of- A point in time to authorize "as of" (time travel). SeeAsh.Query.as_of/2.:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.:log_policy_breakdown?(boolean/0) - If set tofalse, suppresses policy breakdown logs, overriding the globalshow_policy_breakdowns?configuration.:short_circuit?(boolean/0) - Forcan_do_all/3andcan_do_all?/3, whether to stop checking after the first failing check. Defaults tofalseforcan_do_all/3andtrueforcan_do_all?/3. The default value isfalse.
Runs authorization checks for MishkaCmsMigration.MigrationItem.bring_back, returning a boolean.
Accepts an actor or a scope as the first argument.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) The default value is `false`.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument tocan/3. SeeAsh.Scopefor more.:context(map/0) - Context to set on the query/changeset/action_input being authorized:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:as_of- A point in time to authorize "as of" (time travel). SeeAsh.Query.as_of/2.:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.:log_policy_breakdown?(boolean/0) - If set tofalse, suppresses policy breakdown logs, overriding the globalshow_policy_breakdowns?configuration.:short_circuit?(boolean/0) - Forcan_do_all/3andcan_do_all?/3, whether to stop checking after the first failing check. Defaults tofalseforcan_do_all/3andtrueforcan_do_all?/3. The default value isfalse.
Runs authorization checks for MishkaCmsMigration.MigrationRun.cancel
Accepts an actor or a scope as the first argument.
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) The default value is `false`.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument tocan/3. SeeAsh.Scopefor more.:context(map/0) - Context to set on the query/changeset/action_input being authorized:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:as_of- A point in time to authorize "as of" (time travel). SeeAsh.Query.as_of/2.:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.:log_policy_breakdown?(boolean/0) - If set tofalse, suppresses policy breakdown logs, overriding the globalshow_policy_breakdowns?configuration.:short_circuit?(boolean/0) - Forcan_do_all/3andcan_do_all?/3, whether to stop checking after the first failing check. Defaults tofalseforcan_do_all/3andtrueforcan_do_all?/3. The default value isfalse.
Runs authorization checks for MishkaCmsMigration.MigrationRun.cancel, returning a boolean.
Accepts an actor or a scope as the first argument.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) The default value is `false`.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument tocan/3. SeeAsh.Scopefor more.:context(map/0) - Context to set on the query/changeset/action_input being authorized:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:as_of- A point in time to authorize "as of" (time travel). SeeAsh.Query.as_of/2.:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.:log_policy_breakdown?(boolean/0) - If set tofalse, suppresses policy breakdown logs, overriding the globalshow_policy_breakdowns?configuration.:short_circuit?(boolean/0) - Forcan_do_all/3andcan_do_all?/3, whether to stop checking after the first failing check. Defaults tofalseforcan_do_all/3andtrueforcan_do_all?/3. The default value isfalse.
Runs authorization checks for MishkaCmsMigration.MigrationRun.create
Accepts an actor or a scope as the first argument.
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) The default value is `false`.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument tocan/3. SeeAsh.Scopefor more.:context(map/0) - Context to set on the query/changeset/action_input being authorized:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:as_of- A point in time to authorize "as of" (time travel). SeeAsh.Query.as_of/2.:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.:log_policy_breakdown?(boolean/0) - If set tofalse, suppresses policy breakdown logs, overriding the globalshow_policy_breakdowns?configuration.:short_circuit?(boolean/0) - Forcan_do_all/3andcan_do_all?/3, whether to stop checking after the first failing check. Defaults tofalseforcan_do_all/3andtrueforcan_do_all?/3. The default value isfalse.
Runs authorization checks for MishkaCmsMigration.MigrationRun.create, returning a boolean.
Accepts an actor or a scope as the first argument.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) The default value is `false`.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument tocan/3. SeeAsh.Scopefor more.:context(map/0) - Context to set on the query/changeset/action_input being authorized:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:as_of- A point in time to authorize "as of" (time travel). SeeAsh.Query.as_of/2.:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.:log_policy_breakdown?(boolean/0) - If set tofalse, suppresses policy breakdown logs, overriding the globalshow_policy_breakdowns?configuration.:short_circuit?(boolean/0) - Forcan_do_all/3andcan_do_all?/3, whether to stop checking after the first failing check. Defaults tofalseforcan_do_all/3andtrueforcan_do_all?/3. The default value isfalse.
Runs authorization checks for MishkaCmsMigration.MigrationItem.choose
Accepts an actor or a scope as the first argument.
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) The default value is `false`.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument tocan/3. SeeAsh.Scopefor more.:context(map/0) - Context to set on the query/changeset/action_input being authorized:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:as_of- A point in time to authorize "as of" (time travel). SeeAsh.Query.as_of/2.:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.:log_policy_breakdown?(boolean/0) - If set tofalse, suppresses policy breakdown logs, overriding the globalshow_policy_breakdowns?configuration.:short_circuit?(boolean/0) - Forcan_do_all/3andcan_do_all?/3, whether to stop checking after the first failing check. Defaults tofalseforcan_do_all/3andtrueforcan_do_all?/3. The default value isfalse.
Runs authorization checks for MishkaCmsMigration.MigrationItem.choose, returning a boolean.
Accepts an actor or a scope as the first argument.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) The default value is `false`.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument tocan/3. SeeAsh.Scopefor more.:context(map/0) - Context to set on the query/changeset/action_input being authorized:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:as_of- A point in time to authorize "as of" (time travel). SeeAsh.Query.as_of/2.:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.:log_policy_breakdown?(boolean/0) - If set tofalse, suppresses policy breakdown logs, overriding the globalshow_policy_breakdowns?configuration.:short_circuit?(boolean/0) - Forcan_do_all/3andcan_do_all?/3, whether to stop checking after the first failing check. Defaults tofalseforcan_do_all/3andtrueforcan_do_all?/3. The default value isfalse.
Runs authorization checks for MishkaCmsMigration.MigrationItem.decide
Accepts an actor or a scope as the first argument.
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) The default value is `false`.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument tocan/3. SeeAsh.Scopefor more.:context(map/0) - Context to set on the query/changeset/action_input being authorized:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:as_of- A point in time to authorize "as of" (time travel). SeeAsh.Query.as_of/2.:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.:log_policy_breakdown?(boolean/0) - If set tofalse, suppresses policy breakdown logs, overriding the globalshow_policy_breakdowns?configuration.:short_circuit?(boolean/0) - Forcan_do_all/3andcan_do_all?/3, whether to stop checking after the first failing check. Defaults tofalseforcan_do_all/3andtrueforcan_do_all?/3. The default value isfalse.
Runs authorization checks for MishkaCmsMigration.MigrationItem.decide, returning a boolean.
Accepts an actor or a scope as the first argument.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) The default value is `false`.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument tocan/3. SeeAsh.Scopefor more.:context(map/0) - Context to set on the query/changeset/action_input being authorized:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:as_of- A point in time to authorize "as of" (time travel). SeeAsh.Query.as_of/2.:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.:log_policy_breakdown?(boolean/0) - If set tofalse, suppresses policy breakdown logs, overriding the globalshow_policy_breakdowns?configuration.:short_circuit?(boolean/0) - Forcan_do_all/3andcan_do_all?/3, whether to stop checking after the first failing check. Defaults tofalseforcan_do_all/3andtrueforcan_do_all?/3. The default value isfalse.
Runs authorization checks for MishkaCmsMigration.MigrationRun.dry_run_items
Accepts an actor or a scope as the first argument.
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) The default value is `false`.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument tocan/3. SeeAsh.Scopefor more.:context(map/0) - Context to set on the query/changeset/action_input being authorized:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:as_of- A point in time to authorize "as of" (time travel). SeeAsh.Query.as_of/2.:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.:log_policy_breakdown?(boolean/0) - If set tofalse, suppresses policy breakdown logs, overriding the globalshow_policy_breakdowns?configuration.:short_circuit?(boolean/0) - Forcan_do_all/3andcan_do_all?/3, whether to stop checking after the first failing check. Defaults tofalseforcan_do_all/3andtrueforcan_do_all?/3. The default value isfalse.
Runs authorization checks for MishkaCmsMigration.MigrationRun.dry_run_items, returning a boolean.
Accepts an actor or a scope as the first argument.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) The default value is `false`.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument tocan/3. SeeAsh.Scopefor more.:context(map/0) - Context to set on the query/changeset/action_input being authorized:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:as_of- A point in time to authorize "as of" (time travel). SeeAsh.Query.as_of/2.:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.:log_policy_breakdown?(boolean/0) - If set tofalse, suppresses policy breakdown logs, overriding the globalshow_policy_breakdowns?configuration.:short_circuit?(boolean/0) - Forcan_do_all/3andcan_do_all?/3, whether to stop checking after the first failing check. Defaults tofalseforcan_do_all/3andtrueforcan_do_all?/3. The default value isfalse.
Runs authorization checks for MishkaCmsMigration.MigrationRun.fail
Accepts an actor or a scope as the first argument.
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) The default value is `false`.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument tocan/3. SeeAsh.Scopefor more.:context(map/0) - Context to set on the query/changeset/action_input being authorized:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:as_of- A point in time to authorize "as of" (time travel). SeeAsh.Query.as_of/2.:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.:log_policy_breakdown?(boolean/0) - If set tofalse, suppresses policy breakdown logs, overriding the globalshow_policy_breakdowns?configuration.:short_circuit?(boolean/0) - Forcan_do_all/3andcan_do_all?/3, whether to stop checking after the first failing check. Defaults tofalseforcan_do_all/3andtrueforcan_do_all?/3. The default value isfalse.
Runs authorization checks for MishkaCmsMigration.MigrationRun.fail, returning a boolean.
Accepts an actor or a scope as the first argument.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) The default value is `false`.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument tocan/3. SeeAsh.Scopefor more.:context(map/0) - Context to set on the query/changeset/action_input being authorized:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:as_of- A point in time to authorize "as of" (time travel). SeeAsh.Query.as_of/2.:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.:log_policy_breakdown?(boolean/0) - If set tofalse, suppresses policy breakdown logs, overriding the globalshow_policy_breakdowns?configuration.:short_circuit?(boolean/0) - Forcan_do_all/3andcan_do_all?/3, whether to stop checking after the first failing check. Defaults tofalseforcan_do_all/3andtrueforcan_do_all?/3. The default value isfalse.
Runs authorization checks for MishkaCmsMigration.MigrationRun.finish_dry_run
Accepts an actor or a scope as the first argument.
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) The default value is `false`.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument tocan/3. SeeAsh.Scopefor more.:context(map/0) - Context to set on the query/changeset/action_input being authorized:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:as_of- A point in time to authorize "as of" (time travel). SeeAsh.Query.as_of/2.:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.:log_policy_breakdown?(boolean/0) - If set tofalse, suppresses policy breakdown logs, overriding the globalshow_policy_breakdowns?configuration.:short_circuit?(boolean/0) - Forcan_do_all/3andcan_do_all?/3, whether to stop checking after the first failing check. Defaults tofalseforcan_do_all/3andtrueforcan_do_all?/3. The default value isfalse.
Runs authorization checks for MishkaCmsMigration.MigrationRun.finish_dry_run, returning a boolean.
Accepts an actor or a scope as the first argument.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) The default value is `false`.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument tocan/3. SeeAsh.Scopefor more.:context(map/0) - Context to set on the query/changeset/action_input being authorized:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:as_of- A point in time to authorize "as of" (time travel). SeeAsh.Query.as_of/2.:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.:log_policy_breakdown?(boolean/0) - If set tofalse, suppresses policy breakdown logs, overriding the globalshow_policy_breakdowns?configuration.:short_circuit?(boolean/0) - Forcan_do_all/3andcan_do_all?/3, whether to stop checking after the first failing check. Defaults tofalseforcan_do_all/3andtrueforcan_do_all?/3. The default value isfalse.
Runs authorization checks for MishkaCmsMigration.MigrationRun.finish_import
Accepts an actor or a scope as the first argument.
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) The default value is `false`.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument tocan/3. SeeAsh.Scopefor more.:context(map/0) - Context to set on the query/changeset/action_input being authorized:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:as_of- A point in time to authorize "as of" (time travel). SeeAsh.Query.as_of/2.:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.:log_policy_breakdown?(boolean/0) - If set tofalse, suppresses policy breakdown logs, overriding the globalshow_policy_breakdowns?configuration.:short_circuit?(boolean/0) - Forcan_do_all/3andcan_do_all?/3, whether to stop checking after the first failing check. Defaults tofalseforcan_do_all/3andtrueforcan_do_all?/3. The default value isfalse.
Runs authorization checks for MishkaCmsMigration.MigrationRun.finish_import, returning a boolean.
Accepts an actor or a scope as the first argument.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) The default value is `false`.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument tocan/3. SeeAsh.Scopefor more.:context(map/0) - Context to set on the query/changeset/action_input being authorized:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:as_of- A point in time to authorize "as of" (time travel). SeeAsh.Query.as_of/2.:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.:log_policy_breakdown?(boolean/0) - If set tofalse, suppresses policy breakdown logs, overriding the globalshow_policy_breakdowns?configuration.:short_circuit?(boolean/0) - Forcan_do_all/3andcan_do_all?/3, whether to stop checking after the first failing check. Defaults tofalseforcan_do_all/3andtrueforcan_do_all?/3. The default value isfalse.
Runs authorization checks for MishkaCmsMigration.MigrationRun.finish_items
Accepts an actor or a scope as the first argument.
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) The default value is `false`.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument tocan/3. SeeAsh.Scopefor more.:context(map/0) - Context to set on the query/changeset/action_input being authorized:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:as_of- A point in time to authorize "as of" (time travel). SeeAsh.Query.as_of/2.:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.:log_policy_breakdown?(boolean/0) - If set tofalse, suppresses policy breakdown logs, overriding the globalshow_policy_breakdowns?configuration.:short_circuit?(boolean/0) - Forcan_do_all/3andcan_do_all?/3, whether to stop checking after the first failing check. Defaults tofalseforcan_do_all/3andtrueforcan_do_all?/3. The default value isfalse.
Runs authorization checks for MishkaCmsMigration.MigrationRun.finish_items, returning a boolean.
Accepts an actor or a scope as the first argument.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) The default value is `false`.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument tocan/3. SeeAsh.Scopefor more.:context(map/0) - Context to set on the query/changeset/action_input being authorized:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:as_of- A point in time to authorize "as of" (time travel). SeeAsh.Query.as_of/2.:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.:log_policy_breakdown?(boolean/0) - If set tofalse, suppresses policy breakdown logs, overriding the globalshow_policy_breakdowns?configuration.:short_circuit?(boolean/0) - Forcan_do_all/3andcan_do_all?/3, whether to stop checking after the first failing check. Defaults tofalseforcan_do_all/3andtrueforcan_do_all?/3. The default value isfalse.
Runs authorization checks for MishkaCmsMigration.MigrationItem.forget_deleted_decision
Accepts an actor or a scope as the first argument.
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) The default value is `false`.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument tocan/3. SeeAsh.Scopefor more.:context(map/0) - Context to set on the query/changeset/action_input being authorized:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:as_of- A point in time to authorize "as of" (time travel). SeeAsh.Query.as_of/2.:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.:log_policy_breakdown?(boolean/0) - If set tofalse, suppresses policy breakdown logs, overriding the globalshow_policy_breakdowns?configuration.:short_circuit?(boolean/0) - Forcan_do_all/3andcan_do_all?/3, whether to stop checking after the first failing check. Defaults tofalseforcan_do_all/3andtrueforcan_do_all?/3. The default value isfalse.
Runs authorization checks for MishkaCmsMigration.MigrationItem.forget_deleted_decision, returning a boolean.
Accepts an actor or a scope as the first argument.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) The default value is `false`.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument tocan/3. SeeAsh.Scopefor more.:context(map/0) - Context to set on the query/changeset/action_input being authorized:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:as_of- A point in time to authorize "as of" (time travel). SeeAsh.Query.as_of/2.:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.:log_policy_breakdown?(boolean/0) - If set tofalse, suppresses policy breakdown logs, overriding the globalshow_policy_breakdowns?configuration.:short_circuit?(boolean/0) - Forcan_do_all/3andcan_do_all?/3, whether to stop checking after the first failing check. Defaults tofalseforcan_do_all/3andtrueforcan_do_all?/3. The default value isfalse.
Runs authorization checks for MishkaCmsMigration.MigrationRun.read
Accepts an actor or a scope as the first argument.
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) The default value is `false`.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument tocan/3. SeeAsh.Scopefor more.:context(map/0) - Context to set on the query/changeset/action_input being authorized:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:as_of- A point in time to authorize "as of" (time travel). SeeAsh.Query.as_of/2.:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.:log_policy_breakdown?(boolean/0) - If set tofalse, suppresses policy breakdown logs, overriding the globalshow_policy_breakdowns?configuration.:short_circuit?(boolean/0) - Forcan_do_all/3andcan_do_all?/3, whether to stop checking after the first failing check. Defaults tofalseforcan_do_all/3andtrueforcan_do_all?/3. The default value isfalse.
Runs authorization checks for MishkaCmsMigration.MigrationRun.read, returning a boolean.
Accepts an actor or a scope as the first argument.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) The default value is `false`.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument tocan/3. SeeAsh.Scopefor more.:context(map/0) - Context to set on the query/changeset/action_input being authorized:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:as_of- A point in time to authorize "as of" (time travel). SeeAsh.Query.as_of/2.:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.:log_policy_breakdown?(boolean/0) - If set tofalse, suppresses policy breakdown logs, overriding the globalshow_policy_breakdowns?configuration.:short_circuit?(boolean/0) - Forcan_do_all/3andcan_do_all?/3, whether to stop checking after the first failing check. Defaults tofalseforcan_do_all/3andtrueforcan_do_all?/3. The default value isfalse.
Runs authorization checks for MishkaCmsMigration.MigrationRun.import_items
Accepts an actor or a scope as the first argument.
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) The default value is `false`.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument tocan/3. SeeAsh.Scopefor more.:context(map/0) - Context to set on the query/changeset/action_input being authorized:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:as_of- A point in time to authorize "as of" (time travel). SeeAsh.Query.as_of/2.:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.:log_policy_breakdown?(boolean/0) - If set tofalse, suppresses policy breakdown logs, overriding the globalshow_policy_breakdowns?configuration.:short_circuit?(boolean/0) - Forcan_do_all/3andcan_do_all?/3, whether to stop checking after the first failing check. Defaults tofalseforcan_do_all/3andtrueforcan_do_all?/3. The default value isfalse.
Runs authorization checks for MishkaCmsMigration.MigrationRun.import_items, returning a boolean.
Accepts an actor or a scope as the first argument.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) The default value is `false`.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument tocan/3. SeeAsh.Scopefor more.:context(map/0) - Context to set on the query/changeset/action_input being authorized:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:as_of- A point in time to authorize "as of" (time travel). SeeAsh.Query.as_of/2.:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.:log_policy_breakdown?(boolean/0) - If set tofalse, suppresses policy breakdown logs, overriding the globalshow_policy_breakdowns?configuration.:short_circuit?(boolean/0) - Forcan_do_all/3andcan_do_all?/3, whether to stop checking after the first failing check. Defaults tofalseforcan_do_all/3andtrueforcan_do_all?/3. The default value isfalse.
Runs authorization checks for MishkaCmsMigration.MigrationItem.by_file_hash
Accepts an actor or a scope as the first argument.
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) The default value is `false`.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument tocan/3. SeeAsh.Scopefor more.:context(map/0) - Context to set on the query/changeset/action_input being authorized:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:as_of- A point in time to authorize "as of" (time travel). SeeAsh.Query.as_of/2.:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.:log_policy_breakdown?(boolean/0) - If set tofalse, suppresses policy breakdown logs, overriding the globalshow_policy_breakdowns?configuration.:short_circuit?(boolean/0) - Forcan_do_all/3andcan_do_all?/3, whether to stop checking after the first failing check. Defaults tofalseforcan_do_all/3andtrueforcan_do_all?/3. The default value isfalse.
Runs authorization checks for MishkaCmsMigration.MigrationItem.by_file_hash, returning a boolean.
Accepts an actor or a scope as the first argument.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) The default value is `false`.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument tocan/3. SeeAsh.Scopefor more.:context(map/0) - Context to set on the query/changeset/action_input being authorized:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:as_of- A point in time to authorize "as of" (time travel). SeeAsh.Query.as_of/2.:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.:log_policy_breakdown?(boolean/0) - If set tofalse, suppresses policy breakdown logs, overriding the globalshow_policy_breakdowns?configuration.:short_circuit?(boolean/0) - Forcan_do_all/3andcan_do_all?/3, whether to stop checking after the first failing check. Defaults tofalseforcan_do_all/3andtrueforcan_do_all?/3. The default value isfalse.
Runs authorization checks for MishkaCmsMigration.MigrationItem.by_sources
Accepts an actor or a scope as the first argument.
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) The default value is `false`.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument tocan/3. SeeAsh.Scopefor more.:context(map/0) - Context to set on the query/changeset/action_input being authorized:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:as_of- A point in time to authorize "as of" (time travel). SeeAsh.Query.as_of/2.:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.:log_policy_breakdown?(boolean/0) - If set tofalse, suppresses policy breakdown logs, overriding the globalshow_policy_breakdowns?configuration.:short_circuit?(boolean/0) - Forcan_do_all/3andcan_do_all?/3, whether to stop checking after the first failing check. Defaults tofalseforcan_do_all/3andtrueforcan_do_all?/3. The default value isfalse.
Runs authorization checks for MishkaCmsMigration.MigrationItem.by_sources, returning a boolean.
Accepts an actor or a scope as the first argument.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) The default value is `false`.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument tocan/3. SeeAsh.Scopefor more.:context(map/0) - Context to set on the query/changeset/action_input being authorized:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:as_of- A point in time to authorize "as of" (time travel). SeeAsh.Query.as_of/2.:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.:log_policy_breakdown?(boolean/0) - If set tofalse, suppresses policy breakdown logs, overriding the globalshow_policy_breakdowns?configuration.:short_circuit?(boolean/0) - Forcan_do_all/3andcan_do_all?/3, whether to stop checking after the first failing check. Defaults tofalseforcan_do_all/3andtrueforcan_do_all?/3. The default value isfalse.
Runs authorization checks for MishkaCmsMigration.MigrationItem.waiting_for_decision
Accepts an actor or a scope as the first argument.
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) The default value is `false`.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument tocan/3. SeeAsh.Scopefor more.:context(map/0) - Context to set on the query/changeset/action_input being authorized:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:as_of- A point in time to authorize "as of" (time travel). SeeAsh.Query.as_of/2.:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.:log_policy_breakdown?(boolean/0) - If set tofalse, suppresses policy breakdown logs, overriding the globalshow_policy_breakdowns?configuration.:short_circuit?(boolean/0) - Forcan_do_all/3andcan_do_all?/3, whether to stop checking after the first failing check. Defaults tofalseforcan_do_all/3andtrueforcan_do_all?/3. The default value isfalse.
Runs authorization checks for MishkaCmsMigration.MigrationItem.waiting_for_decision, returning a boolean.
Accepts an actor or a scope as the first argument.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) The default value is `false`.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument tocan/3. SeeAsh.Scopefor more.:context(map/0) - Context to set on the query/changeset/action_input being authorized:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:as_of- A point in time to authorize "as of" (time travel). SeeAsh.Query.as_of/2.:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.:log_policy_breakdown?(boolean/0) - If set tofalse, suppresses policy breakdown logs, overriding the globalshow_policy_breakdowns?configuration.:short_circuit?(boolean/0) - Forcan_do_all/3andcan_do_all?/3, whether to stop checking after the first failing check. Defaults tofalseforcan_do_all/3andtrueforcan_do_all?/3. The default value isfalse.
Runs authorization checks for MishkaCmsMigration.MigrationItem.leave_out
Accepts an actor or a scope as the first argument.
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) The default value is `false`.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument tocan/3. SeeAsh.Scopefor more.:context(map/0) - Context to set on the query/changeset/action_input being authorized:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:as_of- A point in time to authorize "as of" (time travel). SeeAsh.Query.as_of/2.:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.:log_policy_breakdown?(boolean/0) - If set tofalse, suppresses policy breakdown logs, overriding the globalshow_policy_breakdowns?configuration.:short_circuit?(boolean/0) - Forcan_do_all/3andcan_do_all?/3, whether to stop checking after the first failing check. Defaults tofalseforcan_do_all/3andtrueforcan_do_all?/3. The default value isfalse.
Runs authorization checks for MishkaCmsMigration.MigrationItem.leave_out, returning a boolean.
Accepts an actor or a scope as the first argument.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) The default value is `false`.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument tocan/3. SeeAsh.Scopefor more.:context(map/0) - Context to set on the query/changeset/action_input being authorized:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:as_of- A point in time to authorize "as of" (time travel). SeeAsh.Query.as_of/2.:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.:log_policy_breakdown?(boolean/0) - If set tofalse, suppresses policy breakdown logs, overriding the globalshow_policy_breakdowns?configuration.:short_circuit?(boolean/0) - Forcan_do_all/3andcan_do_all?/3, whether to stop checking after the first failing check. Defaults tofalseforcan_do_all/3andtrueforcan_do_all?/3. The default value isfalse.
Runs authorization checks for MishkaCmsMigration.MigrationItem.left_out_by_slugs
Accepts an actor or a scope as the first argument.
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) The default value is `false`.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument tocan/3. SeeAsh.Scopefor more.:context(map/0) - Context to set on the query/changeset/action_input being authorized:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:as_of- A point in time to authorize "as of" (time travel). SeeAsh.Query.as_of/2.:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.:log_policy_breakdown?(boolean/0) - If set tofalse, suppresses policy breakdown logs, overriding the globalshow_policy_breakdowns?configuration.:short_circuit?(boolean/0) - Forcan_do_all/3andcan_do_all?/3, whether to stop checking after the first failing check. Defaults tofalseforcan_do_all/3andtrueforcan_do_all?/3. The default value isfalse.
Runs authorization checks for MishkaCmsMigration.MigrationItem.left_out_by_slugs, returning a boolean.
Accepts an actor or a scope as the first argument.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) The default value is `false`.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument tocan/3. SeeAsh.Scopefor more.:context(map/0) - Context to set on the query/changeset/action_input being authorized:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:as_of- A point in time to authorize "as of" (time travel). SeeAsh.Query.as_of/2.:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.:log_policy_breakdown?(boolean/0) - If set tofalse, suppresses policy breakdown logs, overriding the globalshow_policy_breakdowns?configuration.:short_circuit?(boolean/0) - Forcan_do_all/3andcan_do_all?/3, whether to stop checking after the first failing check. Defaults tofalseforcan_do_all/3andtrueforcan_do_all?/3. The default value isfalse.
Runs authorization checks for MishkaCmsMigration.MigrationItem.choose
Accepts an actor or a scope as the first argument.
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) The default value is `false`.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument tocan/3. SeeAsh.Scopefor more.:context(map/0) - Context to set on the query/changeset/action_input being authorized:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:as_of- A point in time to authorize "as of" (time travel). SeeAsh.Query.as_of/2.:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.:log_policy_breakdown?(boolean/0) - If set tofalse, suppresses policy breakdown logs, overriding the globalshow_policy_breakdowns?configuration.:short_circuit?(boolean/0) - Forcan_do_all/3andcan_do_all?/3, whether to stop checking after the first failing check. Defaults tofalseforcan_do_all/3andtrueforcan_do_all?/3. The default value isfalse.
Runs authorization checks for MishkaCmsMigration.MigrationItem.choose, returning a boolean.
Accepts an actor or a scope as the first argument.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) The default value is `false`.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument tocan/3. SeeAsh.Scopefor more.:context(map/0) - Context to set on the query/changeset/action_input being authorized:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:as_of- A point in time to authorize "as of" (time travel). SeeAsh.Query.as_of/2.:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.:log_policy_breakdown?(boolean/0) - If set tofalse, suppresses policy breakdown logs, overriding the globalshow_policy_breakdowns?configuration.:short_circuit?(boolean/0) - Forcan_do_all/3andcan_do_all?/3, whether to stop checking after the first failing check. Defaults tofalseforcan_do_all/3andtrueforcan_do_all?/3. The default value isfalse.
Runs authorization checks for MishkaCmsMigration.MigrationItem.record
Accepts an actor or a scope as the first argument.
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) The default value is `false`.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument tocan/3. SeeAsh.Scopefor more.:context(map/0) - Context to set on the query/changeset/action_input being authorized:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:as_of- A point in time to authorize "as of" (time travel). SeeAsh.Query.as_of/2.:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.:log_policy_breakdown?(boolean/0) - If set tofalse, suppresses policy breakdown logs, overriding the globalshow_policy_breakdowns?configuration.:short_circuit?(boolean/0) - Forcan_do_all/3andcan_do_all?/3, whether to stop checking after the first failing check. Defaults tofalseforcan_do_all/3andtrueforcan_do_all?/3. The default value isfalse.
Runs authorization checks for MishkaCmsMigration.MigrationItem.record, returning a boolean.
Accepts an actor or a scope as the first argument.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) The default value is `false`.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument tocan/3. SeeAsh.Scopefor more.:context(map/0) - Context to set on the query/changeset/action_input being authorized:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:as_of- A point in time to authorize "as of" (time travel). SeeAsh.Query.as_of/2.:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.:log_policy_breakdown?(boolean/0) - If set tofalse, suppresses policy breakdown logs, overriding the globalshow_policy_breakdowns?configuration.:short_circuit?(boolean/0) - Forcan_do_all/3andcan_do_all?/3, whether to stop checking after the first failing check. Defaults tofalseforcan_do_all/3andtrueforcan_do_all?/3. The default value isfalse.
Runs authorization checks for MishkaCmsMigration.MigrationItem.record_outcome
Accepts an actor or a scope as the first argument.
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) The default value is `false`.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument tocan/3. SeeAsh.Scopefor more.:context(map/0) - Context to set on the query/changeset/action_input being authorized:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:as_of- A point in time to authorize "as of" (time travel). SeeAsh.Query.as_of/2.:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.:log_policy_breakdown?(boolean/0) - If set tofalse, suppresses policy breakdown logs, overriding the globalshow_policy_breakdowns?configuration.:short_circuit?(boolean/0) - Forcan_do_all/3andcan_do_all?/3, whether to stop checking after the first failing check. Defaults tofalseforcan_do_all/3andtrueforcan_do_all?/3. The default value isfalse.
Runs authorization checks for MishkaCmsMigration.MigrationItem.record_outcome, returning a boolean.
Accepts an actor or a scope as the first argument.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) The default value is `false`.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument tocan/3. SeeAsh.Scopefor more.:context(map/0) - Context to set on the query/changeset/action_input being authorized:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:as_of- A point in time to authorize "as of" (time travel). SeeAsh.Query.as_of/2.:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.:log_policy_breakdown?(boolean/0) - If set tofalse, suppresses policy breakdown logs, overriding the globalshow_policy_breakdowns?configuration.:short_circuit?(boolean/0) - Forcan_do_all/3andcan_do_all?/3, whether to stop checking after the first failing check. Defaults tofalseforcan_do_all/3andtrueforcan_do_all?/3. The default value isfalse.
Runs authorization checks for MishkaCmsMigration.MigrationItem.record_plan
Accepts an actor or a scope as the first argument.
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) The default value is `false`.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument tocan/3. SeeAsh.Scopefor more.:context(map/0) - Context to set on the query/changeset/action_input being authorized:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:as_of- A point in time to authorize "as of" (time travel). SeeAsh.Query.as_of/2.:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.:log_policy_breakdown?(boolean/0) - If set tofalse, suppresses policy breakdown logs, overriding the globalshow_policy_breakdowns?configuration.:short_circuit?(boolean/0) - Forcan_do_all/3andcan_do_all?/3, whether to stop checking after the first failing check. Defaults tofalseforcan_do_all/3andtrueforcan_do_all?/3. The default value isfalse.
Runs authorization checks for MishkaCmsMigration.MigrationItem.record_plan, returning a boolean.
Accepts an actor or a scope as the first argument.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) The default value is `false`.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument tocan/3. SeeAsh.Scopefor more.:context(map/0) - Context to set on the query/changeset/action_input being authorized:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:as_of- A point in time to authorize "as of" (time travel). SeeAsh.Query.as_of/2.:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.:log_policy_breakdown?(boolean/0) - If set tofalse, suppresses policy breakdown logs, overriding the globalshow_policy_breakdowns?configuration.:short_circuit?(boolean/0) - Forcan_do_all/3andcan_do_all?/3, whether to stop checking after the first failing check. Defaults tofalseforcan_do_all/3andtrueforcan_do_all?/3. The default value isfalse.
Runs authorization checks for MishkaCmsMigration.MigrationLog.record
Accepts an actor or a scope as the first argument.
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) The default value is `false`.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument tocan/3. SeeAsh.Scopefor more.:context(map/0) - Context to set on the query/changeset/action_input being authorized:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:as_of- A point in time to authorize "as of" (time travel). SeeAsh.Query.as_of/2.:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.:log_policy_breakdown?(boolean/0) - If set tofalse, suppresses policy breakdown logs, overriding the globalshow_policy_breakdowns?configuration.:short_circuit?(boolean/0) - Forcan_do_all/3andcan_do_all?/3, whether to stop checking after the first failing check. Defaults tofalseforcan_do_all/3andtrueforcan_do_all?/3. The default value isfalse.
Runs authorization checks for MishkaCmsMigration.MigrationLog.record, returning a boolean.
Accepts an actor or a scope as the first argument.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) The default value is `false`.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument tocan/3. SeeAsh.Scopefor more.:context(map/0) - Context to set on the query/changeset/action_input being authorized:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:as_of- A point in time to authorize "as of" (time travel). SeeAsh.Query.as_of/2.:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.:log_policy_breakdown?(boolean/0) - If set tofalse, suppresses policy breakdown logs, overriding the globalshow_policy_breakdowns?configuration.:short_circuit?(boolean/0) - Forcan_do_all/3andcan_do_all?/3, whether to stop checking after the first failing check. Defaults tofalseforcan_do_all/3andtrueforcan_do_all?/3. The default value isfalse.
Runs authorization checks for MishkaCmsMigration.MigrationRun.record_progress
Accepts an actor or a scope as the first argument.
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) The default value is `false`.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument tocan/3. SeeAsh.Scopefor more.:context(map/0) - Context to set on the query/changeset/action_input being authorized:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:as_of- A point in time to authorize "as of" (time travel). SeeAsh.Query.as_of/2.:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.:log_policy_breakdown?(boolean/0) - If set tofalse, suppresses policy breakdown logs, overriding the globalshow_policy_breakdowns?configuration.:short_circuit?(boolean/0) - Forcan_do_all/3andcan_do_all?/3, whether to stop checking after the first failing check. Defaults tofalseforcan_do_all/3andtrueforcan_do_all?/3. The default value isfalse.
Runs authorization checks for MishkaCmsMigration.MigrationRun.record_progress, returning a boolean.
Accepts an actor or a scope as the first argument.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) The default value is `false`.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument tocan/3. SeeAsh.Scopefor more.:context(map/0) - Context to set on the query/changeset/action_input being authorized:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:as_of- A point in time to authorize "as of" (time travel). SeeAsh.Query.as_of/2.:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.:log_policy_breakdown?(boolean/0) - If set tofalse, suppresses policy breakdown logs, overriding the globalshow_policy_breakdowns?configuration.:short_circuit?(boolean/0) - Forcan_do_all/3andcan_do_all?/3, whether to stop checking after the first failing check. Defaults tofalseforcan_do_all/3andtrueforcan_do_all?/3. The default value isfalse.
Runs authorization checks for MishkaCmsMigration.MigrationRun.start_dry_run
Accepts an actor or a scope as the first argument.
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) The default value is `false`.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument tocan/3. SeeAsh.Scopefor more.:context(map/0) - Context to set on the query/changeset/action_input being authorized:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:as_of- A point in time to authorize "as of" (time travel). SeeAsh.Query.as_of/2.:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.:log_policy_breakdown?(boolean/0) - If set tofalse, suppresses policy breakdown logs, overriding the globalshow_policy_breakdowns?configuration.:short_circuit?(boolean/0) - Forcan_do_all/3andcan_do_all?/3, whether to stop checking after the first failing check. Defaults tofalseforcan_do_all/3andtrueforcan_do_all?/3. The default value isfalse.
Runs authorization checks for MishkaCmsMigration.MigrationRun.start_dry_run, returning a boolean.
Accepts an actor or a scope as the first argument.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) The default value is `false`.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument tocan/3. SeeAsh.Scopefor more.:context(map/0) - Context to set on the query/changeset/action_input being authorized:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:as_of- A point in time to authorize "as of" (time travel). SeeAsh.Query.as_of/2.:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.:log_policy_breakdown?(boolean/0) - If set tofalse, suppresses policy breakdown logs, overriding the globalshow_policy_breakdowns?configuration.:short_circuit?(boolean/0) - Forcan_do_all/3andcan_do_all?/3, whether to stop checking after the first failing check. Defaults tofalseforcan_do_all/3andtrueforcan_do_all?/3. The default value isfalse.
Runs authorization checks for MishkaCmsMigration.MigrationRun.start_import
Accepts an actor or a scope as the first argument.
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) The default value is `false`.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument tocan/3. SeeAsh.Scopefor more.:context(map/0) - Context to set on the query/changeset/action_input being authorized:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:as_of- A point in time to authorize "as of" (time travel). SeeAsh.Query.as_of/2.:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.:log_policy_breakdown?(boolean/0) - If set tofalse, suppresses policy breakdown logs, overriding the globalshow_policy_breakdowns?configuration.:short_circuit?(boolean/0) - Forcan_do_all/3andcan_do_all?/3, whether to stop checking after the first failing check. Defaults tofalseforcan_do_all/3andtrueforcan_do_all?/3. The default value isfalse.
Runs authorization checks for MishkaCmsMigration.MigrationRun.start_import, returning a boolean.
Accepts an actor or a scope as the first argument.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to:filterthe query will filter out unauthorized access. Valid values are :filter, :error The default value is:filter.:validate?(boolean/0) - Whether or not to treat an invalid action as a non-allowed action. The default value isfalse.:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) The default value is `false`.:pre_flight?(boolean/0) - Whether or not this is a pre_flight check (which may perform optimized in-memory checks) or the final proper check. The default value istrue.:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol. Provides a default tenant and deep merges context (explicit opts take precedence). The actor is always taken from the second argument tocan/3. SeeAsh.Scopefor more.:context(map/0) - Context to set on the query/changeset/action_input being authorized:run_queries?(boolean/0) - Whether or not to run queries. If set totrue,:maybewill not be returned. The default value istrue.:data- The record or records specifically attempting to be acted upon.:tenant(value that implements theAsh.ToTenantprotocol) - The tenant to use for authorization:as_of- A point in time to authorize "as of" (time travel). SeeAsh.Query.as_of/2.:alter_source?(boolean/0) - If set totrue, the source being authorized is returned so it can be run. The default value isfalse.:base_query(term/0) - A base query on which to apply an generated filters:no_check?(boolean/0) - Whether or not authorization must pass at the strict/filter step, or if post-checks are allowed to be run The default value isfalse.:on_must_pass_strict_check(term/0) - Override the value returned whenno_check?istruebut a check must be run.:atomic_changeset(term/0) - A base query on which to apply an generated filters:return_forbidden_error?(boolean/0) - Whether or not to return a forbidden error in cases of not being authorized. The default value isfalse.:log?(boolean/0) - Whether or not to log the authorization result. The default value isfalse.:log_policy_breakdown?(boolean/0) - If set tofalse, suppresses policy breakdown logs, overriding the globalshow_policy_breakdowns?configuration.:short_circuit?(boolean/0) - Forcan_do_all/3andcan_do_all?/3, whether to stop checking after the first failing check. Defaults tofalseforcan_do_all/3andtrueforcan_do_all?/3. The default value isfalse.
Ends a run: its job is cancelled, its secret and file cleared, and it cannot run again
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 istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor 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, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis 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 istrue.: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:strict?(boolean/0) - If set to true, only the fields listed for a relationship inloadare loaded on it, as with thestrict?option toAsh.load/3. The default value isfalse.:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for 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:streamstrategy is chosen. See theAsh.stream!/2docs 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 istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs 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 toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true)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 isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif 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 wherereturn_records?: truewas provided. The default value isfalse.: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 isfalse.: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, orfalseif not set. Returning all errors may be expensive for large inserts. The default value istrue.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned.Potential elements:
{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{: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 totrueand all otherreturn_*?options are set tofalse.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 istrue.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen 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 totrue.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_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :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 is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Ends a run: its job is cancelled, its secret and file cleared, and it cannot run again
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 istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor 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, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis 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 istrue.: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:strict?(boolean/0) - If set to true, only the fields listed for a relationship inloadare loaded on it, as with thestrict?option toAsh.load/3. The default value isfalse.:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for 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:streamstrategy is chosen. See theAsh.stream!/2docs 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 istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs 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 toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true)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 isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif 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 wherereturn_records?: truewas provided. The default value isfalse.: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 isfalse.: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, orfalseif not set. Returning all errors may be expensive for large inserts. The default value istrue.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned.Potential elements:
{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{: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 totrueand all otherreturn_*?options are set tofalse.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 istrue.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen 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 totrue.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_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :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 is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Returns the changeset corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.
Returns the changeset corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.
Returns the changeset corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:changeset(term/0) - A changeset to seed the action with.
Returns the changeset corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.
Returns the changeset corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.
Returns the changeset corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.
Returns the changeset corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.
Returns the changeset corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.
Returns the changeset corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.
Returns the changeset corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.
Returns the changeset corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.
Returns the changeset corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.
Returns the changeset corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.
Returns the changeset corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.
Returns the changeset corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:changeset(term/0) - A changeset to seed the action with.
Returns the changeset corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:changeset(term/0) - A changeset to seed the action with.
Returns the changeset corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:changeset(term/0) - A changeset to seed the action with.
Returns the changeset corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:changeset(term/0) - A changeset to seed the action with.
Returns the changeset corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.
Returns the changeset corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.
Returns the changeset corresponding to the action.
Options
:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.
Creates a run on the tenant's site, started by the actor, once its source answers
Inputs
- file - The file a source that reads one is handed: the form's staged upload
- options - What the admin chose for this run (MishkaCmsMigration.MigrationRun.Options)
- connection - How the source connects, without its secret: an address, a user name, a file
- source - The id of the source plugin the run reads (MishkaCmsMigration.Source)
- language - The one language every item of an unknown or unpublished language is put in
- secret - The secret the source signs in with; only its sealed form is kept
- source_host - The host the run reads from, such as example.com or localhost:8080
- bring - The switches of what the run brings, folded into its options
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 isfalse.:return_skipped_upsert?(boolean/0) - Iftrue, 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 isfalse.:upsert_identity(atom/0) - The identity to use when detecting conflicts forupsert?, e.g.upsert_identity: :full_name. By default, the primary key is used. Has no effect ifupsert?: trueis 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 (likeupdated_attimestamps) on upsert. Only relevant whenupsert?: trueis set. Set tofalseto skip touching update_default fields when an upsert results in an update. The default value istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor 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, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis 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 istrue.: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:strict?(boolean/0) - If set to true, only the fields listed for a relationship inloadare loaded on it, as with thestrict?option toAsh.load/3. The default value isfalse.:changeset(term/0) - A changeset to seed the action with.:bulk_options(keyword/0) - Options passed toAsh.bulk_create, if a list or stream of inputs is provided.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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 isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif 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 wherereturn_records?: truewas provided. The default value isfalse.: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 isfalse.: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, orfalseif not set. Returning all errors may be expensive for large inserts. The default value istrue.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned.Potential elements:
{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{: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 totrueand all otherreturn_*?options are set tofalse.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 istrue.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen 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 totrue.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_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :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 is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Creates a run on the tenant's site, started by the actor, once its source answers
Raises any errors instead of returning them
Inputs
- file - The file a source that reads one is handed: the form's staged upload
- options - What the admin chose for this run (MishkaCmsMigration.MigrationRun.Options)
- connection - How the source connects, without its secret: an address, a user name, a file
- source - The id of the source plugin the run reads (MishkaCmsMigration.Source)
- language - The one language every item of an unknown or unpublished language is put in
- secret - The secret the source signs in with; only its sealed form is kept
- source_host - The host the run reads from, such as example.com or localhost:8080
- bring - The switches of what the run brings, folded into its options
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 isfalse.:return_skipped_upsert?(boolean/0) - Iftrue, 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 isfalse.:upsert_identity(atom/0) - The identity to use when detecting conflicts forupsert?, e.g.upsert_identity: :full_name. By default, the primary key is used. Has no effect ifupsert?: trueis 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 (likeupdated_attimestamps) on upsert. Only relevant whenupsert?: trueis set. Set tofalseto skip touching update_default fields when an upsert results in an update. The default value istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor 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, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis 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 istrue.: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:strict?(boolean/0) - If set to true, only the fields listed for a relationship inloadare loaded on it, as with thestrict?option toAsh.load/3. The default value isfalse.:changeset(term/0) - A changeset to seed the action with.:bulk_options(keyword/0) - Options passed toAsh.bulk_create, if a list or stream of inputs is provided.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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 isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif 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 wherereturn_records?: truewas provided. The default value isfalse.: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 isfalse.: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, orfalseif not set. Returning all errors may be expensive for large inserts. The default value istrue.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned.Potential elements:
{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{: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 totrueand all otherreturn_*?options are set tofalse.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 istrue.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen 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 totrue.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_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :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 is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Maps the item to a record the CMS holds or back (nil), or decides its conflict
Arguments
- decision - The answer to the conflict the item waits on: keep, import or leave_out
Inputs
- conflict - Which of the item's open conflicts the decision answers, its first when nil
- mapped_id - The record of the kind's CMS resource an admin mapped the item to, nil to import it as its own
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 istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor 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, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis 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 istrue.: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:strict?(boolean/0) - If set to true, only the fields listed for a relationship inloadare loaded on it, as with thestrict?option toAsh.load/3. The default value isfalse.:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for 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:streamstrategy is chosen. See theAsh.stream!/2docs 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 istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs 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 toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true)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 isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif 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 wherereturn_records?: truewas provided. The default value isfalse.: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 isfalse.: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, orfalseif not set. Returning all errors may be expensive for large inserts. The default value istrue.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned.Potential elements:
{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{: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 totrueand all otherreturn_*?options are set tofalse.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 istrue.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen 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 totrue.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_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :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 is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Maps the item to a record the CMS holds or back (nil), or decides its conflict
Raises any errors instead of returning them
Arguments
- decision - The answer to the conflict the item waits on: keep, import or leave_out
Inputs
- conflict - Which of the item's open conflicts the decision answers, its first when nil
- mapped_id - The record of the kind's CMS resource an admin mapped the item to, nil to import it as its own
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 istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor 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, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis 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 istrue.: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:strict?(boolean/0) - If set to true, only the fields listed for a relationship inloadare loaded on it, as with thestrict?option toAsh.load/3. The default value isfalse.:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for 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:streamstrategy is chosen. See theAsh.stream!/2docs 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 istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs 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 toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true)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 isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif 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 wherereturn_records?: truewas provided. The default value isfalse.: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 isfalse.: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, orfalseif not set. Returning all errors may be expensive for large inserts. The default value istrue.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned.Potential elements:
{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{: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 totrueand all otherreturn_*?options are set tofalse.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 istrue.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen 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 totrue.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_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :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 is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Answers one conflict with one choice on every item that waits for it, in one update
Arguments
- conflict
- decision
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 istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor 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, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis 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 istrue.: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:strict?(boolean/0) - If set to true, only the fields listed for a relationship inloadare loaded on it, as with thestrict?option toAsh.load/3. The default value isfalse.:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for 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:streamstrategy is chosen. See theAsh.stream!/2docs 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 istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs 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 toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true)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 isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif 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 wherereturn_records?: truewas provided. The default value isfalse.: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 isfalse.: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, orfalseif not set. Returning all errors may be expensive for large inserts. The default value istrue.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned.Potential elements:
{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{: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 totrueand all otherreturn_*?options are set tofalse.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 istrue.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen 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 totrue.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_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :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 is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Answers one conflict with one choice on every item that waits for it, in one update
Raises any errors instead of returning them
Arguments
- conflict
- decision
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 istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor 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, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis 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 istrue.: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:strict?(boolean/0) - If set to true, only the fields listed for a relationship inloadare loaded on it, as with thestrict?option toAsh.load/3. The default value isfalse.:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for 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:streamstrategy is chosen. See theAsh.stream!/2docs 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 istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs 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 toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true)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 isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif 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 wherereturn_records?: truewas provided. The default value isfalse.: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 isfalse.: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, orfalseif not set. Returning all errors may be expensive for large inserts. The default value istrue.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned.Potential elements:
{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{: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 totrueand all otherreturn_*?options are set tofalse.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 istrue.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen 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 totrue.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_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :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 is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Queues a dry run of the picked items alone, which puts the run back where it was
Arguments
- items - The ids of the picked items, items of the run's site and source host
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 istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor 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, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis 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 istrue.: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:strict?(boolean/0) - If set to true, only the fields listed for a relationship inloadare loaded on it, as with thestrict?option toAsh.load/3. The default value isfalse.:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for 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:streamstrategy is chosen. See theAsh.stream!/2docs 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 istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs 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 toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true)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 isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif 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 wherereturn_records?: truewas provided. The default value isfalse.: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 isfalse.: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, orfalseif not set. Returning all errors may be expensive for large inserts. The default value istrue.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned.Potential elements:
{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{: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 totrueand all otherreturn_*?options are set tofalse.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 istrue.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen 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 totrue.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_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :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 is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Queues a dry run of the picked items alone, which puts the run back where it was
Raises any errors instead of returning them
Arguments
- items - The ids of the picked items, items of the run's site and source host
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 istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor 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, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis 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 istrue.: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:strict?(boolean/0) - If set to true, only the fields listed for a relationship inloadare loaded on it, as with thestrict?option toAsh.load/3. The default value isfalse.:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for 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:streamstrategy is chosen. See theAsh.stream!/2docs 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 istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs 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 toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true)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 isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif 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 wherereturn_records?: truewas provided. The default value isfalse.: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 isfalse.: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, orfalseif not set. Returning all errors may be expensive for large inserts. The default value istrue.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned.Potential elements:
{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{: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 totrueand all otherreturn_*?options are set tofalse.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 istrue.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen 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 totrue.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_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :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 is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
System-internal: saves why a dry run or an import could not go on
Arguments
- error - What stopped the job: AshOban's error after the last attempt, or Oban's
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 istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor 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, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis 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 istrue.: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:strict?(boolean/0) - If set to true, only the fields listed for a relationship inloadare loaded on it, as with thestrict?option toAsh.load/3. The default value isfalse.:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for 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:streamstrategy is chosen. See theAsh.stream!/2docs 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 istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs 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 toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true)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 isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif 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 wherereturn_records?: truewas provided. The default value isfalse.: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 isfalse.: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, orfalseif not set. Returning all errors may be expensive for large inserts. The default value istrue.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned.Potential elements:
{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{: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 totrueand all otherreturn_*?options are set tofalse.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 istrue.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen 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 totrue.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_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :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 is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
System-internal: saves why a dry run or an import could not go on
Raises any errors instead of returning them
Arguments
- error - What stopped the job: AshOban's error after the last attempt, or Oban's
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 istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor 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, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis 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 istrue.: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:strict?(boolean/0) - If set to true, only the fields listed for a relationship inloadare loaded on it, as with thestrict?option toAsh.load/3. The default value isfalse.:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for 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:streamstrategy is chosen. See theAsh.stream!/2docs 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 istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs 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 toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true)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 isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif 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 wherereturn_records?: truewas provided. The default value isfalse.: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 isfalse.: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, orfalseif not set. Returning all errors may be expensive for large inserts. The default value istrue.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned.Potential elements:
{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{: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 totrueand all otherreturn_*?options are set tofalse.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 istrue.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen 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 totrue.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_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :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 is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
System-internal: saves the dry run's report
Arguments
- report - What the last dry run or import did with each item (MishkaCmsMigration.Report)
- extra - Facts about the source, such as its version and plugins (Source's extra/1)
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 istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor 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, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis 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 istrue.: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:strict?(boolean/0) - If set to true, only the fields listed for a relationship inloadare loaded on it, as with thestrict?option toAsh.load/3. The default value isfalse.:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for 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:streamstrategy is chosen. See theAsh.stream!/2docs 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 istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs 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 toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true)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 isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif 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 wherereturn_records?: truewas provided. The default value isfalse.: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 isfalse.: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, orfalseif not set. Returning all errors may be expensive for large inserts. The default value istrue.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned.Potential elements:
{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{: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 totrueand all otherreturn_*?options are set tofalse.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 istrue.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen 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 totrue.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_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :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 is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
System-internal: saves the dry run's report
Raises any errors instead of returning them
Arguments
- report - What the last dry run or import did with each item (MishkaCmsMigration.Report)
- extra - Facts about the source, such as its version and plugins (Source's extra/1)
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 istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor 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, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis 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 istrue.: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:strict?(boolean/0) - If set to true, only the fields listed for a relationship inloadare loaded on it, as with thestrict?option toAsh.load/3. The default value isfalse.:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for 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:streamstrategy is chosen. See theAsh.stream!/2docs 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 istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs 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 toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true)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 isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif 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 wherereturn_records?: truewas provided. The default value isfalse.: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 isfalse.: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, orfalseif not set. Returning all errors may be expensive for large inserts. The default value istrue.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned.Potential elements:
{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{: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 totrueand all otherreturn_*?options are set tofalse.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 istrue.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen 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 totrue.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_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :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 is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
System-internal: saves the import's report
Arguments
- report - What the last dry run or import did with each item (MishkaCmsMigration.Report)
- extra - Facts about the source, such as its version and plugins (Source's extra/1)
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 istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor 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, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis 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 istrue.: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:strict?(boolean/0) - If set to true, only the fields listed for a relationship inloadare loaded on it, as with thestrict?option toAsh.load/3. The default value isfalse.:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for 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:streamstrategy is chosen. See theAsh.stream!/2docs 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 istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs 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 toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true)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 isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif 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 wherereturn_records?: truewas provided. The default value isfalse.: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 isfalse.: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, orfalseif not set. Returning all errors may be expensive for large inserts. The default value istrue.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned.Potential elements:
{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{: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 totrueand all otherreturn_*?options are set tofalse.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 istrue.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen 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 totrue.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_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :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 is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
System-internal: saves the import's report
Raises any errors instead of returning them
Arguments
- report - What the last dry run or import did with each item (MishkaCmsMigration.Report)
- extra - Facts about the source, such as its version and plugins (Source's extra/1)
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 istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor 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, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis 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 istrue.: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:strict?(boolean/0) - If set to true, only the fields listed for a relationship inloadare loaded on it, as with thestrict?option toAsh.load/3. The default value isfalse.:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for 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:streamstrategy is chosen. See theAsh.stream!/2docs 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 istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs 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 toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true)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 isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif 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 wherereturn_records?: truewas provided. The default value isfalse.: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 isfalse.: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, orfalseif not set. Returning all errors may be expensive for large inserts. The default value istrue.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned.Potential elements:
{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{: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 totrueand all otherreturn_*?options are set tofalse.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 istrue.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen 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 totrue.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_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :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 is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
System-internal: saves the report a job of picked items merged and puts the run back
Arguments
- report - What the last dry run or import did with each item (MishkaCmsMigration.Report)
- status - The status the run was in before the job of picked items
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 istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor 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, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis 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 istrue.: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:strict?(boolean/0) - If set to true, only the fields listed for a relationship inloadare loaded on it, as with thestrict?option toAsh.load/3. The default value isfalse.:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for 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:streamstrategy is chosen. See theAsh.stream!/2docs 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 istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs 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 toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true)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 isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif 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 wherereturn_records?: truewas provided. The default value isfalse.: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 isfalse.: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, orfalseif not set. Returning all errors may be expensive for large inserts. The default value istrue.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned.Potential elements:
{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{: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 totrueand all otherreturn_*?options are set tofalse.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 istrue.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen 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 totrue.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_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :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 is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
System-internal: saves the report a job of picked items merged and puts the run back
Raises any errors instead of returning them
Arguments
- report - What the last dry run or import did with each item (MishkaCmsMigration.Report)
- status - The status the run was in before the job of picked items
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 istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor 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, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis 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 istrue.: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:strict?(boolean/0) - If set to true, only the fields listed for a relationship inloadare loaded on it, as with thestrict?option toAsh.load/3. The default value isfalse.:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for 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:streamstrategy is chosen. See theAsh.stream!/2docs 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 istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs 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 toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true)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 isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif 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 wherereturn_records?: truewas provided. The default value isfalse.: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 isfalse.: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, orfalseif not set. Returning all errors may be expensive for large inserts. The default value istrue.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned.Potential elements:
{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{: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 totrueand all otherreturn_*?options are set tofalse.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 istrue.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen 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 totrue.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_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :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 is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
System-internal: forgets the decision on a deleted CMS record once the item has a record again
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 istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor 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, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis 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 istrue.: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:strict?(boolean/0) - If set to true, only the fields listed for a relationship inloadare loaded on it, as with thestrict?option toAsh.load/3. The default value isfalse.:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for 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:streamstrategy is chosen. See theAsh.stream!/2docs 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 istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs 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 toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true)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 isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif 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 wherereturn_records?: truewas provided. The default value isfalse.: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 isfalse.: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, orfalseif not set. Returning all errors may be expensive for large inserts. The default value istrue.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned.Potential elements:
{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{: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 totrueand all otherreturn_*?options are set tofalse.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 istrue.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen 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 totrue.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_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :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 is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
System-internal: forgets the decision on a deleted CMS record once the item has a record again
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 istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor 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, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis 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 istrue.: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:strict?(boolean/0) - If set to true, only the fields listed for a relationship inloadare loaded on it, as with thestrict?option toAsh.load/3. The default value isfalse.:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for 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:streamstrategy is chosen. See theAsh.stream!/2docs 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 istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs 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 toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true)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 isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif 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 wherereturn_records?: truewas provided. The default value isfalse.: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 isfalse.: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, orfalseif not set. Returning all errors may be expensive for large inserts. The default value istrue.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned.Potential elements:
{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{: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 totrueand all otherreturn_*?options are set tofalse.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 istrue.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen 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 totrue.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_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :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 is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
A site's runs
Options
:as_of- A point in time to read "as of" (time travel). SeeAsh.Query.as_of/2.:page- Pagination options, seeAsh.read/2for 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 toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, 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 isfalse.:skip_unknown_inputs- 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) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) 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.
SeeAsh.Query.load/2. The default value isfalse.: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 adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis 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. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
A site's runs
Raises any errors instead of returning them
Options
:as_of- A point in time to read "as of" (time travel). SeeAsh.Query.as_of/2.:page- Pagination options, seeAsh.read/2for 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 toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, 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 isfalse.:skip_unknown_inputs- 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) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) 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.
SeeAsh.Query.load/2. The default value isfalse.: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 adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis 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. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Queues the import of the picked items alone, which puts the run back where it was
Arguments
- items - The ids of the picked items, items of the run's site and source host
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 istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor 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, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis 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 istrue.: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:strict?(boolean/0) - If set to true, only the fields listed for a relationship inloadare loaded on it, as with thestrict?option toAsh.load/3. The default value isfalse.:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for 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:streamstrategy is chosen. See theAsh.stream!/2docs 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 istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs 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 toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true)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 isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif 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 wherereturn_records?: truewas provided. The default value isfalse.: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 isfalse.: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, orfalseif not set. Returning all errors may be expensive for large inserts. The default value istrue.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned.Potential elements:
{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{: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 totrueand all otherreturn_*?options are set tofalse.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 istrue.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen 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 totrue.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_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :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 is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Queues the import of the picked items alone, which puts the run back where it was
Raises any errors instead of returning them
Arguments
- items - The ids of the picked items, items of the run's site and source host
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 istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor 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, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis 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 istrue.: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:strict?(boolean/0) - If set to true, only the fields listed for a relationship inloadare loaded on it, as with thestrict?option toAsh.load/3. The default value isfalse.:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for 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:streamstrategy is chosen. See theAsh.stream!/2docs 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 istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs 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 toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true)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 isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif 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 wherereturn_records?: truewas provided. The default value isfalse.: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 isfalse.: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, orfalseif not set. Returning all errors may be expensive for large inserts. The default value istrue.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned.Potential elements:
{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{: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 totrueand all otherreturn_*?options are set tofalse.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 istrue.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen 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 totrue.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_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :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 is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
The earliest item of the site whose file has these bytes (a SHA-256), if any
Arguments
- file_hash
Options
:as_of- A point in time to read "as of" (time travel). SeeAsh.Query.as_of/2.:page- Pagination options, seeAsh.read/2for 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 toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, 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 isfalse.:skip_unknown_inputs- 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) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) 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.
SeeAsh.Query.load/2. The default value isfalse.: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 adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis 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. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
The earliest item of the site whose file has these bytes (a SHA-256), if any
Raises any errors instead of returning them
Arguments
- file_hash
Options
:as_of- A point in time to read "as of" (time travel). SeeAsh.Query.as_of/2.:page- Pagination options, seeAsh.read/2for 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 toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, 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 isfalse.:skip_unknown_inputs- 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) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) 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.
SeeAsh.Query.load/2. The default value isfalse.: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 adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis 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. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
The items of a source host and kind with any of the given source ids
Arguments
- source_host
- source_kind
- source_ids
Options
:as_of- A point in time to read "as of" (time travel). SeeAsh.Query.as_of/2.:page- Pagination options, seeAsh.read/2for 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 toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, 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 isfalse.:skip_unknown_inputs- 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) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) 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.
SeeAsh.Query.load/2. The default value isfalse.: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 adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis 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. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
The items of a source host and kind with any of the given source ids
Raises any errors instead of returning them
Arguments
- source_host
- source_kind
- source_ids
Options
:as_of- A point in time to read "as of" (time travel). SeeAsh.Query.as_of/2.:page- Pagination options, seeAsh.read/2for 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 toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, 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 isfalse.:skip_unknown_inputs- 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) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) 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.
SeeAsh.Query.load/2. The default value isfalse.: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 adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis 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. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
The items of a source host that wait for a decision no admin has made
Arguments
- source_host
Options
:as_of- A point in time to read "as of" (time travel). SeeAsh.Query.as_of/2.:page- Pagination options, seeAsh.read/2for 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 toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, 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 isfalse.:skip_unknown_inputs- 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) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) 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.
SeeAsh.Query.load/2. The default value isfalse.: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 adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis 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. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
The items of a source host that wait for a decision no admin has made
Raises any errors instead of returning them
Arguments
- source_host
Options
:as_of- A point in time to read "as of" (time travel). SeeAsh.Query.as_of/2.:page- Pagination options, seeAsh.read/2for 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 toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, 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 isfalse.:skip_unknown_inputs- 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) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) 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.
SeeAsh.Query.load/2. The default value isfalse.: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 adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis 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. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Leaves the item out of every later dry run and import, keeping its CMS record
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 istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor 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, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis 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 istrue.: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:strict?(boolean/0) - If set to true, only the fields listed for a relationship inloadare loaded on it, as with thestrict?option toAsh.load/3. The default value isfalse.:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for 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:streamstrategy is chosen. See theAsh.stream!/2docs 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 istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs 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 toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true)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 isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif 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 wherereturn_records?: truewas provided. The default value isfalse.: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 isfalse.: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, orfalseif not set. Returning all errors may be expensive for large inserts. The default value istrue.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned.Potential elements:
{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{: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 totrueand all otherreturn_*?options are set tofalse.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 istrue.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen 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 totrue.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_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :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 is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Leaves the item out of every later dry run and import, keeping its CMS record
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 istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor 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, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis 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 istrue.: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:strict?(boolean/0) - If set to true, only the fields listed for a relationship inloadare loaded on it, as with thestrict?option toAsh.load/3. The default value isfalse.:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for 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:streamstrategy is chosen. See theAsh.stream!/2docs 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 istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs 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 toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true)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 isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif 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 wherereturn_records?: truewas provided. The default value isfalse.: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 isfalse.: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, orfalseif not set. Returning all errors may be expensive for large inserts. The default value istrue.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned.Potential elements:
{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{: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 totrueand all otherreturn_*?options are set tofalse.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 istrue.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen 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 totrue.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_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :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 is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
The items of a source host and kind an admin left out, with any of the given slugs
Arguments
- source_host
- source_kind
- source_slugs
Options
:as_of- A point in time to read "as of" (time travel). SeeAsh.Query.as_of/2.:page- Pagination options, seeAsh.read/2for 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 toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, 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 isfalse.:skip_unknown_inputs- 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) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) 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.
SeeAsh.Query.load/2. The default value isfalse.: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 adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis 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. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
The items of a source host and kind an admin left out, with any of the given slugs
Raises any errors instead of returning them
Arguments
- source_host
- source_kind
- source_slugs
Options
:as_of- A point in time to read "as of" (time travel). SeeAsh.Query.as_of/2.:page- Pagination options, seeAsh.read/2for 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 toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:return_query?(boolean/0) - Iftrue, 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 isfalse.:skip_unknown_inputs- 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) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true) 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.
SeeAsh.Query.load/2. The default value isfalse.: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 adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.:not_found_error?(boolean/0) - Whether or not to return or raise aNotFounderror or to returnnilwhen a get? action/interface is called.:stream?(boolean/0) - If true, a stream of the results will be returned The default value isfalse.:stream_options(keyword/0) - Options passed toAsh.stream!, ifstream?: trueis 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. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs for more.
Maps the item to a record the CMS holds or back (nil), or decides its conflict
Arguments
- mapped_id - The record of the kind's CMS resource an admin mapped the item to, nil to import it as its own
Inputs
- conflict - Which of the item's open conflicts the decision answers, its first when nil
- decision - The answer to the conflict the item waits on: keep, import or leave_out
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 istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor 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, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis 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 istrue.: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:strict?(boolean/0) - If set to true, only the fields listed for a relationship inloadare loaded on it, as with thestrict?option toAsh.load/3. The default value isfalse.:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for 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:streamstrategy is chosen. See theAsh.stream!/2docs 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 istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs 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 toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true)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 isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif 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 wherereturn_records?: truewas provided. The default value isfalse.: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 isfalse.: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, orfalseif not set. Returning all errors may be expensive for large inserts. The default value istrue.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned.Potential elements:
{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{: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 totrueand all otherreturn_*?options are set tofalse.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 istrue.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen 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 totrue.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_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :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 is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Maps the item to a record the CMS holds or back (nil), or decides its conflict
Raises any errors instead of returning them
Arguments
- mapped_id - The record of the kind's CMS resource an admin mapped the item to, nil to import it as its own
Inputs
- conflict - Which of the item's open conflicts the decision answers, its first when nil
- decision - The answer to the conflict the item waits on: keep, import or leave_out
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 istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor 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, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis 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 istrue.: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:strict?(boolean/0) - If set to true, only the fields listed for a relationship inloadare loaded on it, as with thestrict?option toAsh.load/3. The default value isfalse.:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for 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:streamstrategy is chosen. See theAsh.stream!/2docs 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 istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs 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 toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true)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 isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif 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 wherereturn_records?: truewas provided. The default value isfalse.: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 isfalse.: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, orfalseif not set. Returning all errors may be expensive for large inserts. The default value istrue.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned.Potential elements:
{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{: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 totrueand all otherreturn_*?options are set tofalse.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 istrue.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen 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 totrue.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_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :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 is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Returns the query corresponding to the action.
Options
:as_of- A point in time to read "as of" (time travel). SeeAsh.Query.as_of/2.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.
Returns the query corresponding to the action.
Options
:as_of- A point in time to read "as of" (time travel). SeeAsh.Query.as_of/2.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.
Returns the query corresponding to the action.
Options
:as_of- A point in time to read "as of" (time travel). SeeAsh.Query.as_of/2.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.
Returns the query corresponding to the action.
Options
:as_of- A point in time to read "as of" (time travel). SeeAsh.Query.as_of/2.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.
Returns the query corresponding to the action.
Options
:as_of- A point in time to read "as of" (time travel). SeeAsh.Query.as_of/2.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor more.:query- A query to seed the action with.
System-internal: an item whose CMS record an import wrote
Inputs
- extra - The source's fields the CMS has no home for, as of the last write (Source.Item's extra)
- reason - Why the last import skipped or failed the item, or what its write left unconverted
- title - What the source calls the item (Source.Item's title), as of the last write
- outcome - What the last import that met the item did with it; nil before any import did
- source_id - The item's id on the source
- target_id - The CMS record the item was written to
- source_host - The host the item was read from (the run's source_host)
- source_kind - What the item is on the source, such as post or user
- source_slug - The item's slug at the source (Source.Item's attrs slug), as of the last run that met it
- source_modified_at - When the source last changed the item, as of the last write
- content_hash - MishkaCmsMigration.Source.Item.hash/1 of the item, as of the last write
- target_resource - The CMS resource the item was written to
- target_updated_at - The CMS record's updated_at as the last write left it; any other value is an edit in the CMS
- source_parent - The source id of the item of its kind it sits under at the source (Source.Item's parent)
- run_id
- file_hash - The SHA-256 of the file the import downloaded for a media item, as hex; nil for any other item
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 isfalse.:return_skipped_upsert?(boolean/0) - Iftrue, 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 isfalse.:upsert_identity(atom/0) - The identity to use when detecting conflicts forupsert?, e.g.upsert_identity: :full_name. By default, the primary key is used. Has no effect ifupsert?: trueis 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 (likeupdated_attimestamps) on upsert. Only relevant whenupsert?: trueis set. Set tofalseto skip touching update_default fields when an upsert results in an update. The default value istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor 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, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis 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 istrue.: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:strict?(boolean/0) - If set to true, only the fields listed for a relationship inloadare loaded on it, as with thestrict?option toAsh.load/3. The default value isfalse.:changeset(term/0) - A changeset to seed the action with.:bulk_options(keyword/0) - Options passed toAsh.bulk_create, if a list or stream of inputs is provided.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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 isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif 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 wherereturn_records?: truewas provided. The default value isfalse.: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 isfalse.: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, orfalseif not set. Returning all errors may be expensive for large inserts. The default value istrue.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned.Potential elements:
{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{: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 totrueand all otherreturn_*?options are set tofalse.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 istrue.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen 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 totrue.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_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :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 is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
System-internal: an item whose CMS record an import wrote
Raises any errors instead of returning them
Inputs
- extra - The source's fields the CMS has no home for, as of the last write (Source.Item's extra)
- reason - Why the last import skipped or failed the item, or what its write left unconverted
- title - What the source calls the item (Source.Item's title), as of the last write
- outcome - What the last import that met the item did with it; nil before any import did
- source_id - The item's id on the source
- target_id - The CMS record the item was written to
- source_host - The host the item was read from (the run's source_host)
- source_kind - What the item is on the source, such as post or user
- source_slug - The item's slug at the source (Source.Item's attrs slug), as of the last run that met it
- source_modified_at - When the source last changed the item, as of the last write
- content_hash - MishkaCmsMigration.Source.Item.hash/1 of the item, as of the last write
- target_resource - The CMS resource the item was written to
- target_updated_at - The CMS record's updated_at as the last write left it; any other value is an edit in the CMS
- source_parent - The source id of the item of its kind it sits under at the source (Source.Item's parent)
- run_id
- file_hash - The SHA-256 of the file the import downloaded for a media item, as hex; nil for any other item
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 isfalse.:return_skipped_upsert?(boolean/0) - Iftrue, 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 isfalse.:upsert_identity(atom/0) - The identity to use when detecting conflicts forupsert?, e.g.upsert_identity: :full_name. By default, the primary key is used. Has no effect ifupsert?: trueis 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 (likeupdated_attimestamps) on upsert. Only relevant whenupsert?: trueis set. Set tofalseto skip touching update_default fields when an upsert results in an update. The default value istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor 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, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis 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 istrue.: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:strict?(boolean/0) - If set to true, only the fields listed for a relationship inloadare loaded on it, as with thestrict?option toAsh.load/3. The default value isfalse.:changeset(term/0) - A changeset to seed the action with.:bulk_options(keyword/0) - Options passed toAsh.bulk_create, if a list or stream of inputs is provided.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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 isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif 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 wherereturn_records?: truewas provided. The default value isfalse.: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 isfalse.: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, orfalseif not set. Returning all errors may be expensive for large inserts. The default value istrue.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned.Potential elements:
{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{: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 totrueand all otherreturn_*?options are set tofalse.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 istrue.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen 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 totrue.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_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :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 is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
System-internal: an item an import skipped or failed, keeping what was last written
Inputs
- reason - Why the last import skipped or failed the item, or what its write left unconverted
- title - What the source calls the item (Source.Item's title), as of the last write
- outcome - What the last import that met the item did with it; nil before any import did
- source_id - The item's id on the source
- left_out - Whether an admin left the item out: no dry run or import writes it until brought back
- source_host - The host the item was read from (the run's source_host)
- source_kind - What the item is on the source, such as post or user
- source_slug - The item's slug at the source (Source.Item's attrs slug), as of the last run that met it
- source_parent - The source id of the item of its kind it sits under at the source (Source.Item's parent)
- run_id
Options
:upsert?(boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value isfalse.:return_skipped_upsert?(boolean/0) - Iftrue, 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 isfalse.:upsert_identity(atom/0) - The identity to use when detecting conflicts forupsert?, e.g.upsert_identity: :full_name. By default, the primary key is used. Has no effect ifupsert?: trueis 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 (likeupdated_attimestamps) on upsert. Only relevant whenupsert?: trueis set. Set tofalseto skip touching update_default fields when an upsert results in an update. The default value istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor 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, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis 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 istrue.: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:strict?(boolean/0) - If set to true, only the fields listed for a relationship inloadare loaded on it, as with thestrict?option toAsh.load/3. The default value isfalse.:changeset(term/0) - A changeset to seed the action with.:bulk_options(keyword/0) - Options passed toAsh.bulk_create, if a list or stream of inputs is provided.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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 isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif 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 wherereturn_records?: truewas provided. The default value isfalse.: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 isfalse.: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, orfalseif not set. Returning all errors may be expensive for large inserts. The default value istrue.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned.Potential elements:
{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{: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 totrueand all otherreturn_*?options are set tofalse.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 istrue.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen 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 totrue.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_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :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 is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
System-internal: an item an import skipped or failed, keeping what was last written
Raises any errors instead of returning them
Inputs
- reason - Why the last import skipped or failed the item, or what its write left unconverted
- title - What the source calls the item (Source.Item's title), as of the last write
- outcome - What the last import that met the item did with it; nil before any import did
- source_id - The item's id on the source
- left_out - Whether an admin left the item out: no dry run or import writes it until brought back
- source_host - The host the item was read from (the run's source_host)
- source_kind - What the item is on the source, such as post or user
- source_slug - The item's slug at the source (Source.Item's attrs slug), as of the last run that met it
- source_parent - The source id of the item of its kind it sits under at the source (Source.Item's parent)
- run_id
Options
:upsert?(boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value isfalse.:return_skipped_upsert?(boolean/0) - Iftrue, 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 isfalse.:upsert_identity(atom/0) - The identity to use when detecting conflicts forupsert?, e.g.upsert_identity: :full_name. By default, the primary key is used. Has no effect ifupsert?: trueis 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 (likeupdated_attimestamps) on upsert. Only relevant whenupsert?: trueis set. Set tofalseto skip touching update_default fields when an upsert results in an update. The default value istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor 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, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis 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 istrue.: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:strict?(boolean/0) - If set to true, only the fields listed for a relationship inloadare loaded on it, as with thestrict?option toAsh.load/3. The default value isfalse.:changeset(term/0) - A changeset to seed the action with.:bulk_options(keyword/0) - Options passed toAsh.bulk_create, if a list or stream of inputs is provided.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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 isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif 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 wherereturn_records?: truewas provided. The default value isfalse.: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 isfalse.: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, orfalseif not set. Returning all errors may be expensive for large inserts. The default value istrue.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned.Potential elements:
{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{: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 totrueand all otherreturn_*?options are set tofalse.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 istrue.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen 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 totrue.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_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :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 is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
System-internal: what a dry run would do with an item, keeping what imports recorded
Inputs
- title - What the source calls the item (Source.Item's title), as of the last write
- plan - What the last dry run that met the item would do with it
- source_id - The item's id on the source
- left_out - Whether an admin left the item out: no dry run or import writes it until brought back
- source_host - The host the item was read from (the run's source_host)
- source_kind - What the item is on the source, such as post or user
- plan_reason - Why the last dry run would skip or fail the item, or what it would write otherwise
- source_slug - The item's slug at the source (Source.Item's attrs slug), as of the last run that met it
- source_parent - The source id of the item of its kind it sits under at the source (Source.Item's parent)
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 isfalse.:return_skipped_upsert?(boolean/0) - Iftrue, 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 isfalse.:upsert_identity(atom/0) - The identity to use when detecting conflicts forupsert?, e.g.upsert_identity: :full_name. By default, the primary key is used. Has no effect ifupsert?: trueis 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 (likeupdated_attimestamps) on upsert. Only relevant whenupsert?: trueis set. Set tofalseto skip touching update_default fields when an upsert results in an update. The default value istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor 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, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis 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 istrue.: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:strict?(boolean/0) - If set to true, only the fields listed for a relationship inloadare loaded on it, as with thestrict?option toAsh.load/3. The default value isfalse.:changeset(term/0) - A changeset to seed the action with.:bulk_options(keyword/0) - Options passed toAsh.bulk_create, if a list or stream of inputs is provided.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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 isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif 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 wherereturn_records?: truewas provided. The default value isfalse.: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 isfalse.: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, orfalseif not set. Returning all errors may be expensive for large inserts. The default value istrue.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned.Potential elements:
{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{: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 totrueand all otherreturn_*?options are set tofalse.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 istrue.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen 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 totrue.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_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :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 is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
System-internal: what a dry run would do with an item, keeping what imports recorded
Raises any errors instead of returning them
Inputs
- title - What the source calls the item (Source.Item's title), as of the last write
- plan - What the last dry run that met the item would do with it
- source_id - The item's id on the source
- left_out - Whether an admin left the item out: no dry run or import writes it until brought back
- source_host - The host the item was read from (the run's source_host)
- source_kind - What the item is on the source, such as post or user
- plan_reason - Why the last dry run would skip or fail the item, or what it would write otherwise
- source_slug - The item's slug at the source (Source.Item's attrs slug), as of the last run that met it
- source_parent - The source id of the item of its kind it sits under at the source (Source.Item's parent)
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 isfalse.:return_skipped_upsert?(boolean/0) - Iftrue, 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 isfalse.:upsert_identity(atom/0) - The identity to use when detecting conflicts forupsert?, e.g.upsert_identity: :full_name. By default, the primary key is used. Has no effect ifupsert?: trueis 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 (likeupdated_attimestamps) on upsert. Only relevant whenupsert?: trueis set. Set tofalseto skip touching update_default fields when an upsert results in an update. The default value istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor 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, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis 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 istrue.: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:strict?(boolean/0) - If set to true, only the fields listed for a relationship inloadare loaded on it, as with thestrict?option toAsh.load/3. The default value isfalse.:changeset(term/0) - A changeset to seed the action with.:bulk_options(keyword/0) - Options passed toAsh.bulk_create, if a list or stream of inputs is provided.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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 isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif 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 wherereturn_records?: truewas provided. The default value isfalse.: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 isfalse.: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, orfalseif not set. Returning all errors may be expensive for large inserts. The default value istrue.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned.Potential elements:
{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{: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 totrueand all otherreturn_*?options are set tofalse.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 istrue.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen 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 totrue.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_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :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 is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
System-internal: one step of a run, once it is saved
Inputs
- reason - Why a dry run or an import failed (the run's reason)
- step - The step of the run's life the entry tells of
- user_id
- counts - What a finished dry run or import counted (its report's counts)
- source_host - The host the run reads from (the run's source_host)
- run_id
Options
:upsert?(boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value isfalse.:return_skipped_upsert?(boolean/0) - Iftrue, 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 isfalse.:upsert_identity(atom/0) - The identity to use when detecting conflicts forupsert?, e.g.upsert_identity: :full_name. By default, the primary key is used. Has no effect ifupsert?: trueis 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 (likeupdated_attimestamps) on upsert. Only relevant whenupsert?: trueis set. Set tofalseto skip touching update_default fields when an upsert results in an update. The default value istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor 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, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis 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 istrue.: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:strict?(boolean/0) - If set to true, only the fields listed for a relationship inloadare loaded on it, as with thestrict?option toAsh.load/3. The default value isfalse.:changeset(term/0) - A changeset to seed the action with.:bulk_options(keyword/0) - Options passed toAsh.bulk_create, if a list or stream of inputs is provided.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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 isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif 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 wherereturn_records?: truewas provided. The default value isfalse.: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 isfalse.: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, orfalseif not set. Returning all errors may be expensive for large inserts. The default value istrue.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned.Potential elements:
{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{: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 totrueand all otherreturn_*?options are set tofalse.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 istrue.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen 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 totrue.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_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :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 is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
System-internal: one step of a run, once it is saved
Raises any errors instead of returning them
Inputs
- reason - Why a dry run or an import failed (the run's reason)
- step - The step of the run's life the entry tells of
- user_id
- counts - What a finished dry run or import counted (its report's counts)
- source_host - The host the run reads from (the run's source_host)
- run_id
Options
:upsert?(boolean/0) - If a conflict is found based on the primary key, the record is updated in the database (requires upsert support) The default value isfalse.:return_skipped_upsert?(boolean/0) - Iftrue, 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 isfalse.:upsert_identity(atom/0) - The identity to use when detecting conflicts forupsert?, e.g.upsert_identity: :full_name. By default, the primary key is used. Has no effect ifupsert?: trueis 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 (likeupdated_attimestamps) on upsert. Only relevant whenupsert?: trueis set. Set tofalseto skip touching update_default fields when an upsert results in an update. The default value istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor 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, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis 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 istrue.: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:strict?(boolean/0) - If set to true, only the fields listed for a relationship inloadare loaded on it, as with thestrict?option toAsh.load/3. The default value isfalse.:changeset(term/0) - A changeset to seed the action with.:bulk_options(keyword/0) - Options passed toAsh.bulk_create, if a list or stream of inputs is provided.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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 isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif 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 wherereturn_records?: truewas provided. The default value isfalse.: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 isfalse.: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, orfalseif not set. Returning all errors may be expensive for large inserts. The default value istrue.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned.Potential elements:
{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{: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 totrueand all otherreturn_*?options are set tofalse.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 istrue.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen 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 totrue.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_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :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 is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
System-internal: how far the running job is, saved after each page it walks
Arguments
- progress - How far the running job is: the kind it walks and the counts so far
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 istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor 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, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis 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 istrue.: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:strict?(boolean/0) - If set to true, only the fields listed for a relationship inloadare loaded on it, as with thestrict?option toAsh.load/3. The default value isfalse.:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for 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:streamstrategy is chosen. See theAsh.stream!/2docs 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 istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs 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 toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true)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 isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif 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 wherereturn_records?: truewas provided. The default value isfalse.: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 isfalse.: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, orfalseif not set. Returning all errors may be expensive for large inserts. The default value istrue.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned.Potential elements:
{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{: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 totrueand all otherreturn_*?options are set tofalse.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 istrue.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen 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 totrue.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_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :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 is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
System-internal: how far the running job is, saved after each page it walks
Raises any errors instead of returning them
Arguments
- progress - How far the running job is: the kind it walks and the counts so far
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 istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor 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, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis 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 istrue.: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:strict?(boolean/0) - If set to true, only the fields listed for a relationship inloadare loaded on it, as with thestrict?option toAsh.load/3. The default value isfalse.:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for 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:streamstrategy is chosen. See theAsh.stream!/2docs 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 istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs 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 toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true)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 isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif 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 wherereturn_records?: truewas provided. The default value isfalse.: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 isfalse.: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, orfalseif not set. Returning all errors may be expensive for large inserts. The default value istrue.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned.Potential elements:
{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{: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 totrueand all otherreturn_*?options are set tofalse.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 istrue.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen 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 totrue.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_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :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 is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Queues a dry run, a first one or Run again: what an import would create, update and skip, writing nothing
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 istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor 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, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis 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 istrue.: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:strict?(boolean/0) - If set to true, only the fields listed for a relationship inloadare loaded on it, as with thestrict?option toAsh.load/3. The default value isfalse.:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for 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:streamstrategy is chosen. See theAsh.stream!/2docs 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 istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs 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 toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true)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 isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif 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 wherereturn_records?: truewas provided. The default value isfalse.: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 isfalse.: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, orfalseif not set. Returning all errors may be expensive for large inserts. The default value istrue.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned.Potential elements:
{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{: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 totrueand all otherreturn_*?options are set tofalse.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 istrue.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen 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 totrue.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_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :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 is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Queues a dry run, a first one or Run again: what an import would create, update and skip, writing nothing
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 istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor 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, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis 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 istrue.: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:strict?(boolean/0) - If set to true, only the fields listed for a relationship inloadare loaded on it, as with thestrict?option toAsh.load/3. The default value isfalse.:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for 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:streamstrategy is chosen. See theAsh.stream!/2docs 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 istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs 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 toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true)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 isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif 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 wherereturn_records?: truewas provided. The default value isfalse.: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 isfalse.: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, orfalseif not set. Returning all errors may be expensive for large inserts. The default value istrue.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned.Potential elements:
{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{: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 totrueand all otherreturn_*?options are set tofalse.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 istrue.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen 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 totrue.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_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :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 is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Queues the import of a run whose dry run has reported
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 istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor 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, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis 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 istrue.: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:strict?(boolean/0) - If set to true, only the fields listed for a relationship inloadare loaded on it, as with thestrict?option toAsh.load/3. The default value isfalse.:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for 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:streamstrategy is chosen. See theAsh.stream!/2docs 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 istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs 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 toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true)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 isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif 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 wherereturn_records?: truewas provided. The default value isfalse.: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 isfalse.: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, orfalseif not set. Returning all errors may be expensive for large inserts. The default value istrue.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned.Potential elements:
{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{: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 totrueand all otherreturn_*?options are set tofalse.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 istrue.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen 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 totrue.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_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :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 is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.
Queues the import of a run whose dry run has reported
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 istrue.:timeout(timeout/0) - A positive integer, or:infinity. If none is provided, the timeout configured on the domain is used.:tracer(one or a list of module that adoptsAsh.Tracer) - A tracer that implements theAsh.Tracerbehaviour. See that module for more.:action(term/0) - The action to use, either an Action struct or the name of the action:authorize?- If an actor option is provided (even if it isnil), authorization happens automatically. If not, this flag can be used to authorize with no user.:context(map/0) - Context to set on the query, changeset, or input:tenant(value that implements theAsh.ToTenantprotocol) - A tenant to set on the query or changeset:as_of- A point in time to run the action "as of" (time travel). SeeAsh.Query.as_of/2.:actor(term/0) - If an actor is provided, it will be used in conjunction with the authorizers of a resource to authorize access:scope(term/0) - A value that implements theAsh.Scope.ToOptsprotocol, for passing around actor/tenant/context in a single value. SeeAsh.Scope.ToOptsfor 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, useAsh.Notifier.notify(notifications). It sends any notifications that can be sent, and returns the rest. The default value isfalse.:rollback_on_error?(boolean/0) - Whether or not to rollback the transaction on error, if the resource is in a transaction.
If the action hastransaction? falsethis 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 istrue.: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:strict?(boolean/0) - If set to true, only the fields listed for a relationship inloadare loaded on it, as with thestrict?option toAsh.load/3. The default value isfalse.:bulk_options(keyword/0) - Options passed toAsh.bulk_update, if a query, list, or stream of inputs is provided.:atomic_update(map/0) - A map of atomic updates to apply. SeeAsh.Changeset.atomic_update/3for 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:streamstrategy is chosen. See theAsh.stream!/2docs 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 istrue.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. SeeAsh.stream!/2docs for more. The default value is:keyset.:stream_with- The specific strategy to use to fetch records. SeeAsh.stream!/2docs 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 toSystem.schedulers_online() * 2:lock(term/0) - A lock statement to add onto the query:reuse_values?(boolean/0) - Iftrue, allow calculations to use attributes and other dependencies already on the struct instead of refetching from the data layer. Defaultfalse(prefer persisted data; avoids stale structs acting as an implicit cache).Ash.load!(user, :full_name, reuse_values?: true)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 isfalse.:select(list ofatom/0) - A select statement to apply to records. Ignored ifreturn_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. Usesauthorize_withif not set.:authorize_changeset_with- If set to:error, instead of filtering unauthorized changes, unauthorized changes will raise an appropriate forbidden error. Usesauthorize_withif 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 wherereturn_records?: truewas provided. The default value isfalse.: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 isfalse.: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, orfalseif not set. Returning all errors may be expensive for large inserts. The default value istrue.:batch_size(pos_integer/0) - The number of records to include in each batch. Defaults to thedefault_limitormax_page_sizeof the action, or 100.:return_stream?(boolean/0) - If set totrue, instead of anAsh.BulkResult, a mixed stream is returned.Potential elements:
{:notification, notification}- ifreturn_notifications?is set totrue{:ok, record}- ifreturn_records?is set totrue{: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 totrueand all otherreturn_*?options are set tofalse.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 istrue.:notify?(boolean/0) - Whether or not to generate any notifications. If this is set totruethen 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 totrue.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_transactionandafter_transactionhooks attached to changesets will have to be run inside the transaction if you choosetransaction: :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 is0.
:private_arguments(map/0) - Private argument values to set before validations and changes. The default value is%{}.