Interface IConnectionsClient
- Namespace
- Auth0.ManagementApi.Clients
- Assembly
- Auth0.ManagementApi.dll
public interface IConnectionsClient
Methods
CheckStatusAsync(string, CancellationToken)
Retrieves the status of an ad/ldap connection.
Task CheckStatusAsync(string id, CancellationToken cancellationToken = default)
Parameters
id
stringID of the connection to check.
cancellationToken
CancellationTokenThe cancellation token to cancel operation.
Returns
CreateAsync(ConnectionCreateRequest, CancellationToken)
Creates a new connection according to the request.
Task<Connection> CreateAsync(ConnectionCreateRequest request, CancellationToken cancellationToken = default)
Parameters
request
ConnectionCreateRequestThe request containing the properties for the new connection.
cancellationToken
CancellationTokenThe cancellation token to cancel operation.
Returns
- Task<Connection>
A Connection containing the newly created Connection.
DeleteAsync(string, CancellationToken)
Deletes a connection and all its users.
Task DeleteAsync(string id, CancellationToken cancellationToken = default)
Parameters
id
stringThe id of the connection to delete.
cancellationToken
CancellationTokenThe cancellation token to cancel operation.
Returns
DeleteUserAsync(string, string, CancellationToken)
Deletes a specified connection user by its email
.
Task DeleteUserAsync(string id, string email, CancellationToken cancellationToken = default)
Parameters
id
stringThe identifier of the connection.
email
stringThe email of the user to delete.
cancellationToken
CancellationTokenThe cancellation token to cancel operation.
Returns
Remarks
Currently only database connections are supported and you cannot delete all users from specific connection.
GetAllAsync(GetConnectionsRequest, PaginationInfo, CancellationToken)
Retrieves every connection matching the specified strategy. All connections are retrieved if no strategy is being specified. Accepts a list of fields to include or exclude in the resulting list of connection objects.
Task<IPagedList<Connection>> GetAllAsync(GetConnectionsRequest request, PaginationInfo pagination = null, CancellationToken cancellationToken = default)
Parameters
request
GetConnectionsRequestSpecifies criteria to use when querying connections.
pagination
PaginationInfoSpecifies pagination info to use when requesting paged results.
cancellationToken
CancellationTokenThe cancellation token to cancel operation.
Returns
- Task<IPagedList<Connection>>
An IPagedList<T> containing the list of connections.
GetAsync(string, string, bool, CancellationToken)
Retrieves a connection by its id
.
Task<Connection> GetAsync(string id, string fields = null, bool includeFields = true, CancellationToken cancellationToken = default)
Parameters
id
stringThe id of the connection to retrieve.
fields
stringA comma separated list of fields to include or exclude (depending on include_fields) 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
- Task<Connection>
The Connection.
UpdateAsync(string, ConnectionUpdateRequest, CancellationToken)
Updates a connection.
Task<Connection> UpdateAsync(string id, ConnectionUpdateRequest request, CancellationToken cancellationToken = default)
Parameters
id
stringThe id of the connection to update.
request
ConnectionUpdateRequestThe ConnectionUpdateRequest containing the properties of the connection you wish to update.
cancellationToken
CancellationTokenThe cancellation token to cancel operation.
Returns
- Task<Connection>
The Connection that has been updated.