public class TenantsImpl extends BaseResource implements Tenants, Properties
auth, readTimeoutMs| Constructor and Description |
|---|
TenantsImpl(javax.ws.rs.client.WebTarget web,
org.apache.pulsar.client.api.Authentication auth,
long readTimeoutMs) |
| Modifier and Type | Method and Description |
|---|---|
void |
createProperty(String tenant,
org.apache.pulsar.common.policies.data.TenantInfo config)
Create a new property.
|
void |
createTenant(String tenant,
org.apache.pulsar.common.policies.data.TenantInfo config)
Create a new tenant.
|
CompletableFuture<Void> |
createTenantAsync(String tenant,
org.apache.pulsar.common.policies.data.TenantInfo config)
Create a new tenant asynchronously.
|
void |
deleteProperty(String tenant)
Delete an existing property.
|
void |
deleteTenant(String tenant)
Delete an existing tenant.
|
CompletableFuture<Void> |
deleteTenantAsync(String tenant)
Delete an existing tenant asynchronously.
|
List<String> |
getProperties()
Get the list of properties.
|
org.apache.pulsar.common.policies.data.TenantInfo |
getPropertyAdmin(String tenant)
Get the config of the property.
|
org.apache.pulsar.common.policies.data.TenantInfo |
getTenantInfo(String tenant)
Get the config of the tenant.
|
CompletableFuture<org.apache.pulsar.common.policies.data.TenantInfo> |
getTenantInfoAsync(String tenant)
Get the config of the tenant asynchronously.
|
List<String> |
getTenants()
Get the list of tenants.
|
CompletableFuture<List<String>> |
getTenantsAsync()
Get the list of tenants asynchronously.
|
javax.ws.rs.client.WebTarget |
getWebTarget() |
void |
updateProperty(String tenant,
org.apache.pulsar.common.policies.data.TenantInfo config)
Update the admins for a property.
|
void |
updateTenant(String tenant,
org.apache.pulsar.common.policies.data.TenantInfo config)
Update the admins for a tenant.
|
CompletableFuture<Void> |
updateTenantAsync(String tenant,
org.apache.pulsar.common.policies.data.TenantInfo config)
Update the admins for a tenant asynchronously.
|
asyncDeleteRequest, asyncGetRequest, asyncPostRequest, asyncPutRequest, getApiException, getApiException, request, requestAsyncpublic TenantsImpl(javax.ws.rs.client.WebTarget web,
org.apache.pulsar.client.api.Authentication auth,
long readTimeoutMs)
public List<String> getTenants() throws PulsarAdminException
Tenants
["my-tenant", "other-tenant", "third-tenant"]
getTenants in interface TenantsPulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException - Unexpected errorpublic CompletableFuture<List<String>> getTenantsAsync()
Tenants
["my-tenant", "other-tenant", "third-tenant"]
getTenantsAsync in interface Tenantspublic org.apache.pulsar.common.policies.data.TenantInfo getTenantInfo(String tenant) throws PulsarAdminException
TenantsgetTenantInfo in interface Tenantstenant - Tenant namePulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException.NotFoundException - Tenant does not existPulsarAdminException - Unexpected errorpublic CompletableFuture<org.apache.pulsar.common.policies.data.TenantInfo> getTenantInfoAsync(String tenant)
TenantsgetTenantInfoAsync in interface Tenantstenant - Tenant namepublic void createTenant(String tenant, org.apache.pulsar.common.policies.data.TenantInfo config) throws PulsarAdminException
TenantscreateTenant 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 CompletableFuture<Void> createTenantAsync(String tenant, org.apache.pulsar.common.policies.data.TenantInfo config)
TenantscreateTenantAsync in interface Tenantstenant - Tenant nameconfig - Config datapublic void updateTenant(String tenant, org.apache.pulsar.common.policies.data.TenantInfo config) throws PulsarAdminException
TenantsupdateTenant in interface Tenantstenant - Tenant nameconfig - Config dataPulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException.NotFoundException - Tenant does not existPulsarAdminException - Unexpected errorpublic CompletableFuture<Void> updateTenantAsync(String tenant, org.apache.pulsar.common.policies.data.TenantInfo config)
TenantsupdateTenantAsync in interface Tenantstenant - Tenant nameconfig - Config datapublic void deleteTenant(String tenant) throws PulsarAdminException
TenantsdeleteTenant 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 CompletableFuture<Void> deleteTenantAsync(String tenant)
TenantsdeleteTenantAsync in interface Tenantstenant - Tenant namepublic void createProperty(String tenant, org.apache.pulsar.common.policies.data.TenantInfo config) throws PulsarAdminException
PropertiescreateProperty 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, org.apache.pulsar.common.policies.data.TenantInfo config) throws PulsarAdminException
PropertiesupdateProperty 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
PropertiesdeleteProperty 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
Properties
["my-property", "other-property", "third-property"]
getProperties in interface PropertiesPulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException - Unexpected errorpublic org.apache.pulsar.common.policies.data.TenantInfo getPropertyAdmin(String tenant) throws PulsarAdminException
PropertiesgetPropertyAdmin 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–2021 Apache Software Foundation. All rights reserved.