Back to Node Auth0

Class EncryptionClient

docs/classes/management.SDK.EncryptionClient.html

5.9.111.3 KB
Original Source

Class EncryptionClient

Index

Constructors

constructor

Methods

listcreaterekeygetimportdeletecreatePublicWrappingKey

Properties

_options

Constructors

constructor

new EncryptionClient(options: BaseClientOptions): EncryptionClient

Parameters

Returns EncryptionClient

Methods

list

list(
request?: ListEncryptionKeysRequestParameters,
requestOptions?: EncryptionClient.RequestOptions,
): Promise<
Page<EncryptionKey, ListEncryptionKeyOffsetPaginatedResponseContent>,
>

Retrieve details of all the encryption keys associated with your tenant.

Parameters

Request-specific configuration.

Returns Promise<Page<EncryptionKey, ListEncryptionKeyOffsetPaginatedResponseContent>>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.TooManyRequestsError

Example

await client.keys.encryption.list({ page: 1, per_page: 1, include_totals: true })Copy

create

create(
request: CreateEncryptionKeyRequestContent,
requestOptions?: EncryptionClient.RequestOptions,
): HttpResponsePromise<CreateEncryptionKeyResponseContent>

Create the new, pre-activated encryption key, without the key material.

Parameters

Request-specific configuration.

Returns HttpResponsePromise<CreateEncryptionKeyResponseContent>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.ConflictError

Throws

Management.TooManyRequestsError

Example

await client.keys.encryption.create({ type: "customer-provided-root-key" })Copy

rekey

rekey(
requestOptions?: EncryptionClient.RequestOptions,
): HttpResponsePromise<void>

Perform rekeying operation on the key hierarchy.

Parameters

Request-specific configuration.

Returns HttpResponsePromise<void>

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.TooManyRequestsError

Example

await client.keys.encryption.rekey()Copy

get

get(
kid: string,
requestOptions?: EncryptionClient.RequestOptions,
): HttpResponsePromise<GetEncryptionKeyResponseContent>

Retrieve details of the encryption key with the given ID.

Parameters

  • kid: string

Encryption key ID

Request-specific configuration.

Returns HttpResponsePromise<GetEncryptionKeyResponseContent>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.NotFoundError

Throws

Management.TooManyRequestsError

Example

await client.keys.encryption.get("kid")Copy

import

import(
kid: string,
request: ImportEncryptionKeyRequestContent,
requestOptions?: EncryptionClient.RequestOptions,
): HttpResponsePromise<ImportEncryptionKeyResponseContent>

Import wrapped key material and activate encryption key.

Parameters

  • kid: string

Encryption key ID

Request-specific configuration.

Returns HttpResponsePromise<ImportEncryptionKeyResponseContent>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.ConflictError

Throws

Management.TooManyRequestsError

Example

await client.keys.encryption.import("kid", { wrapped_key: "wrapped_key" })Copy

delete

delete(
kid: string,
requestOptions?: EncryptionClient.RequestOptions,
): HttpResponsePromise<void>

Delete the custom provided encryption key with the given ID and move back to using native encryption key.

Parameters

  • kid: string

Encryption key ID

Request-specific configuration.

Returns HttpResponsePromise<void>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.TooManyRequestsError

Example

await client.keys.encryption.delete("kid")Copy

createPublicWrappingKey

createPublicWrappingKey(
kid: string,
requestOptions?: EncryptionClient.RequestOptions,
): HttpResponsePromise<CreateEncryptionKeyPublicWrappingResponseContent>

Create the public wrapping key to wrap your own encryption key material.

Parameters

  • kid: string

Encryption key ID

Request-specific configuration.

Returns HttpResponsePromise<CreateEncryptionKeyPublicWrappingResponseContent>

Throws

Management.BadRequestError

Throws

Management.UnauthorizedError

Throws

Management.ForbiddenError

Throws

Management.ConflictError

Throws

Management.TooManyRequestsError

Example

await client.keys.encryption.createPublicWrappingKey("kid")Copy

Properties

Protected Readonly_options

_options: NormalizedClientOptionsWithAuth<BaseClientOptions>

Settings

Member Visibility

  • Protected
  • Inherited

ThemeOSLightDark

On This Page

Constructors constructor Methods listcreaterekeygetimportdeletecreatePublicWrappingKey Properties _options