Diffo - TMF Service and Resource Management with a difference
Access - example Access domain
An example showing how TMF Services and Resources for a fictional Access domain can be extended from the Provider domain
Summary
Functions
relates the cable with an instance by assigning a pair
relates the cable with an instance by assigning a pair
relates the card with an instance by assigning a port
relates the card with an instance by assigning a port
relates the shelf with an instance by assigning a slot
relates the shelf with an instance by assigning a slot
creates a new Cable resource instance for build
creates a new Cable resource instance for build
creates a new Card resource instance for build
creates a new Card resource instance for build
creates a new Path resource instance for build
creates a new Path resource instance for build
creates a new Shelf resource instance for build
creates a new Shelf resource instance for build
Runs authorization checks for DiffoExample.Access.Cable.assign_pair
Runs authorization checks for DiffoExample.Access.Cable.assign_pair, returning a boolean.
Runs authorization checks for DiffoExample.Access.Card.assign_port
Runs authorization checks for DiffoExample.Access.Card.assign_port, returning a boolean.
Runs authorization checks for DiffoExample.Access.Shelf.assign_slot
Runs authorization checks for DiffoExample.Access.Shelf.assign_slot, returning a boolean.
Runs authorization checks for DiffoExample.Access.Cable.build
Runs authorization checks for DiffoExample.Access.Cable.build, returning a boolean.
Runs authorization checks for DiffoExample.Access.Card.build
Runs authorization checks for DiffoExample.Access.Card.build, returning a boolean.
Runs authorization checks for DiffoExample.Access.Path.build
Runs authorization checks for DiffoExample.Access.Path.build, returning a boolean.
Runs authorization checks for DiffoExample.Access.Shelf.build
Runs authorization checks for DiffoExample.Access.Shelf.build, returning a boolean.
Runs authorization checks for DiffoExample.Access.Cable.define
Runs authorization checks for DiffoExample.Access.Cable.define, returning a boolean.
Runs authorization checks for DiffoExample.Access.Card.define
Runs authorization checks for DiffoExample.Access.Card.define, returning a boolean.
Runs authorization checks for DiffoExample.Access.Path.define
Runs authorization checks for DiffoExample.Access.Path.define, returning a boolean.
Runs authorization checks for DiffoExample.Access.Shelf.define
Runs authorization checks for DiffoExample.Access.Shelf.define, returning a boolean.
Runs authorization checks for DiffoExample.Access.DslAccess.design_result
Runs authorization checks for DiffoExample.Access.DslAccess.design_result, returning a boolean.
Runs authorization checks for DiffoExample.Access.Cable.read
Runs authorization checks for DiffoExample.Access.Cable.read, returning a boolean.
Runs authorization checks for DiffoExample.Access.Card.read
Runs authorization checks for DiffoExample.Access.Card.read, returning a boolean.
Runs authorization checks for DiffoExample.Access.DslAccess.read
Runs authorization checks for DiffoExample.Access.DslAccess.read, returning a boolean.
Runs authorization checks for DiffoExample.Access.Path.read
Runs authorization checks for DiffoExample.Access.Path.read, returning a boolean.
Runs authorization checks for DiffoExample.Access.Shelf.read
Runs authorization checks for DiffoExample.Access.Shelf.read, returning a boolean.
Runs authorization checks for DiffoExample.Access.DslAccess.qualify
Runs authorization checks for DiffoExample.Access.DslAccess.qualify, returning a boolean.
Runs authorization checks for DiffoExample.Access.DslAccess.qualify_result
Runs authorization checks for DiffoExample.Access.DslAccess.qualify_result, returning a boolean.
Runs authorization checks for DiffoExample.Access.Cable.relate
Runs authorization checks for DiffoExample.Access.Cable.relate, returning a boolean.
Runs authorization checks for DiffoExample.Access.Card.relate
Runs authorization checks for DiffoExample.Access.Card.relate, returning a boolean.
Runs authorization checks for DiffoExample.Access.Path.relate
Runs authorization checks for DiffoExample.Access.Path.relate, returning a boolean.
Runs authorization checks for DiffoExample.Access.Shelf.relate
Runs authorization checks for DiffoExample.Access.Shelf.relate, returning a boolean.
Returns the changeset corresponding to the action.
Returns the changeset corresponding to the action.
Returns the changeset corresponding to the action.
Returns the changeset corresponding to the action.
Returns the changeset corresponding to the action.
Returns the changeset corresponding to the action.
Returns the changeset corresponding to the action.
Returns the changeset corresponding to the action.
Returns the changeset corresponding to the action.
Returns the changeset corresponding to the action.
Returns the changeset corresponding to the action.
Returns the changeset corresponding to the action.
Returns the changeset corresponding to the action.
Returns the changeset corresponding to the action.
Returns the changeset corresponding to the action.
Returns the changeset corresponding to the action.
Returns the changeset corresponding to the action.
Returns the changeset corresponding to the action.
defines the cable
defines the cable
defines the card
defines the card
defines the path
defines the path
defines the shelf
defines the shelf
updates the DSL Access service with the design
updates the DSL Access service with the design
read a service or resource instance
read a service or resource instance
read a service or resource instance
read a service or resource instance
read a service or resource instance
read a service or resource instance
read a service or resource instance
read a service or resource instance
read a service or resource instance
read a service or resource instance
creates a new DSL Access service instance for qualification
creates a new DSL Access service instance for qualification
updates the DSL Access service with qualification result
updates the DSL Access service with qualification result
Returns the query corresponding to the action.
Returns the query corresponding to the action.
Returns the query corresponding to the action.
Returns the query corresponding to the action.
Returns the query corresponding to the action.
relates the cable with other instances
relates the cable with other instances
relates the card with other instances
relates the card with other instances
relates the path with other instances
relates the path with other instances
relates the shelf with cards
relates the shelf with cards
Functions
relates the cable with an instance by assigning a pair
Inputs
- assignment
Options
:params(map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.:atomic_upgrade?(boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value 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:actor(term/0) - If an actor 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: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: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 is
false.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.See
Ash.Query.load/2.The default value is
false.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value 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 isfalse.: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 isfalse.: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%{}.
relates the cable with an instance by assigning a pair
Raises any errors instead of returning them
Inputs
- assignment
Options
:params(map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.:atomic_upgrade?(boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value 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:actor(term/0) - If an actor 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: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: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 is
false.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.See
Ash.Query.load/2.The default value is
false.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value 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 isfalse.: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 isfalse.: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%{}.
relates the card with an instance by assigning a port
Inputs
- assignment
Options
:params(map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.:atomic_upgrade?(boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value 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:actor(term/0) - If an actor 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: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: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 is
false.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.See
Ash.Query.load/2.The default value is
false.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value 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 isfalse.: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 isfalse.: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%{}.
relates the card with an instance by assigning a port
Raises any errors instead of returning them
Inputs
- assignment
Options
:params(map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.:atomic_upgrade?(boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value 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:actor(term/0) - If an actor 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: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: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 is
false.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.See
Ash.Query.load/2.The default value is
false.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value 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 isfalse.: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 isfalse.: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%{}.
relates the shelf with an instance by assigning a slot
Inputs
- assignment
Options
:params(map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.:atomic_upgrade?(boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value 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:actor(term/0) - If an actor 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: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: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 is
false.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.See
Ash.Query.load/2.The default value is
false.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value 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 isfalse.: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 isfalse.: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%{}.
relates the shelf with an instance by assigning a slot
Raises any errors instead of returning them
Inputs
- assignment
Options
:params(map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.:atomic_upgrade?(boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value 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:actor(term/0) - If an actor 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: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: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 is
false.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.See
Ash.Query.load/2.The default value is
false.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value 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 isfalse.: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 isfalse.: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 new Cable resource instance for build
Inputs
- id - a uuid4, unique to this instance, generated by default
- name - the name of this service or resource instance
- type - the type of the instance, either service or resource
- which - the which of the instance, either expected or actual
- relationships
- places
- parties
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:actor(term/0) - If an actor 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: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 isfalse.: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 isfalse.: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 new Cable resource instance for build
Raises any errors instead of returning them
Inputs
- id - a uuid4, unique to this instance, generated by default
- name - the name of this service or resource instance
- type - the type of the instance, either service or resource
- which - the which of the instance, either expected or actual
- relationships
- places
- parties
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:actor(term/0) - If an actor 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: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 isfalse.: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 isfalse.: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 new Card resource instance for build
Inputs
- id - a uuid4, unique to this instance, generated by default
- name - the name of this service or resource instance
- type - the type of the instance, either service or resource
- which - the which of the instance, either expected or actual
- relationships
- places
- parties
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:actor(term/0) - If an actor 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: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 isfalse.: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 isfalse.: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 new Card resource instance for build
Raises any errors instead of returning them
Inputs
- id - a uuid4, unique to this instance, generated by default
- name - the name of this service or resource instance
- type - the type of the instance, either service or resource
- which - the which of the instance, either expected or actual
- relationships
- places
- parties
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:actor(term/0) - If an actor 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: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 isfalse.: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 isfalse.: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 new Path resource instance for build
Inputs
- id - a uuid4, unique to this instance, generated by default
- name - the name of this service or resource instance
- type - the type of the instance, either service or resource
- which - the which of the instance, either expected or actual
- relationships
- places
- parties
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:actor(term/0) - If an actor 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: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 isfalse.: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 isfalse.: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 new Path resource instance for build
Raises any errors instead of returning them
Inputs
- id - a uuid4, unique to this instance, generated by default
- name - the name of this service or resource instance
- type - the type of the instance, either service or resource
- which - the which of the instance, either expected or actual
- relationships
- places
- parties
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:actor(term/0) - If an actor 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: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 isfalse.: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 isfalse.: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 new Shelf resource instance for build
Inputs
- id - a uuid4, unique to this instance, generated by default
- name - the name of this service or resource instance
- type - the type of the instance, either service or resource
- which - the which of the instance, either expected or actual
- relationships
- places
- parties
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:actor(term/0) - If an actor 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: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 isfalse.: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 isfalse.: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 new Shelf resource instance for build
Raises any errors instead of returning them
Inputs
- id - a uuid4, unique to this instance, generated by default
- name - the name of this service or resource instance
- type - the type of the instance, either service or resource
- which - the which of the instance, either expected or actual
- relationships
- places
- parties
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:actor(term/0) - If an actor 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: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 isfalse.: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 isfalse.: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 DiffoExample.Access.Cable.assign_pair
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be 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) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - 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: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.
Runs authorization checks for DiffoExample.Access.Cable.assign_pair, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to: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) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - 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: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.
Runs authorization checks for DiffoExample.Access.Card.assign_port
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to: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) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - 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: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.
Runs authorization checks for DiffoExample.Access.Card.assign_port, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to: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) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - 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: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.
Runs authorization checks for DiffoExample.Access.Shelf.assign_slot
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be 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) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - 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: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.
Runs authorization checks for DiffoExample.Access.Shelf.assign_slot, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to: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) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - 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: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.
Runs authorization checks for DiffoExample.Access.Cable.build
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to: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) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - 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: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.
Runs authorization checks for DiffoExample.Access.Cable.build, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to: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) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - 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: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.
Runs authorization checks for DiffoExample.Access.Card.build
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to: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) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - 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: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.
Runs authorization checks for DiffoExample.Access.Card.build, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to: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) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - 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: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.
Runs authorization checks for DiffoExample.Access.Path.build
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to: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) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - 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: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.
Runs authorization checks for DiffoExample.Access.Path.build, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to: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) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - 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: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.
Runs authorization checks for DiffoExample.Access.Shelf.build
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to: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) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - 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: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.
Runs authorization checks for DiffoExample.Access.Shelf.build, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to: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) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - 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: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.
Runs authorization checks for DiffoExample.Access.Cable.define
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to: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) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - 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: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.
Runs authorization checks for DiffoExample.Access.Cable.define, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to: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) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - 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: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.
Runs authorization checks for DiffoExample.Access.Card.define
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to: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) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - 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: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.
Runs authorization checks for DiffoExample.Access.Card.define, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to: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) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - 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: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.
Runs authorization checks for DiffoExample.Access.Path.define
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to: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) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - 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: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.
Runs authorization checks for DiffoExample.Access.Path.define, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to: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) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - 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: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.
Runs authorization checks for DiffoExample.Access.Shelf.define
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to: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) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - 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: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.
Runs authorization checks for DiffoExample.Access.Shelf.define, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to: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) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - 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: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.
Runs authorization checks for DiffoExample.Access.DslAccess.design_result
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be 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) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - 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: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.
Runs authorization checks for DiffoExample.Access.DslAccess.design_result, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to: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) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - 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: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.
Runs authorization checks for DiffoExample.Access.Cable.read
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to: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) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - 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: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.
Runs authorization checks for DiffoExample.Access.Cable.read, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to: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) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - 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: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.
Runs authorization checks for DiffoExample.Access.Card.read
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to: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) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - 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: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.
Runs authorization checks for DiffoExample.Access.Card.read, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to: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) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - 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: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.
Runs authorization checks for DiffoExample.Access.DslAccess.read
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to: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) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - 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: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.
Runs authorization checks for DiffoExample.Access.DslAccess.read, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to: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) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - 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: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.
Runs authorization checks for DiffoExample.Access.Path.read
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to: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) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - 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: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.
Runs authorization checks for DiffoExample.Access.Path.read, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to: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) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - 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: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.
Runs authorization checks for DiffoExample.Access.Shelf.read
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to: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) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - 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: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.
Runs authorization checks for DiffoExample.Access.Shelf.read, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to: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) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - 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: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.
Runs authorization checks for DiffoExample.Access.DslAccess.qualify
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be 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) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - 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: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.
Runs authorization checks for DiffoExample.Access.DslAccess.qualify, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to: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) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - 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: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.
Runs authorization checks for DiffoExample.Access.DslAccess.qualify_result
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be 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) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - 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: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.
Runs authorization checks for DiffoExample.Access.DslAccess.qualify_result, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to: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) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - 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: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.
Runs authorization checks for DiffoExample.Access.Cable.relate
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to: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) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - 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: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.
Runs authorization checks for DiffoExample.Access.Cable.relate, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to: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) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - 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: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.
Runs authorization checks for DiffoExample.Access.Card.relate
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to: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) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - 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: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.
Runs authorization checks for DiffoExample.Access.Card.relate, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to: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) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - 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: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.
Runs authorization checks for DiffoExample.Access.Path.relate
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to: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) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - 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: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.
Runs authorization checks for DiffoExample.Access.Path.relate, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to: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) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - 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: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.
Runs authorization checks for DiffoExample.Access.Shelf.relate
See Ash.can/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to: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) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - 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: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.
Runs authorization checks for DiffoExample.Access.Shelf.relate, returning a boolean.
See Ash.can?/3 for more information
Options
:maybe_is(term/0) - If the actor may be able to perform the action, what value should be returned. The default value is:maybe.:filter_with- If set to:error, the query will raise an error on a match. If set to: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) - Whether or not loaded data like aggregates, calculations and relationships should be checked in memory if possible, instead of querying. No effect ifpre_flight?isfalse. The default value isfalse.:pre_flight?(boolean/0) - 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: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.
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:actor(term/0) - If an actor 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:actor(term/0) - If an actor 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:actor(term/0) - If an actor 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:actor(term/0) - If an actor 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:actor(term/0) - If an actor 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:actor(term/0) - If an actor 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:actor(term/0) - If an actor 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:actor(term/0) - If an actor 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:actor(term/0) - If an actor 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:actor(term/0) - If an actor 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:actor(term/0) - If an actor 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:actor(term/0) - If an actor 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:actor(term/0) - If an actor 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:actor(term/0) - If an actor 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:actor(term/0) - If an actor 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:actor(term/0) - If an actor 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:actor(term/0) - If an actor 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:actor(term/0) - If an actor 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.
defines the cable
Inputs
- characteristic_value_updates
Options
:params(map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.:atomic_upgrade?(boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value 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:actor(term/0) - If an actor 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: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: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 is
false.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.See
Ash.Query.load/2.The default value is
false.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value 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 isfalse.: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 isfalse.: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%{}.
defines the cable
Raises any errors instead of returning them
Inputs
- characteristic_value_updates
Options
:params(map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.:atomic_upgrade?(boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value 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:actor(term/0) - If an actor 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: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: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 is
false.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.See
Ash.Query.load/2.The default value is
false.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value 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 isfalse.: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 isfalse.: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%{}.
defines the card
Inputs
- characteristic_value_updates
Options
:params(map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.:atomic_upgrade?(boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value 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:actor(term/0) - If an actor 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: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: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 is
false.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.See
Ash.Query.load/2.The default value is
false.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value 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 isfalse.: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 isfalse.: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%{}.
defines the card
Raises any errors instead of returning them
Inputs
- characteristic_value_updates
Options
:params(map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.:atomic_upgrade?(boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value 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:actor(term/0) - If an actor 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: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: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 is
false.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.See
Ash.Query.load/2.The default value is
false.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value 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 isfalse.: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 isfalse.: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%{}.
defines the path
Inputs
- characteristic_value_updates
Options
:params(map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.:atomic_upgrade?(boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value 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:actor(term/0) - If an actor 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: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: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 is
false.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.See
Ash.Query.load/2.The default value is
false.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value 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 isfalse.: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 isfalse.: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%{}.
defines the path
Raises any errors instead of returning them
Inputs
- characteristic_value_updates
Options
:params(map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.:atomic_upgrade?(boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value 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:actor(term/0) - If an actor 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: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: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 is
false.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.See
Ash.Query.load/2.The default value is
false.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value 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 isfalse.: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 isfalse.: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%{}.
defines the shelf
Inputs
- characteristic_value_updates
Options
:params(map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.:atomic_upgrade?(boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value 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:actor(term/0) - If an actor 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: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: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 is
false.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.See
Ash.Query.load/2.The default value is
false.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value 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 isfalse.: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 isfalse.: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%{}.
defines the shelf
Raises any errors instead of returning them
Inputs
- characteristic_value_updates
Options
:params(map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.:atomic_upgrade?(boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value 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:actor(term/0) - If an actor 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: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: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 is
false.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.See
Ash.Query.load/2.The default value is
false.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value 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 isfalse.: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 isfalse.: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%{}.
updates the DSL Access service with the design
Inputs
- characteristic_value_updates
Options
:params(map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.:atomic_upgrade?(boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value 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:actor(term/0) - If an actor 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: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: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 is
false.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.See
Ash.Query.load/2.The default value is
false.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value 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 isfalse.: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 isfalse.: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%{}.
updates the DSL Access service with the design
Raises any errors instead of returning them
Inputs
- characteristic_value_updates
Options
:params(map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.:atomic_upgrade?(boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value 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:actor(term/0) - If an actor 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: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: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 is
false.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.See
Ash.Query.load/2.The default value is
false.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value 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 isfalse.: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 isfalse.: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%{}.
read a service or resource instance
Options
: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) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.: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.
read a service or resource instance
Raises any errors instead of returning them
Options
: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) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.: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.
read a service or resource instance
Options
: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) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.: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.
read a service or resource instance
Raises any errors instead of returning them
Options
: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) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.: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.
read a service or resource instance
Options
: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) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.: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.
read a service or resource instance
Raises any errors instead of returning them
Options
: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) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.: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.
read a service or resource instance
Options
: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) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.: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.
read a service or resource instance
Raises any errors instead of returning them
Options
: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) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.: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.
read a service or resource instance
Options
: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) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.: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.
read a service or resource instance
Raises any errors instead of returning them
Options
: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) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.: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.
creates a new DSL Access service instance for qualification
Inputs
- id - a uuid4, unique to this instance, generated by default
- name - the name of this service or resource instance
- type - the type of the instance, either service or resource
- which - the which of the instance, either expected or actual
- places
- parties
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:actor(term/0) - If an actor 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: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 isfalse.: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 isfalse.: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 new DSL Access service instance for qualification
Raises any errors instead of returning them
Inputs
- id - a uuid4, unique to this instance, generated by default
- name - the name of this service or resource instance
- type - the type of the instance, either service or resource
- which - the which of the instance, either expected or actual
- places
- parties
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:actor(term/0) - If an actor 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: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 isfalse.: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 isfalse.: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%{}.
updates the DSL Access service with qualification result
Inputs
- places
- service_operating_status - the service operating status, if this instance is a service
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:actor(term/0) - If an actor 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: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: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 is
false.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.See
Ash.Query.load/2.The default value is
false.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value 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 isfalse.: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 isfalse.: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%{}.
updates the DSL Access service with qualification result
Raises any errors instead of returning them
Inputs
- places
- service_operating_status - the service operating status, if this instance is a service
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:actor(term/0) - If an actor 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: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: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 is
false.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.See
Ash.Query.load/2.The default value is
false.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value 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 isfalse.: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 isfalse.: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
: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
: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
: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
: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
: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.
relates the cable with other instances
Inputs
- relationships
Options
:params(map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.:atomic_upgrade?(boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value 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:actor(term/0) - If an actor 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: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: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 is
false.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.See
Ash.Query.load/2.The default value is
false.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value 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 isfalse.: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 isfalse.: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%{}.
relates the cable with other instances
Raises any errors instead of returning them
Inputs
- relationships
Options
:params(map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.:atomic_upgrade?(boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value 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:actor(term/0) - If an actor 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: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: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 is
false.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.See
Ash.Query.load/2.The default value is
false.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value 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 isfalse.: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 isfalse.: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%{}.
relates the card with other instances
Inputs
- relationships
Options
:params(map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.:atomic_upgrade?(boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value 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:actor(term/0) - If an actor 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: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: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 is
false.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.See
Ash.Query.load/2.The default value is
false.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value 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 isfalse.: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 isfalse.: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%{}.
relates the card with other instances
Raises any errors instead of returning them
Inputs
- relationships
Options
:params(map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.:atomic_upgrade?(boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value 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:actor(term/0) - If an actor 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: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: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 is
false.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.See
Ash.Query.load/2.The default value is
false.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value 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 isfalse.: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 isfalse.: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%{}.
relates the path with other instances
Inputs
- relationships
Options
:params(map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.:atomic_upgrade?(boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value 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:actor(term/0) - If an actor 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: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: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 is
false.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.See
Ash.Query.load/2.The default value is
false.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value 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 isfalse.: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 isfalse.: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%{}.
relates the path with other instances
Raises any errors instead of returning them
Inputs
- relationships
Options
:params(map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.:atomic_upgrade?(boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value 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:actor(term/0) - If an actor 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: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: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 is
false.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.See
Ash.Query.load/2.The default value is
false.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value 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 isfalse.: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 isfalse.: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%{}.
relates the shelf with cards
Inputs
- relationships
Options
:params(map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.:atomic_upgrade?(boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value 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:actor(term/0) - If an actor 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: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: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 is
false.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.See
Ash.Query.load/2.The default value is
false.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value 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 isfalse.: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 isfalse.: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%{}.
relates the shelf with cards
Raises any errors instead of returning them
Inputs
- relationships
Options
:params(map/0) - Parameters to supply, ignored if the input is a changeset, only used when an identifier is given.:atomic_upgrade?(boolean/0) - If true the action will be done atomically if it can (and is configured to do so), ignoring the in memory transformations and validations. You should not generally need to disable this. The default value 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:actor(term/0) - If an actor 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: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: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 is
false.:reuse_values?(boolean/0) - Whether calculations are allowed to reuse values that have already been loaded, or must refetch them from the data layer. The default value isfalse.:strict?(boolean/0) - If set to true, only specified attributes will be loaded when passing a list of fields to fetch on a relationship, which allows for more optimized data-fetching.See
Ash.Query.load/2.The default value is
false.:authorize_with- If set to:error, instead of applying authorization filters as a filter, any records not matching the authorization filter will cause an error to be returned. The default value is:filter.:read_action(atom/0) - The action to use when building the read query.:assume_casted?(boolean/0) - Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting The default value 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 isfalse.: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 isfalse.: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%{}.