Back to Node Auth0

Class SecretsClient

docs/classes/management.SDK.SecretsClient.html

5.9.16.9 KB
Original Source

Class SecretsClient

Index

Constructors

constructor

Methods

getcreatedeleteupdate

Properties

_options

Constructors

constructor

new SecretsClient(options: BaseClientOptions): SecretsClient

Parameters

Returns SecretsClient

Methods

get

get(
id: string,
requestOptions?: SecretsClient.RequestOptions,
): HttpResponsePromise<GetHookSecretResponseContent>

Retrieve a hook's secrets by the ID of the hook.

Parameters

  • id: string

ID of the hook to retrieve secrets from.

Request-specific configuration.

Returns HttpResponsePromise<GetHookSecretResponseContent>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.NotFoundError

Throws

Management.TooManyRequestsError

Example

await client.hooks.secrets.get("id")Copy

create

create(
id: string,
request: CreateHookSecretRequestContent,
requestOptions?: SecretsClient.RequestOptions,
): HttpResponsePromise<void>

Add one or more secrets to an existing hook. Accepts an object of key-value pairs, where the key is the name of the secret. A hook can have a maximum of 20 secrets.

Parameters

  • id: string

The id of the hook to retrieve

Request-specific configuration.

Returns HttpResponsePromise<void>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.ConflictError

Throws

Management.TooManyRequestsError

Example

await client.hooks.secrets.create("id", { "key": "value" })Copy

delete

delete(
id: string,
request: DeleteHookSecretRequestContent,
requestOptions?: SecretsClient.RequestOptions,
): HttpResponsePromise<void>

Delete one or more existing secrets for a given hook. Accepts an array of secret names to delete.

Parameters

  • id: string

ID of the hook whose secrets to delete.

Request-specific configuration.

Returns HttpResponsePromise<void>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.TooManyRequestsError

Example

await client.hooks.secrets.delete("id", ["string"])Copy

update

update(
id: string,
request: UpdateHookSecretRequestContent,
requestOptions?: SecretsClient.RequestOptions,
): HttpResponsePromise<void>

Update one or more existing secrets for an existing hook. Accepts an object of key-value pairs, where the key is the name of the existing secret.

Parameters

  • id: string

ID of the hook whose secrets to update.

Request-specific configuration.

Returns HttpResponsePromise<void>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.NotFoundError

Throws

Management.ConflictError

Throws

Management.TooManyRequestsError

Example

await client.hooks.secrets.update("id", { "key": "value" })Copy

Properties

Protected Readonly_options

_options: NormalizedClientOptionsWithAuth<BaseClientOptions>

Settings

Member Visibility

  • Protected
  • Inherited

ThemeOSLightDark

On This Page

Constructors constructor Methods getcreatedeleteupdate Properties _options