Back to Node Auth0

Class ConnectionsClient

docs/classes/management.SDK.ConnectionsClient-1.html

5.9.114.6 KB
Original Source

Class ConnectionsClient

Index

Accessors

directoryProvisioningscimConfigurationclientskeysusers

Constructors

constructor

Methods

listcreategetdeleteupdatecheckStatus

Properties

_options_directoryProvisioning_scimConfiguration_clients_keys_users

Accessors

directoryProvisioning

get directoryProvisioning(): DirectoryProvisioningClient

Returns DirectoryProvisioningClient

scimConfiguration

get scimConfiguration(): ScimConfigurationClient

Returns ScimConfigurationClient

clients

get clients(): ClientsClient

Returns ClientsClient

keys

get keys(): KeysClient

Returns KeysClient

users

get users(): UsersClient

Returns UsersClient

Constructors

constructor

new ConnectionsClient(options: BaseClientOptions): ConnectionsClient

Parameters

Returns ConnectionsClient

Methods

list

list(
request?: ListConnectionsQueryParameters,
requestOptions?: ConnectionsClient.RequestOptions,
): Promise<
Page<
ConnectionForList,
ListConnectionsCheckpointPaginatedResponseContent,
>,
>

Retrieves detailed list of all connections that match the specified strategy. If no strategy is provided, all connections within your tenant are retrieved. This action can accept a list of fields to include or exclude from the resulting list of connections.

This endpoint supports two types of pagination:

  • Offset pagination
  • Checkpoint pagination

Checkpoint pagination must be used if you need to retrieve more than 1000 connections.

Checkpoint Pagination

To search by checkpoint, use the following parameters:

  • from: Optional id from which to start selection.
  • take: The total amount of entries to retrieve when using the from parameter. Defaults to 50.

Note : The first time you call this endpoint using checkpoint pagination, omit the from parameter. If there are more results, a next value is included in the response. You can use this for subsequent API calls. When next is no longer included in the response, no pages are remaining.

Parameters

Request-specific configuration.

Returns Promise< Page< ConnectionForList, ListConnectionsCheckpointPaginatedResponseContent, >, >

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.TooManyRequestsError

Example

await client.connections.list({ from: "from", take: 1, strategy: ["ad"], name: "name", fields: "fields", include_fields: true })Copy

create

create(
request: CreateConnectionRequestContent,
requestOptions?: ConnectionsClient.RequestOptions,
): HttpResponsePromise<CreateConnectionResponseContent>

Creates a new connection according to the JSON object received in body.

Note: If a connection with the same name was recently deleted and had a large number of associated users, the deletion may still be processing. Creating a new connection with that name before the deletion completes may fail or produce unexpected results.

Parameters

Request-specific configuration.

Returns HttpResponsePromise<CreateConnectionResponseContent>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.ConflictError

Throws

Management.TooManyRequestsError

Example

await client.connections.create({ name: "name", strategy: "ad" })Copy

get

get(
id: string,
request?: GetConnectionRequestParameters,
requestOptions?: ConnectionsClient.RequestOptions,
): HttpResponsePromise<GetConnectionResponseContent>

Retrieve details for a specified connection along with options that can be used for identity provider configuration.

Parameters

  • id: string

The id of the connection to retrieve

Request-specific configuration.

Returns HttpResponsePromise<GetConnectionResponseContent>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.NotFoundError

Throws

Management.TooManyRequestsError

Example

await client.connections.get("id", { fields: "fields", include_fields: true })Copy

delete

delete(
id: string,
requestOptions?: ConnectionsClient.RequestOptions,
): HttpResponsePromise<void>

Removes a specific connection from your tenant. This action cannot be undone. Once removed, users can no longer use this connection to authenticate.

Note: If your connection has a large amount of users associated with it, please be aware that this operation can be long running after the response is returned and may impact concurrent create connection requests, if they use an identical connection name.

Parameters

  • id: string

The id of the connection to delete

Request-specific configuration.

Returns HttpResponsePromise<void>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.TooManyRequestsError

Example

await client.connections.delete("id")Copy

update

update(
id: string,
request?: UpdateConnectionRequestContent,
requestOptions?: ConnectionsClient.RequestOptions,
): HttpResponsePromise<UpdateConnectionResponseContent>

Update details for a specific connection, including option properties for identity provider configuration.

Note : If you use the options parameter, the entire options object is overriden. To avoid partial data or other issues, ensure all parameters are present when using this option.

Parameters

  • id: string

The id of the connection to update

Request-specific configuration.

Returns HttpResponsePromise<UpdateConnectionResponseContent>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.NotFoundError

Throws

Management.ConflictError

Throws

Management.TooManyRequestsError

Example

await client.connections.update("id")Copy

checkStatus

checkStatus(
id: string,
requestOptions?: ConnectionsClient.RequestOptions,
): HttpResponsePromise<void>

Retrieves the status of an ad/ldap connection referenced by its ID. 200 OK http status code response is returned when the connection is online, otherwise a 404 status code is returned along with an error message

Parameters

  • id: string

ID of the connection to check

Request-specific configuration.

Returns HttpResponsePromise<void>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.NotFoundError

Throws

Management.TooManyRequestsError

Example

await client.connections.checkStatus("id")Copy

Properties

Protected Readonly_options

_options: NormalizedClientOptionsWithAuth<BaseClientOptions>

Protected_directoryProvisioning

_directoryProvisioning: DirectoryProvisioningClient | undefined

Protected_scimConfiguration

_scimConfiguration: ScimConfigurationClient | undefined

Protected_clients

_clients: ClientsClient | undefined

Protected_keys

_keys: KeysClient | undefined

Protected_users

_users: UsersClient | undefined

Settings

Member Visibility

  • Protected
  • Inherited

ThemeOSLightDark

On This Page

Accessors directoryProvisioningscimConfigurationclientskeysusers Constructors constructor Methods listcreategetdeleteupdatecheckStatus Properties _options_directoryProvisioning_scimConfiguration_clients_keys_users