Class ResourceServersClient
- Namespace
- Auth0.ManagementApi.Clients
- Assembly
- Auth0.ManagementApi.dll
Contains methods to access the /resource-server endpoints.
public class ResourceServersClient : BaseClient, IResourceServersClient
- Inheritance
-
ResourceServersClient
- Implements
- Inherited Members
Constructors
ResourceServersClient(IManagementConnection, Uri, IDictionary<string, string>)
Creates a new instance of ResourceServersClient.
public ResourceServersClient(IManagementConnection connection, Uri baseUri, IDictionary<string, string> defaultHeaders)
Parameters
connection
IManagementConnectionIManagementConnection used to make all API calls.
baseUri
UriUri of the endpoint to use in making API calls.
defaultHeaders
IDictionary<string, string>Dictionary containing default headers included with every request this client makes.
Methods
CreateAsync(ResourceServerCreateRequest, CancellationToken)
Creates a new resource server.
public Task<ResourceServer> CreateAsync(ResourceServerCreateRequest request, CancellationToken cancellationToken = default)
Parameters
request
ResourceServerCreateRequestContains the information for the resource server to create.
cancellationToken
CancellationTokenThe cancellation token to cancel operation.
Returns
- Task<ResourceServer>
The newly created ResourceServer.
DeleteAsync(string, CancellationToken)
Deletes a resource server.
public Task DeleteAsync(string id, CancellationToken cancellationToken = default)
Parameters
id
stringThe id of the resource server to delete.
cancellationToken
CancellationTokenThe cancellation token to cancel operation.
Returns
GetAllAsync(PaginationInfo, CancellationToken)
Gets a list of all the resource servers.
public Task<IPagedList<ResourceServer>> GetAllAsync(PaginationInfo pagination = null, CancellationToken cancellationToken = default)
Parameters
pagination
PaginationInfoSpecifies pagination info to use when requesting paged results.
cancellationToken
CancellationTokenThe cancellation token to cancel operation.
Returns
- Task<IPagedList<ResourceServer>>
A IPagedList<T> containing the list of resource servers.
GetAsync(string, CancellationToken)
Get a resource server by its id.
public Task<ResourceServer> GetAsync(string id, CancellationToken cancellationToken = default)
Parameters
id
stringThe identifier of the resource server.
cancellationToken
CancellationTokenThe cancellation token to cancel operation.
Returns
- Task<ResourceServer>
The ResourceServer that was requested.
UpdateAsync(string, ResourceServerUpdateRequest, CancellationToken)
Updates a resource server,
public Task<ResourceServer> UpdateAsync(string id, ResourceServerUpdateRequest request, CancellationToken cancellationToken = default)
Parameters
id
stringThe id of the resource server to update.
request
ResourceServerUpdateRequestContains the information for the resource server to update.
cancellationToken
CancellationTokenThe cancellation token to cancel operation.
Returns
- Task<ResourceServer>
The newly updated ResourceServer.