Interface IRulesClient
- Namespace
- Auth0.ManagementApi.Clients
- Assembly
- Auth0.ManagementApi.dll
public interface IRulesClient
Methods
CreateAsync(RuleCreateRequest, CancellationToken)
Creates a new rule according to the request.
Task<Rule> CreateAsync(RuleCreateRequest request, CancellationToken cancellationToken = default)
Parameters
request
RuleCreateRequestThe RuleCreateRequest containing the details of the rule to create.
cancellationToken
CancellationTokenThe cancellation token to cancel operation.
Returns
DeleteAsync(string, CancellationToken)
Deletes a rule.
Task DeleteAsync(string id, CancellationToken cancellationToken = default)
Parameters
id
stringThe ID of the rule to delete.
cancellationToken
CancellationTokenThe cancellation token to cancel operation.
Returns
GetAllAsync(GetRulesRequest, PaginationInfo, CancellationToken)
Retrieves a list of all rules.
Task<IPagedList<Rule>> GetAllAsync(GetRulesRequest request, PaginationInfo pagination = null, CancellationToken cancellationToken = default)
Parameters
request
GetRulesRequestSpecifies criteria to use when querying rules.
pagination
PaginationInfoSpecifies pagination info to use when requesting paged results.
cancellationToken
CancellationTokenThe cancellation token to cancel operation.
Returns
- Task<IPagedList<Rule>>
An IPagedList<T> containing the rules requested.
GetAsync(string, string, bool, CancellationToken)
Retrieves a rule by its ID.
Task<Rule> GetAsync(string id, string fields = null, bool includeFields = true, CancellationToken cancellationToken = default)
Parameters
id
stringThe ID of the rule to retrieve.
fields
stringA comma separated list of fields to include or exclude (depending on
includeFields
) from the result, empty to retrieve all fields.includeFields
boolTrue if the fields specified are to be included in the result, false otherwise (defaults to true).
cancellationToken
CancellationTokenThe cancellation token to cancel operation.
Returns
UpdateAsync(string, RuleUpdateRequest, CancellationToken)
Updates a rule.
Task<Rule> UpdateAsync(string id, RuleUpdateRequest request, CancellationToken cancellationToken = default)
Parameters
id
stringThe ID of the rule to update.
request
RuleUpdateRequestA RuleUpdateRequest containing the information to update.
cancellationToken
CancellationTokenThe cancellation token to cancel operation.