Tenant
Commands
add_user
apply
Apply a service.
Parameters:
--file, -f, --cli-input
--wait, -w
billing
config
Manage Tenant Settings
Send a series of new settings and even some to delete.
Returns:
| Name | Type | Description |
|---|---|---|
message |
dict
|
The message that the tenant settings were updated. |
Parameters:
name
positional
--setvar, -V
repeatable
--deletevar, -D
repeatable
create
Create Tenant.
Create a new tenant with a new body for a tenant.
Tenant Body
Contents of the tenant.yaml file
Create One Liner
Here is how to create a tenant in one line.
Returns:
| Name | Type | Description |
|---|---|---|
message |
dict
|
The message that the tenant was created |
Model: AddTenantRequest
{
"description": "AddTenantRequest",
"properties": {
"PlanID": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Planid"
},
"AccountName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Accountname"
},
"TenantId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Tenantid"
},
"ExistingK8sNamespace": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Existingk8Snamespace"
}
},
"title": "AddTenantRequest",
"type": "object"
}
Parameters:
--file, -f, --cli-input
delete
Delete Tenant
Delete a tenant by name. If delete protection is enabled, the delete
will fail unless --force is passed, which disables delete protection
first via set_metadata.
Returns:
| Name | Type | Description |
|---|---|---|
message |
dict
|
The message that the tenant was deleted. |
Parameters:
name
positional
--force, --force
dns_config
faults
Tenant Faults
Retrieves the list of faults for a tenant.
Returns:
| Name | Type | Description |
|---|---|---|
faults |
list
|
A list of faults. |
Parameters:
name
positional
find
Find a tenant.
Find a tenant by name or id. Passing in a name directly takes highest precedence. If a name is not passed in, the id is second highest precedence. Lastly if the global tenant name is set, that will be used.
The global tenant id takes care of the commandline. For other code, sometimes the id needs to be passed in directly. If this happens, that id takes most precedence.
Returns:
| Name | Type | Description |
|---|---|---|
tenant |
dict
|
The tenant. |
Parameters:
name
positional
get_metadata
List Tenant Metadata
Retrieve all typed metadata entries for a tenant.
Returns:
| Name | Type | Description |
|---|---|---|
metadata |
list
|
A list of metadata entry objects. |
Parameters:
name
positional
host_images
Available Duplo Host Images
Get the list of host images for the tenant. These AMI's are region scoped.
Returns:
| Name | Type | Description |
|---|---|---|
host_images |
list
|
A list of host images. |
Parameters:
name
positional
list
List Tenants
Retrieve a list of all tenants in the Duplo system.
Returns:
| Name | Type | Description |
|---|---|---|
tenants |
list
|
A list of tenants. |
list_users
List users assigned to a tenant
Retrieve a list of all users with access to a tenant
Returns:
| Name | Type | Description |
|---|---|---|
users |
list
|
A list of users with access to the tenants, their readonly status, and if they're an admin user |
Parameters:
name
positional
logging
Toggle Loggine
Enable or disable logging for a tenant.
Returns:
| Name | Type | Description |
|---|---|---|
message |
dict
|
The message that the tenant logging was toggled |
Parameters:
name
positional
--enable, -y
region
remove_user
set_metadata
Create and Delete Tenant Metadata
Create or update typed metadata entries and/or delete existing ones for a tenant. If a key already exists it is updated to the new value. Deletes are processed after creates/updates.
Basic CLI Use
# create a text entry
duploctl tenant set_metadata -T myenv --metadata featureFlag text enabled
# create a URL entry
duploctl tenant set_metadata -T myenv \
--metadata dashboard url https://internal.example.com
# delete an entry
duploctl tenant set_metadata -T myenv --delete featureFlag
# mixed create and delete in one call
duploctl tenant set_metadata -T myenv \
--metadata newKey text newValue \
--delete oldKey
Returns:
| Name | Type | Description |
|---|---|---|
changes |
dict
|
Summary with |
Raises:
| Type | Description |
|---|---|
DuploError
|
If a key to delete does not exist, or if the API returns an error during create/update. |
Parameters:
name
positional
--metadata, --metadata
--deletes, --delete
repeatable
shutdown
Shutdown Tenant
Shutdown a tenant by name and with a schedule.
Basic CLI Use
// Below command shutdown the tenant after 5 minutes (default)
duploctl tenant shutdown <tenant-name>
// Below command shutdown the tenant after given time 'minutes'(m), 'hours'(h) and 'day'(d) and it also support overriding the shutdown time.
duploctl tenant shutdown <tenant-name> <time) // Example: 5m, 2h, 1d
Returns:
| Name | Type | Description |
|---|---|---|
message |
dict
|
The message that the tenant was shutdown |
Parameters:
name
positional
--schedule, -s