Table of Contents

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 IManagementConnection

IManagementConnection used to make all API calls.

baseUri Uri

Uri 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 ResourceServerCreateRequest

Contains the information for the resource server to create.

cancellationToken CancellationToken

The 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 string

The id of the resource server to delete.

cancellationToken CancellationToken

The cancellation token to cancel operation.

Returns

Task

A Task that represents the asynchronous delete operation.

GetAllAsync(PaginationInfo, CancellationToken)

Gets a list of all the resource servers.

public Task<IPagedList<ResourceServer>> GetAllAsync(PaginationInfo pagination = null, CancellationToken cancellationToken = default)

Parameters

pagination PaginationInfo

Specifies pagination info to use when requesting paged results.

cancellationToken CancellationToken

The 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 string

The identifier of the resource server.

cancellationToken CancellationToken

The 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 string

The id of the resource server to update.

request ResourceServerUpdateRequest

Contains the information for the resource server to update.

cancellationToken CancellationToken

The cancellation token to cancel operation.

Returns

Task<ResourceServer>

The newly updated ResourceServer.