Creates a tenant
POSThttps://apis.<domain>/iam/tenants
Creates a new tenant to be used in the policies that control permissions.
A tenant defines the scope of resources in a policy statement. Resources can be in more than one tenant.
When a tenant is created, the system also creates three policies associated with the new tenant,
one for each of the following roles: editor, viewer, and tenant admin.
You can optionally pass the skip_policies
flag set to true
to skip the creation of these policies.
Authorization Action:
iam:tenants:create
Request
- application/json
Body
required
id stringrequired
Unique ID. Cannot be changed.
name stringrequired
Name for the new tenant.
skipPolicies boolean
Boolean flag to skip adding policies associated with the tenant. Set to false by default.
Responses
- 200
- default
A successful response.
- application/json
- Schema
- Example (from schema)
Schema
tenant object
{
"name": "My Custom Tenant",
"id": "custom-tenant"
}
An unexpected error response.
- application/json
- Schema
- Example (from schema)
Schema
code int32
message string
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L -X POST 'https://apis.<domain>/iam/tenants' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"name": "My Custom Tenant",
"id": "custom-tenant",
"skip_policies": true
}'