WHAT YOU'LL LEARN
  • What methods are available on sdk.tenantManager?
  • What parameters each method accepts?
  • What each method returns?
USAGE EXAMPLES

See Using the Webiny SDK for end-to-end usage examples.

Overview
anchor

The TenantManagerSdk is accessed via sdk.tenantManager on a Webiny instance. It provides methods for creating, installing, enabling, and disabling tenants in a multi-tenant Webiny setup. All methods return a Result type — see the SDK overview for initialization and error handling details.

Methods
anchor

createTenant
anchor

Creates a new tenant in the system.

Signature:

Parameters:

ParameterTypeRequiredDescription
dataCreateTenantInputYesThe tenant data to create

installTenant
anchor

Installs and provisions a tenant with default settings and configurations.

Signature:

Parameters:

ParameterTypeRequiredDescription
tenantIdstringYesID of the tenant to install

disableTenant
anchor

Disables a tenant, preventing access to its resources.

Signature:

Parameters:

ParameterTypeRequiredDescription
tenantIdstringYesID of the tenant to disable

enableTenant
anchor

Re-enables a previously disabled tenant.

Signature:

Parameters:

ParameterTypeRequiredDescription
tenantIdstringYesID of the tenant to enable

getCurrentTenant
anchor

Returns the current tenant for the authenticated context.

Signature:

This method takes no parameters.