Class ActionsClient
- Namespace
- Auth0.ManagementApi
- Assembly
- Auth0.ManagementApi.dll
public class ActionsClient : IActionsClient
- Inheritance
-
ActionsClient
- Implements
- Inherited Members
- Extension Methods
Properties
Executions
public IExecutionsClient Executions { get; }
Property Value
Modules
public IModulesClient Modules { get; }
Property Value
Triggers
public ITriggersClient Triggers { get; }
Property Value
Versions
public IVersionsClient Versions { get; }
Property Value
Methods
CreateAsync(CreateActionRequestContent, RequestOptions?, CancellationToken)
Create an action. 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.
public WithRawResponseTask<CreateActionResponseContent> CreateAsync(CreateActionRequestContent request, RequestOptions? options = null, CancellationToken cancellationToken = default)
Parameters
requestCreateActionRequestContentoptionsRequestOptionscancellationTokenCancellationToken
Returns
Examples
await client.Actions.CreateAsync(
new CreateActionRequestContent
{
Name = "name",
SupportedTriggers = new List<ActionTrigger>()
{
new ActionTrigger { Id = ActionTriggerTypeEnum.PostLogin },
},
}
);
DeleteAsync(string, DeleteActionRequestParameters, RequestOptions?, CancellationToken)
Deletes an action and all of its associated versions. An action must be unbound from all triggers before it can be deleted.
public Task DeleteAsync(string id, DeleteActionRequestParameters request, RequestOptions? options = null, CancellationToken cancellationToken = default)
Parameters
idstringrequestDeleteActionRequestParametersoptionsRequestOptionscancellationTokenCancellationToken
Returns
Examples
await client.Actions.DeleteAsync("id", new DeleteActionRequestParameters { Force = true });
DeployAsync(string, RequestOptions?, CancellationToken)
Deploy an action. 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.
public WithRawResponseTask<DeployActionResponseContent> DeployAsync(string id, RequestOptions? options = null, CancellationToken cancellationToken = default)
Parameters
idstringoptionsRequestOptionscancellationTokenCancellationToken
Returns
Examples
await client.Actions.DeployAsync("id");
GetAsync(string, RequestOptions?, CancellationToken)
Retrieve an action by its ID.
public WithRawResponseTask<GetActionResponseContent> GetAsync(string id, RequestOptions? options = null, CancellationToken cancellationToken = default)
Parameters
idstringoptionsRequestOptionscancellationTokenCancellationToken
Returns
Examples
await client.Actions.GetAsync("id");
ListAsync(ListActionsRequestParameters, RequestOptions?, CancellationToken)
Retrieve all actions.
public Task<Pager<Action>> ListAsync(ListActionsRequestParameters request, RequestOptions? options = null, CancellationToken cancellationToken = default)
Parameters
requestListActionsRequestParametersoptionsRequestOptionscancellationTokenCancellationToken
Returns
Examples
await client.Actions.ListAsync(
new ListActionsRequestParameters
{
TriggerId = ActionTriggerTypeEnum.PostLogin,
ActionName = "actionName",
Deployed = true,
Page = 1,
PerPage = 1,
Installed = true,
}
);
TestAsync(string, TestActionRequestContent, RequestOptions?, CancellationToken)
Test an action. After updating an action, it can be tested prior to being deployed to ensure it behaves as expected.
public WithRawResponseTask<TestActionResponseContent> TestAsync(string id, TestActionRequestContent request, RequestOptions? options = null, CancellationToken cancellationToken = default)
Parameters
idstringrequestTestActionRequestContentoptionsRequestOptionscancellationTokenCancellationToken
Returns
Examples
await client.Actions.TestAsync(
"id",
new TestActionRequestContent
{
Payload = new Dictionary<string, object?>() { { "key", "value" } },
}
);
UpdateAsync(string, UpdateActionRequestContent, RequestOptions?, CancellationToken)
Update an existing action. If this action is currently bound to a trigger, updating it will not affect any user flows until the action is deployed.
public WithRawResponseTask<UpdateActionResponseContent> UpdateAsync(string id, UpdateActionRequestContent request, RequestOptions? options = null, CancellationToken cancellationToken = default)
Parameters
idstringrequestUpdateActionRequestContentoptionsRequestOptionscancellationTokenCancellationToken
Returns
Examples
await client.Actions.UpdateAsync("id", new UpdateActionRequestContent());