Interface IActionsClient
- Namespace
- Auth0.ManagementApi.Clients
- Assembly
- Auth0.ManagementApi.dll
public interface IActionsClient
Methods
CreateAsync(CreateActionRequest, CancellationToken)
Create an action.
Task<Action> CreateAsync(CreateActionRequest request, CancellationToken cancellationToken = default)
Parameters
request
CreateActionRequestSpecifies criteria to use when creating an action.
cancellationToken
CancellationTokenThe cancellation token to cancel operation.
Returns
Remarks
Once an action is created, it must be deployed, and then bound to a trigger before it will be executed as part of a flow.
DeleteAsync(string, DeleteActionRequest, CancellationToken)
Deletes an action and all of its associated versions.
Task DeleteAsync(string id, DeleteActionRequest request = null, CancellationToken cancellationToken = default)
Parameters
id
stringThe ID of the action to delete.
request
DeleteActionRequestSpecifies criteria to use when deleting an action.
cancellationToken
CancellationTokenThe cancellation token to cancel operation.
Returns
Remarks
An action must be unbound from all triggers before it can be deleted.
DeployAsync(string, CancellationToken)
Deploy an action.
Task<ActionVersion> DeployAsync(string id, CancellationToken cancellationToken = default)
Parameters
id
stringThe ID of the action to deploy.
cancellationToken
CancellationTokenThe cancellation token to cancel operation.
Returns
- Task<ActionVersion>
The action version that was created.
Remarks
Deploying an action will create a new immutable version of the action. If the action is currently bound to a trigger, then the system will begin executing the newly deployed version of the action immediately.Otherwise, the action will only be executed as a part of a flow once it is bound to that flow.
GetAllAsync(GetActionsRequest, PaginationInfo, CancellationToken)
Retrieve all actions.
Task<IPagedList<Action>> GetAllAsync(GetActionsRequest request, PaginationInfo pagination, CancellationToken cancellationToken = default)
Parameters
request
GetActionsRequestSpecifies criteria to use when querying actions.
pagination
PaginationInfoSpecifies pagination info to use.
cancellationToken
CancellationTokenThe cancellation token to cancel operation.
Returns
- Task<IPagedList<Action>>
An IPagedList<T> containing the actions.
GetAllTriggerBindingsAsync(string, PaginationInfo, CancellationToken)
Retrieve the actions that are bound to a trigger.
Task<IPagedList<TriggerBinding>> GetAllTriggerBindingsAsync(string triggerId, PaginationInfo pagination, CancellationToken cancellationToken = default)
Parameters
triggerId
stringAn actions extensibility point.
pagination
PaginationInfoSpecifies pagination info to use.
cancellationToken
CancellationTokenThe cancellation token to cancel operation.
Returns
- Task<IPagedList<TriggerBinding>>
The retrieved trigger bindings.
Remarks
Once an action is created and deployed, it must be attached (i.e. bound) to a trigger so that it will be executed as part of a flow. The list of actions returned reflects the order in which they will be executed during the appropriate flow.
GetAllTriggersAsync(CancellationToken)
Retrieve the set of triggers currently available within actions. A trigger is an extensibility point to which actions can be bound
Task<IList<Trigger>> GetAllTriggersAsync(CancellationToken cancellationToken = default)
Parameters
cancellationToken
CancellationTokenThe cancellation token to cancel operation.
Returns
GetAllVersionsAsync(string, PaginationInfo, CancellationToken)
Retrieve all versions of an action.
Task<IPagedList<ActionVersion>> GetAllVersionsAsync(string actionId, PaginationInfo pagination, CancellationToken cancellationToken = default)
Parameters
actionId
stringThe ID of the action.
pagination
PaginationInfoSpecifies pagination info to use.
cancellationToken
CancellationTokenThe cancellation token to cancel operation.
Returns
- Task<IPagedList<ActionVersion>>
The retrieved versions of the specified action.
Remarks
An action version is created whenever an action is deployed. An action version is immutable, once created.
GetAsync(string, CancellationToken)
Retrieve an action by its ID.
Task<Action> GetAsync(string id, CancellationToken cancellationToken = default)
Parameters
id
stringThe ID of the action to retrieve.
cancellationToken
CancellationTokenThe cancellation token to cancel operation.
Returns
GetExecutionAsync(string, CancellationToken)
Retrieve information about a specific execution of a trigger.
Task<ActionExecution> GetExecutionAsync(string id, CancellationToken cancellationToken = default)
Parameters
id
stringThe ID of the execution to retrieve.
cancellationToken
CancellationTokenThe cancellation token to cancel operation.
Returns
- Task<ActionExecution>
The retrieved execution.
Remarks
Relevant execution IDs will be included in tenant logs generated as part of that authentication flow. Executions will only be stored for 10 days after their creation.
GetVersionAsync(string, string, CancellationToken)
Retrieve a specific version of an action.
Task<ActionVersion> GetVersionAsync(string actionId, string versionId, CancellationToken cancellationToken = default)
Parameters
actionId
stringThe ID of the action.
versionId
stringThe ID of the action version.
cancellationToken
CancellationTokenThe cancellation token to cancel operation.
Returns
- Task<ActionVersion>
The retrieved version of the specified action.
Remarks
An action version is created whenever an action is deployed. An action version is immutable, once created.
RollbackToVersionAsync(string, string, CancellationToken)
Performs the equivalent of a roll-back of an action to an earlier, specified version.
Task<ActionVersion> RollbackToVersionAsync(string actionId, string versionId, CancellationToken cancellationToken = default)
Parameters
actionId
stringThe ID of the action.
versionId
stringThe ID of the version to deploy.
cancellationToken
CancellationTokenThe cancellation token to cancel operation.
Returns
- Task<ActionVersion>
A Task that represents the asynchronous delete operation.
Remarks
Creates a new, deployed action version that is identical to the specified version. If this action is currently bound to a trigger, the system will begin executing the newly-created version immediately.
UpdateAsync(string, UpdateActionRequest, CancellationToken)
Update an existing action.
Task<Action> UpdateAsync(string id, UpdateActionRequest request, CancellationToken cancellationToken = default)
Parameters
id
stringThe id of the action to update.
request
UpdateActionRequestSpecifies criteria to use when updating an action.
cancellationToken
CancellationTokenThe cancellation token to cancel operation.
Returns
Remarks
If this action is currently bound to a trigger, updating it will not affect any user flows until the action is deployed.
UpdateTriggerBindingsAsync(string, UpdateTriggerBindingsRequest, CancellationToken)
Update the actions that are bound (i.e. attached) to a trigger. Once an action is created and deployed, it must be attached(i.e.bound) to a trigger so that it will be executed as part of a flow. The order in which the actions are provided will determine the order in which they are executed.
Task<IList<TriggerBinding>> UpdateTriggerBindingsAsync(string triggerId, UpdateTriggerBindingsRequest request, CancellationToken cancellationToken = default)
Parameters
triggerId
stringAn actions extensibility point.
request
UpdateTriggerBindingsRequestSpecifies criteria to use when updating the trigger bindings.
cancellationToken
CancellationTokenThe cancellation token to cancel operation.
Returns
- Task<IList<TriggerBinding>>
The trigger bindings.