You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/11/22 10:39:26 UTC

[GitHub] [pulsar] zymap commented on a change in pull request #8629: Adopt switch tab for pulsar-admin, REST API, and Java

zymap commented on a change in pull request #8629:
URL: https://github.com/apache/pulsar/pull/8629#discussion_r528315425



##########
File path: site2/docs/admin-api-tenants.md
##########
@@ -67,19 +93,64 @@ $ pulsar-admin tenants get my-tenant
   ]
 }
 ```
+<!--REST API-->
+
+{@inject: endpoint|GET|/admin/v2/tenants/:cluster|operation/getTenant}
+
+<!--JAVA-->
+
+```java
+admin.tenants().getTenant(tenantName);

Review comment:
       ```suggestion
   admin.tenants().getTenantInfo(tenantName);
   ```

##########
File path: site2/docs/admin-api-tenants.md
##########
@@ -67,19 +93,64 @@ $ pulsar-admin tenants get my-tenant
   ]
 }
 ```
+<!--REST API-->
+
+{@inject: endpoint|GET|/admin/v2/tenants/:cluster|operation/getTenant}
+
+<!--JAVA-->
+
+```java
+admin.tenants().getTenant(tenantName);
+```
+
+<!--END_DOCUSAURUS_CODE_TABS-->
 
 ### Delete
 
-#### pulsar-admin
+Tenants can be deleted from a Pulsar [instance](reference-terminology.md#instance).
+
+<!--DOCUSAURUS_CODE_TABS-->
+<!--pulsar-admin-->
 
-You can delete a tenant using the [`delete`](reference-pulsar-admin.md#tenants-delete) subcommand and specifying the tenant name:
+Use the [`delete`](reference-pulsar-admin.md#tenants-delete) subcommand and specify the name of the tenant.
 
 ```shell
 $ pulsar-admin tenants delete my-tenant
 ```
 
-### Updating
+<!--REST API-->
+
+{@inject: endpoint|DELETE|/admin/v2/tenants/:cluster|operation/deleteTenant}
+
+<!--JAVA-->
+
+```java
+admin.Tenants().deleteTenant(tenantName);
+```
+<!--END_DOCUSAURUS_CODE_TABS-->
+
+### Update
+
+You can update a tenant's configuration.
+
+<!--DOCUSAURUS_CODE_TABS-->
+<!--pulsar-admin-->
+
+Use the [`update`](reference-pulsar-admin.md#tenants-update) subcommand.
+
+```shell
+$ pulsar-admin tenants update my-tenant
+```
+
+<!--REST API-->
 
-#### pulsar-admin
+{@inject: endpoint|DELETE|/admin/v2/tenants/:cluster|operation/updateTenant}
+
+<!--JAVA-->
+
+```java
+
+admin.tenants().updateTenant(tenantName);

Review comment:
       ```suggestion
   admin.tenants().updateTenant(tenantName, tenantInfo);
   ```

##########
File path: site2/docs/admin-api-tenants.md
##########
@@ -47,12 +59,26 @@ $ pulsar-admin tenants create my-tenant \
 $ pulsar-admin tenants create my-tenant \
   -r role1
 ```
+<!--REST API-->
+
+{@inject: endpoint|POST|/admin/v2/functions/{tenant}
+
+<!--JAVA-->
+
+```java
+admin.tenants().createTenant(tenantName);

Review comment:
       ```suggestion
   admin.tenants().createTenant(tenantName, tenantInfo);
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org