public class TenantsImpl extends BaseResource implements Tenants, Properties
| Constructor and Description |
|---|
TenantsImpl(javax.ws.rs.client.WebTarget web,
Authentication auth) |
| Modifier and Type | Method and Description |
|---|---|
void |
createProperty(String tenant,
TenantInfo config)
Create a new property.
|
void |
createTenant(String tenant,
TenantInfo config)
Create a new tenant.
|
void |
deleteProperty(String tenant)
Delete an existing property.
|
void |
deleteTenant(String tenant)
Delete an existing tenant.
|
List<String> |
getProperties()
Get the list of properties.
|
TenantInfo |
getPropertyAdmin(String tenant)
Get the config of the property.
|
TenantInfo |
getTenantInfo(String tenant)
Get the config of the tenant.
|
List<String> |
getTenants()
Get the list of tenants.
|
javax.ws.rs.client.WebTarget |
getWebTarget() |
void |
updateProperty(String tenant,
TenantInfo config)
Update the admins for a property.
|
void |
updateTenant(String tenant,
TenantInfo config)
Update the admins for a tenant.
|
asyncDeleteRequest, asyncGetRequest, asyncPostRequest, asyncPutRequest, getApiException, requestpublic TenantsImpl(javax.ws.rs.client.WebTarget web,
Authentication auth)
public List<String> getTenants() throws PulsarAdminException
TenantsResponse Example:
["my-tenant", "other-tenant", "third-tenant"]
getTenants in interface TenantsPulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException - Unexpected errorpublic TenantInfo getTenantInfo(String tenant) throws PulsarAdminException
TenantsGet the admin configuration for a given tenant.
getTenantInfo in interface Tenantstenant - Tenant namePulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException.NotFoundException - Tenant does not existPulsarAdminException - Unexpected errorpublic void createTenant(String tenant, TenantInfo config) throws PulsarAdminException
TenantsProvisions a new tenant. This operation requires Pulsar super-user privileges.
createTenant in interface Tenantstenant - Tenant nameconfig - Config dataPulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException.ConflictException - Tenant already existsPulsarAdminException.PreconditionFailedException - Tenant name is not validPulsarAdminException - Unexpected errorpublic void updateTenant(String tenant, TenantInfo config) throws PulsarAdminException
TenantsThis operation requires Pulsar super-user privileges.
updateTenant in interface Tenantstenant - Tenant nameconfig - Config dataPulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException.NotFoundException - Tenant does not existPulsarAdminException - Unexpected errorpublic void deleteTenant(String tenant) throws PulsarAdminException
TenantsDelete a tenant and all namespaces and topics under it.
deleteTenant in interface Tenantstenant - Tenant namePulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException.NotFoundException - The tenant does not existPulsarAdminException.ConflictException - The tenant still has active namespacesPulsarAdminException - Unexpected errorpublic void createProperty(String tenant, TenantInfo config) throws PulsarAdminException
PropertiesProvisions a new property. This operation requires Pulsar super-user privileges.
createProperty in interface Propertiestenant - Property nameconfig - Config dataPulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException.ConflictException - Property already existsPulsarAdminException.PreconditionFailedException - Property name is not validPulsarAdminException - Unexpected errorpublic void updateProperty(String tenant, TenantInfo config) throws PulsarAdminException
PropertiesThis operation requires Pulsar super-user privileges.
updateProperty in interface Propertiestenant - Property nameconfig - Config dataPulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException.NotFoundException - Property does not existPulsarAdminException - Unexpected errorpublic void deleteProperty(String tenant) throws PulsarAdminException
PropertiesDelete a property and all namespaces and topics under it.
deleteProperty in interface Propertiestenant - Property namePulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException.NotFoundException - The property does not existPulsarAdminException.ConflictException - The property still has active namespacesPulsarAdminException - Unexpected errorpublic List<String> getProperties() throws PulsarAdminException
PropertiesGet the list of all the properties.
Response Example:
["my-property", "other-property", "third-property"]
getProperties in interface PropertiesPulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException - Unexpected errorpublic TenantInfo getPropertyAdmin(String tenant) throws PulsarAdminException
PropertiesGet the admin configuration for a given property.
getPropertyAdmin in interface Propertiestenant - Property namePulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException.NotFoundException - Property does not existPulsarAdminException - Unexpected errorpublic javax.ws.rs.client.WebTarget getWebTarget()
Copyright © 2017–2018 Apache Software Foundation. All rights reserved.