public class Tenants extends AbstractCoreBulkResources<TenantOrgRestRep> implements QuotaResources
Base URL: /tenants
| Constructor and Description |
|---|
Tenants(ViPRCoreClient parent,
RestClient client) |
| Modifier and Type | Method and Description |
|---|---|
TenantOrgRestRep |
create(TenantCreateParam input)
Creates a sub-tenant within the current tenant.
|
TenantOrgRestRep |
create(java.net.URI parentTenantId,
TenantCreateParam input)
Creates a sub-tenant within the given tenant.
|
Task<HostRestRep> |
createHost(java.net.URI tenantId,
HostCreateParam input)
Creates a host within the given tenant.
|
Task<HostRestRep> |
createHost(java.net.URI tenantId,
HostCreateParam input,
boolean validateConnection) |
TenantResponse |
current()
Gets the tenant for the current user.
|
java.net.URI |
currentId()
Gets the ID of the tenant for the current user.
|
void |
deactivate(java.net.URI id)
Deactivates the given tenant by ID.
|
java.util.List<TenantOrgRestRep> |
getAllSubtenants(java.net.URI parentId)
Gets the list of all sub-tenants for the given tenant.
|
java.util.List<TenantOrgRestRep> |
getAllSubtenants(java.net.URI parentId,
ResourceFilter<TenantOrgRestRep> filter)
Gets the list of all sub-tenants for the given tenant.
|
QuotaInfo |
getQuota(java.net.URI id)
Gets the quota information for a given resource by ID.
|
java.util.List<RoleAssignmentEntry> |
getRoleAssignments(java.net.URI id)
Get Role Assignments for the specified tenant.
|
SchedulePolicyList |
getSchedulePoliciesByTenant(java.net.URI id)
Gets the file policies for a given tenant.
|
java.util.List<NamedRelatedResourceRep> |
listSubtenants(java.net.URI parentId)
Lists the sub-tenants of the given tenant.
|
TenantOrgRestRep |
update(java.net.URI id,
TenantUpdateParam input)
Updates the given tenant by ID.
|
QuotaInfo |
updateQuota(java.net.URI id,
QuotaUpdateParam quota)
Updates the quota information for a given resource by ID.
|
java.util.List<RoleAssignmentEntry> |
updateRoleAssignments(java.net.URI id,
RoleAssignmentChanges roleChanges)
Update Role Assignments for the specified tenant.
|
Tenants |
withInactive(boolean inactive)
Configures the fetch operations to include inactive resources.
|
Tenants |
withInternal(boolean internal)
Configures the fetch operations to include internal resources.
|
getByIds, getByRefs, listBulkIdsaddTags, get, get, getByIds, getByRefs, getTags, performSearch, performSearchBy, removeTags, search, updateTagsequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetByIds, getByRefsaddTags, get, get, getTags, removeTags, search, updateTagspublic Tenants(ViPRCoreClient parent, RestClient client)
public Tenants withInactive(boolean inactive)
AbstractResourceswithInactive in class AbstractResources<TenantOrgRestRep>inactive - whether to include inactive resources.public Tenants withInternal(boolean internal)
AbstractResourceswithInternal in class AbstractResources<TenantOrgRestRep>internal - whether to include internal resources.public TenantResponse current()
API Call: GET /tenant
public java.net.URI currentId()
public TenantOrgRestRep create(TenantCreateParam input)
input - the tenant configuration.public TenantOrgRestRep create(java.net.URI parentTenantId, TenantCreateParam input)
API Call: POST /tenants/{parentTenantId}/subtenants
parentTenantId - the ID of the parent tenant.input - the tenant configuration.public Task<HostRestRep> createHost(java.net.URI tenantId, HostCreateParam input)
API Call: POST /tenants/{tenantId}/hosts
tenantId - the ID of the tenant.input - the create configuration.public Task<HostRestRep> createHost(java.net.URI tenantId, HostCreateParam input, boolean validateConnection)
public TenantOrgRestRep update(java.net.URI id, TenantUpdateParam input)
API Call: PUT /tenants/{id}
id - the ID of the tenant to update.input - the update configuration.public QuotaInfo getQuota(java.net.URI id)
QuotaResourcesAPI Call: GET baseUrl/{id}/quota
getQuota in interface QuotaResourcesid - the resource ID.public QuotaInfo updateQuota(java.net.URI id, QuotaUpdateParam quota)
QuotaResourcesAPI Call: PUT baseUrl/{id}/quota
updateQuota in interface QuotaResourcesid - the resource ID.quota - the update to the quota.public java.util.List<RoleAssignmentEntry> getRoleAssignments(java.net.URI id)
API Call: GET /tenants/{id}/role-assignments
id - the ID of the tenant.public java.util.List<RoleAssignmentEntry> updateRoleAssignments(java.net.URI id, RoleAssignmentChanges roleChanges)
API Call: PUT /tenants/{id}/role-assignments
id - the ID of the tenant.roleChanges - Role assignment changespublic java.util.List<NamedRelatedResourceRep> listSubtenants(java.net.URI parentId)
API Call: GET /tenants/{parentId}/subtenants
parentId - the ID of the parent tenant.public java.util.List<TenantOrgRestRep> getAllSubtenants(java.net.URI parentId)
parentId - the ID of the parent tenant.public java.util.List<TenantOrgRestRep> getAllSubtenants(java.net.URI parentId, ResourceFilter<TenantOrgRestRep> filter)
parentId - the ID of the parent tenant.filter - the resource filter to apply to the results as they are returned (optional).public void deactivate(java.net.URI id)
API Call: POST /vdc/tenants/{id}/deactivate
id - the ID of the tenant to deactivate.public SchedulePolicyList getSchedulePoliciesByTenant(java.net.URI id)
API Call: GET /tenants/{tenantId}/schedule-policies
id - the tenant id.