Create
Creates a new tenant.
Parameters
ctx
- The context of the request.
tenant
- An object that contains the information about the tenant. The payload is defined below.
Payload
Key
- A unique id by which Permit will identify the tenant. The tenant key must be url-friendly (slugified).
Name
- A descriptive name for the tenant.
Description
- optional - A longer description of the tenant.
Attributes
- optional - Arbitraty tenant attributes that will be used to enforce attribute-based access control policies.
tenantCreate := models.NewTenantCreate("tenant-key", "tenant-name")
tenantCreate.SetName("tenant-name-new")
Implementation
tenant, err := Permit.Api.Tenants.Create(ctx, *tenantCreate)