create

Create an object.

Use this command to create an object on the connected cluster. For Apache Kafka, you can create topics, ACLs for topics, clusters, groups, and delegation tokens.

Synopsis

create <CreateCommandArg> [CreateCommandArg Options]

create cluster-acl

create cluster-acl allow-principal|deny-principal <PrincipalType:name> [force|allow-host <String>|deny-host <String>|operation <String>]

Create a cluster ACL.
Example:
cluster@myCluster> create cluster-acl allow-principal type:Name

create delegation-token-acl

create delegation-token-acl <String> allow-principal|deny-principal <PrincipalType:name> [force|allow-host <String>|deny-host <String>|operation <String>]

Create a delegation token ACL.
Example:
cluster@myCluster> create delegation-token-acl aclName  allow-principal

create group-acl

create group-acl <String> allow-principal|deny-principal <PrincipalType:name> [force|allow-host <String>|deny-host <String>|operation <String>]

Create a group ACL.
Example:
cluster@myCluster> create group-acl 0 allow-principal type:Name

create topic-acl

An ACL is an access control list.

create topic-acl <TopicNames> allow-principal|deny-principal <PrincipalType:name> [force|allow-host <String>|deny-host <String>|operation <String>]
Create an ACL for a specified topic or topics.
Example:
cluster@myCluster> create topic-acl topic2 allow-principal type:Name
create topic-acl <TopicNames> consumer allow-principal <PrincipalType:principalName> [<options>]
Create a consumer-role ACL for a specified topic or topics.
Options include:
  • allow-host <String> force group <String>

  • allow-host <String> group <String> force [force]

  • force allow-host <String> group <String>

  • force group <String> allow-host <String>

  • group <String> allow-host <String> [force]

  • group <String> force [force|allow-host <String>]

Example:
cluster@myCluster> create topic-acl topic1 consumer allow-principal type:Name group 0
create topic-acl <TopicNames> producer allow-principal <PrincipalType:principalName> [<options>]
Create a producer-role ACL for a specified topic or topics.
Example:
cluster@myCluster> create topic-acl topic1 producer allow-principal type:Name

create topic

create topic <TopicNames> partitions <Int> replication-factor <Int> [if-not-exists|disable-rack-aware]
Create a topic or topics with specified characteristics.
Example:
cluster@myCluster> create topic topic1 partitions 1 replication-factor2
create topic <TopicNames> replica-assignment <String> [if-not-exists|disable-rack-aware]
Create a topic or topics based on a specified replica assignment.
Example:
cluster@myCluster> create topic topic1, topic2, topic3 replica-assignment 0:2

See Also

delete