CLI command reference (rhoas)

Guide
  • Red Hat OpenShift Streams for Apache Kafka 1
  • Updated 22 October 2021
  • Published 09 April 2021

Topics included in this guide

CLI command reference (rhoas)

Guide
Red Hat OpenShift Streams for Apache Kafka 1
  • Updated 22 October 2021
  • Published 09 April 2021

The rhoas command-line interface (CLI) is currently available for Development Preview. Development Preview releases provide early access to a limited set of features that might not be fully tested and that might change in the final GA version. Users should not use Development Preview software in production or for business-critical workloads. Limited documentation is available for Development Preview releases and is typically focused on fundamental user goals.

You use the rhoas CLI to manage your application services from the command line.

rhoas cluster bind

Connect your RHOAS services to Kubernetes or OpenShift applications

Synopsis

Command allows you to connect services created by "rhoas cluster connect" command to your application running on OpenShift or Kubernetes platform. Bind will scan your namespace and detect all application deployments that you can connect your services with.

If your application uses DeploymentConfig --deployment-config flag needs to be supplied in order to detect it. When deployment-config flag is used binding will not take effect until application is manually redeployed by user.

Bind command detects Kubernetes deployments and inject managed services credentials to them. For information about what credentials are injected please refer to individual services By default the command will inject credentials as files into /bindings folder inside your application.

Bind command will create volume inside your deployment. ServiceBindingOperator resource if you have it installed on your cluster

rhoas cluster bind [flags]

Examples

# Bind using interactive mode
$ rhoas cluster bind

# Bind to specific namespace and application
$ rhoas cluster bind --namespace=ns --app-name=myapp

Options

--app-name string
Name of the kubernetes deployment to bind
--bind-env
Bind service as environment variables
--binding-name string
Name of the Service binding object to create when using operator
--deployment-config
Use DeploymentConfig to detect your application
--ignore-context
Ignore currently selected services and ask to select each service separately
--kubeconfig string
Location of the kubeconfig file
-n, --namespace string
Custom Kubernetes namespace (if not set current namespace will be used)
--service-name string
Name of service to connect to
--service-type string
Type of custom resource connection
-y, --yes
Forcibly perform operation without confirmation

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

  • rhoas cluster - View and perform operations on your Kubernetes or OpenShift cluster

rhoas cluster clean

Removes all resources created by cluster extensions

Synopsis

Removes all resources created by cluster extensions Clean command will remove all secrets and service connections created in your namespace

rhoas cluster clean [flags]

Examples

## Remove all resources
$ rhoas cluster clean

## Remove all resources in custom namespace
$ rhoas cluster clean --namespace=myspace

Options

--kubeconfig string
Location of the kubeconfig file
-n, --namespace string
Custom Kubernetes namespace (if not set current namespace will be used)
-y, --yes
Forcibly perform operation without confirmation

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

  • rhoas cluster - View and perform operations on your Kubernetes or OpenShift cluster

rhoas cluster connect

Connect your services to Kubernetes or OpenShift

Synopsis

Connect your application services to your Kubernetes or OpenShift cluster. The kubeconfig file is used to connect to the cluster and identify the context. Alternatively, you can use the KUBECONFIG environment variable to read your configuration.

This command requires the RHOAS operator to be running on your cluster.

This command will:

  1. Create a service account and mount it as a secret into your cluster. If the cluster has a service account, it will be refreshed.

  2. Create a Kafka Request object that can be used to create a ServiceBinding object using the Service Binding operator (https://github.com/redhat-developer/service-binding-operator).

rhoas cluster connect [flags]

Examples

# connect a Kafka instance to your cluster
$ rhoas cluster connect --service-type kafka --service-name kafka

# connect a Service registry instance to your cluster
$ rhoas cluster connect --service-type service-registry --service-name registry

Options

--ignore-context
Ignore currently selected services and ask to select each service separately
--kubeconfig string
Location of the kubeconfig file
-n, --namespace string
Custom Kubernetes namespace (if not set current namespace will be used)
--service-name string
Name of service to connect to
--service-type string
Type of custom resource connection
--token string
Provide an offline token to be used by the operator (to get a token, visit https://console.redhat.com/openshift/token)
-y, --yes
Forcibly perform operation without confirmation

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

  • rhoas cluster - View and perform operations on your Kubernetes or OpenShift cluster

rhoas cluster status

View status of the current Kubernetes or OpenShift cluster

Synopsis

View information about the current Kubernetes or OpenShift cluster. You can use this information to connect your application service to the cluster.

Before using cluster commands, you must be authenticated into a Kubernetes or OpenShift cluster. The command uses your kubeconfig file to identify the cluster context.

rhoas cluster status [flags]

Examples

# print status of the current cluster
$ rhoas cluster status

Options

--kubeconfig string
Location of the kubeconfig file

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

  • rhoas cluster - View and perform operations on your Kubernetes or OpenShift cluster

rhoas cluster

View and perform operations on your Kubernetes or OpenShift cluster

Synopsis

Use these commands to connect and bind your services to Kubernetes or OpenShift applications. You can also check if the Kubernetes or OpenShift cluster has the required Operators to perform this operation.

Examples

# check status of the connection to your cluster
$ rhoas cluster status

# connect with cluster without including currently selected services
$ rhoas cluster connect --ignore-context

# connect with cluster using specified token
$ rhoas cluster connect --token=value

# connect with cluster and save script to create service binding
$ rhoas cluster connect --yes > create_service_binding.sh

# connect managed service with your application
$ rhoas cluster bind

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

rhoas completion bash

Generate command completion script for Bash shell

Synopsis

Generate command completion script for Bash shell.

Installing on Linux:

  1. Run rhoas completion bash > rhoas_completions to create the script file.

  2. Run sudo mv rhoas_completions /etc/bash_completion.d/rhoas to place the script in a special Bash completions directory.

Installing on macOS:

  1. Run rhoas completion bash > rhoas_completions to create the script file.

  2. Run sudo mv rhoas_completions /usr/local/etc/bash_completion.d/rhoas to place the script in a special Bash completions directory.

rhoas completion bash

Examples

rhoas completion bash

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

  • rhoas completion - Outputs command completion for the given shell (bash, zsh, or fish)

rhoas completion fish

Generate command completion script for fish shell

Synopsis

Generate command completion script for fish shell.

Run rhoas command completion -s fish > ~/.config/fish/completion/gh.fish to install fish completions.

rhoas completion fish

Examples

rhoas completion fish

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

  • rhoas completion - Outputs command completion for the given shell (bash, zsh, or fish)

rhoas completion zsh

Generate command completion script for Zsh shell

Synopsis

Generate command completion script for Zsh shell.

  1. Run rhoas completion zsh > "${fpath[1]}/_rhoas" to install the completion script.

  2. Unless already installed, run echo "autoload -U compinit; compinit" >> ~/.zshrc to enable shell completions for Zsh.

rhoas completion zsh

Examples

rhoas completion zsh

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

  • rhoas completion - Outputs command completion for the given shell (bash, zsh, or fish)

rhoas completion

Outputs command completion for the given shell (bash, zsh, or fish)

Synopsis

Outputs command completion for the given shell (bash, zsh, or fish).

To find what shell you are currently running, run echo $0.

Run rhoas completion [bash|zsh|fish] -h for instructions on installing command completions for your shell.

When you have installed the command completion script, make sure you restart your shell for the changes to take effect.

Examples

## Generate command completion script for Bash shell
rhoas completion bash

## Generate command completion script for fish shell
rhoas completion fish

## Generate command completion script for Zsh shell
rhoas completion zsh

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

rhoas kafka acl delete

Delete Kafka ACLs matching the provided filters

Synopsis

Delete all ACLs from a Kafka instance which match the filter criteria provided

rhoas kafka acl delete [flags]

Examples

# delete an ACL for user "joe_bloggs" on all topics
$ rhoas kafka acl delete --operation write --permission allow --topic "*" --user joe_bloggs

# delete an ACL for a service account
$ rhoas kafka acl delete --operation all --permission any --topic "rhoas" --prefix --service-account "srvc-acct-11924479-43fe-42b4-9676-cf0c9aca81"

# delete an ACL for all users on the consumer group resource
$ rhoas kafka acl delete --operation all --permission any --group "group-1" --all-accounts

Options

--all-accounts
Set the ACL principal to match all accounts (wildcard). Cannot be used in conjunction with --service-account or --user
--cluster
Set the resource type to cluster
--group string
Set the consumer group resource. When the --prefix option is also passed, this is used as the consumer group prefix
--instance-id string
Kafka instance ID. Uses the current instance if not set
--operation string
Set the ACL operation. Choose from: "all", "alter", "alter-configs", "create", "delete", "describe", "describe-configs", "read", "write" (default "any")
-o, --output string
Specify the output format. Choose from: "json", "yaml", "yml"
--permission string
Set the ACL permission. Choose from: "allow", "any", "deny" (default "any")
--prefix
Determine if the resource should be exact match or prefix
--service-account string
Service account client ID to use as principal for this operation
--topic string
Set the topic resource. When the --prefix option is also passed, this is used as the topic prefix
--transactional-id string
Set the transactional ID resource
--user string
User ID to be use as principal
-y, --yes
Skip confirmation of this action

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

rhoas kafka acl grant-access

Add ACL rules to grant users access to produce/consume from topics

Synopsis

This command creates ACL rules that grant the specified user access to produce/consume from topics

rhoas kafka acl grant-access [flags]

Examples

# Grant access to principal for consuming messages from all topics
$ rhoas kafka acl grant-access --consumer --user user_name --topic all --group all

# Grant access to principal for consuming messages from all topics in a specified instance
$ rhoas kafka acl grant-access --consumer --user user_name --topic all --group all --instance-id c5hv7iru4an1g84pogp0

# Grant access to principal for producing messages to all topics
$ rhoas kafka acl grant-access --producer --user user_name --topic all

# Grant access to principal for consuming messages from topics starting with "abc"
$ rhoas kafka acl grant-access --consumer --user user_name --topic-prefix "abc" --group my-group

# Grant access to principal for producing messages to topics starting with "abc"
$ rhoas kafka acl grant-access --producer --user user_name --topic-prefix "abc"

# Grant access to all users for consuming messages from topic "my-topic"
$ rhoas kafka acl grant-access --consumer --user all --topic my-topic --group my-group

# Grant access to all users for producing messages to topic "my-topic"
$ rhoas kafka acl grant-access --producer --user all --topic my-topic

# Grant access to principal for produce and consume messages from all topics
$ rhoas kafka acl grant-access --producer --consumer --user user_name --topic all --group all

Options

--all-accounts
Set the ACL principal to match all accounts (wildcard). Cannot be used in conjunction with --service-account or --user
--consumer
Add ACL rules that grant the specified principal access to consume messages from topics
--group string
Consumer group ID to define ACL rules for
--group-prefix string
Prefix name for groups to be selected
--instance-id string
Kafka instance ID. Uses the current instance if not set
--producer
Add ACL rules that grant the specified principal access to produce messages to topics
--service-account string
Service account client ID to use as principal for this operation
--topic string
Topic name to define ACL rules for
--topic-prefix string
Prefix name for topics to be selected
--user string
User ID to be use as principal
-y, --yes
Skip confirmation of this action

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

rhoas kafka acl list

List all Kafka ACL rules.

Synopsis

This command will display list of Kafka ACL rules

The instances are displayed by default in a table, but can also be displayed as JSON or YAML.

rhoas kafka acl list [flags]

Examples

# Display Kafka ACL rules for the Kafka instance
$ rhoas kafka acl list

# Display Kafka ACL rules for a specific Kafka instance
$ rhoas kafka acl list --instance-id c5hv7iru4an1g84pogp0

Options

--instance-id string
Kafka instance ID. Uses the current instance if not set
-o, --output string
Specify the output format. Choose from: "json", "yaml", "yml"
--page int32
Current page number for list of Kafka ACL rules (default 1)
--size int32
Maximum number of items to be returned per page (default 10)

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

rhoas kafka acl

Kafka ACL management for users and service accounts

Synopsis

Set of commands that will let you manage Kafka ACLs. By default, every users and service account have limited access to their Kafka instance (Only DESCRIBE permission is enabled for TOPIC, ACL, and GROUP).

Examples

# Grant access to principal for consuming messages from all topics
$ rhoas kafka acl grant-access --consumer --user user_name --topic all --group all

# Grant access to principal for producing messages to all topics
$ rhoas kafka acl grant-access --producer --user user_name --topic all

# List ACL rules for a Kafka instance
$ rhoas kafka acl list

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

rhoas kafka consumer-group delete

Delete a consumer group

Synopsis

Delete a consumer group from the Kafka instance.

rhoas kafka consumer-group delete [flags]

Examples

# delete a consumer group
$ rhoas kafka consumer-group delete --id consumer_group_1

Options

--id string
The unique ID of the consumer group to delete
-y, --yes
Skip confirmation to forcibly delete a consumer group

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

rhoas kafka consumer-group describe

Describe a consumer group

Synopsis

Print detailed information for a consumer group and its members.

rhoas kafka consumer-group describe [flags]

Examples

# describe a consumer group
$ rhoas kafka consumer-group describe --id consumer_group_1 -o json

Options

--id string
The unique ID of the consumer group to view
-o, --output string
Format in which to display the consumer group (choose from: "json", "yml", "yaml")

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

rhoas kafka consumer-group list

List all consumer groups

Synopsis

List all consumer groups in the current Apache Kafka instance.

rhoas kafka consumer-group list [flags]

Examples

# list all consumer groups
$ rhoas kafka consumer-group list

# list all consumer groups as JSON
$ rhoas kafka consumer-group list -o json

Options

-o, --output string
Format in which to display the consumer group (choose from: "json", "yml", "yaml")
--page int32
Current page number for list of consumer groups (default 1)
--search string
Text search to filter consumer groups by ID
--size int32
Maximum number of consumer groups to be returned per page (default 10)
--topic string
Fetch the consumer groups for a specific Kafka topic

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

rhoas kafka consumer-group reset-offset

Reset partition offsets for a consumer group

Synopsis

Reset the offset for consumers in a consumer group reading from a given topic.

Reset to the earliest or latest offset. Or base the reset on a specific offset value or timestamp. You can also choose partitions to reset offsets from.

rhoas kafka consumer-group reset-offset [flags]

Examples

# reset partition offsets for a consumer group to latest
$ rhoas kafka consumer-group reset-offset --id consumer_group_1 --offset latest

# reset partition offsets for a consumer group to earliest
$ rhoas kafka consumer-group reset-offset --id consumer_group_1 --offset earliest

# reset partition offsets for a consumer group to an absolute value
$ rhoas kafka consumer-group reset-offset --id consumer_group_1 --offset absolute --value 0

# reset partition offsets for a consumer group to a timestamp
$ rhoas kafka consumer-group reset-offset --id consumer_group_1 --offset timestamp --value "2016-06-23T09:07:21-07:00"

# reset specific partition offsets for a consumer group
$ rhoas kafka consumer-group reset-offset --id consumer_group_1 --offset latest --topic my-topic --partitions 0,1

Options

--id string
The unique ID of the consumer group to reset-offset
--offset string
Offset type (choose from: "earliest", "latest", "absolute", "timestamp")
--partitions int32Slice
Reset consumer group offsets on specified partitions (comma-separated integers) (default [])
--topic string
Reset consumer group offsets on a specified topic
--value string
Custom offset value (required when offset is "absolute" or "timestamp")
-y, --yes
Skip confirmation to forcibly reset the offset for the consumer group

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

rhoas kafka consumer-group

Describe, list, and delete consumer groups for the current Apache Kafka instance

Synopsis

Use these commands to describe, list, and delete consumer groups for the current Kafka instance.'

Commands are executed on the currently selected Kafka instance.

Commands are executed on the currently selected Kafka instance.

Examples

## Delete a consumer group
rhoas kafka consumer-group delete --id consumer_group_1

## List all consumer groups
rhoas kafka consumer-group list

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

rhoas kafka create

Create an Apache Kafka instance

Synopsis

Create an Apache Kafka instance on a particular cloud provider and region.

After creating the instance you can view it by running "rhoas kafka describe".

rhoas kafka create [flags]

Examples

# start an interactive prompt to fill out the configuration values for the instance
$ rhoas kafka create

# create a Kafka instance
$ rhoas kafka create --name my-kafka-instance

# create a Kafka instance and output the result in YAML
$ rhoas kafka create -o yaml

Options

--name string
Unique name of the Kafka instance
-o, --output string
Format in which to display the Kafka instance (choose from: "json", "yml", "yaml") (default "json")
--provider string
Cloud Provider ID
--region string
Cloud Provider Region ID
--use
Set the new Kafka instance to the current instance (default true)
-w, --wait
Wait until the Kafka instance is created

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

  • rhoas kafka - Create, view, use, and manage your Kafka instances

rhoas kafka delete

Delete an Apache Kafka instance

Synopsis

Permanently delete an Apache Kafka instance, including all topics.

When this command is run, you will be asked to confirm the name of the instance you want to delete. Otherwise you can pass "--yes" to skip confirmation and forcibly delete the instance.

rhoas kafka delete [flags]

Examples

# delete the current Kafka instance
$ rhoas kafka delete

# delete a Kafka instance with a specific ID
$ rhoas kafka delete --id=1iSY6RQ3JKI8Q0OTmjQFd3ocFRg

# delete a Kafka instance with a specific name
$ rhoas kafka delete --name=my-kafka

Options

--id string
Unique ID of the Kafka instance you want to delete
--name string
Name of the Kafka instance you want to delete
-y, --yes
Skip confirmation of this action

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

  • rhoas kafka - Create, view, use, and manage your Kafka instances

rhoas kafka describe

View configuration details of an Apache Kafka instance

Synopsis

View configuration fields and their values for an Apache Kafka instance.

Pass the "--id" flag to specify which instance you would like to view.

If the "--id" flag is not passed then the selected Kafka instance will be used, if available.

You can view the output as either as JSON or YAML.

rhoas kafka describe [flags]

Examples

# view the current Kafka instance instance
$ rhoas kafka describe

# view a specific instance by passing the --id flag
$ rhoas kafka describe --id=1iSY6RQ3JKI8Q0OTmjQFd3ocFRg

# view a specific instance by passing the --name flag
$ rhoas kafka describe --name=my-kafka

# customise the output format
$ rhoas kafka describe -o yaml

Options

--bootstrap-server
If specified, only bootstrap server host of the Kafka instance will be displayed
--id string
Unique ID of the Kafka instance you want to view
--name string
Name of the Kafka instance you want to view
-o, --output string
Format in which to display the Kafka instance (choose from: "json", "yml", "yaml") (default "json")

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

  • rhoas kafka - Create, view, use, and manage your Kafka instances

rhoas kafka list

List all Apache Kafka instances

Synopsis

List all Apache Kafka instances.

This command will provide a high level view of all Kafka instances. The fields displayed are: ID, Name, Owner, Status, Cloud Provider, Region. Use the describe command to view all fields for a specific instance.

The instances are displayed by default in a table, but can also be displayed as JSON or YAML.

rhoas kafka list [flags]

Examples

# list all Kafka instances using the default output format
$ rhoas kafka list

# list all Kafka instances using JSON as the output format
$ rhoas kafka list -o json

Options

--limit int
The maximum number of Kafka instances to be returned (default 100)
-o, --output string
Specify the output format. Choose from: "json", "yaml", "yml"
--page int
Display the Kafka instances from the specified page number (default 1)
--search string
Text search to filter the Kafka instances by name, owner, cloud_provider, region and status

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

  • rhoas kafka - Create, view, use, and manage your Kafka instances

rhoas kafka topic create

Create a topic

Synopsis

Create a topic in the current Apache Kafka instance.

This command lets you create a topic, set a desired number of partitions, retention size and retention period or else use the default values.

rhoas kafka topic create [flags]

Examples

# create a topic
$ rhoas kafka topic create --name topic-1

Options

--cleanup-policy string
Determines whether log messages are deleted, compacted, or both (default "delete")
--name string
Topic name
-o, --output string
Format in which to display the Kafka topic (choose from: "json", "yml", "yaml") (default "json")
--partitions int32
The number of partitions in the topic (default 1)
--retention-bytes int
The maximum total size of a partition log segments before old log segments are deleted to free up space (default -1)
--retention-ms int
The period of time in milliseconds the broker will retain a partition log before deleting it (default 604800000)

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

rhoas kafka topic delete

Delete a topic

Synopsis

Delete a topic in the current Apache Kafka instance.

rhoas kafka topic delete [flags]

Examples

# delete a topic
$ rhoas kafka topic delete --name topic-1

Options

--name string
Topic name
-y, --yes
Skip confirmation to forcibly delete a topic

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

rhoas kafka topic describe

Describe a topic

Synopsis

Print detailed configuration information for a Kafka topic.

rhoas kafka topic describe [flags]

Examples

# describe a topic
$ rhoas kafka topic describe --name topic-1

Options

--name string
Format in which to display the Kafka topic (choose from: "json", "yml", "yaml")
-o, --output string
Format in which to display the Kafka topic (choose from: "json", "yml", "yaml") (default "json")

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

rhoas kafka topic list

List all topics

Synopsis

List all topics in the current Apache Kafka instance.

rhoas kafka topic list [flags]

Examples

# list all topics
$ rhoas kafka topic list

# list all topics as JSON
$ rhoas kafka topic list -o json

Options

-o, --output string
Format in which to display the Kafka topic (choose from: "json", "yml", "yaml")
--page int32
Current page number for list of topics (default 1)
--search string
Text search to filter the Kafka topics by name
--size int32
Maximum number of items to be returned per page (default 10)

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

rhoas kafka topic update

Update a Kafka topic

Synopsis

Update a topic in the current Apache Kafka instance.

rhoas kafka topic update [flags]

Examples

# update the message retention period for a topic
$ rhoas kafka topic update --name topic-1 --retention-ms -1

Options

--cleanup-policy string
Determines whether log messages are deleted, compacted, or both
--name string
Topic name
--partitions string
The number of partitions in the topic
--retention-bytes string
The maximum total size of a partition log segments before old log segments are deleted to free up space
--retention-ms string
The period of time in milliseconds the broker will retain a partition log before deleting it

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

rhoas kafka topic

Create, describe, update, list and delete topics

Synopsis

Create, describe, update, list and delete topics for the current Kafka instance.

Commands are executed on the currently selected Kafka instance.

Examples

## Create a topic
rhoas kafka topic create --name mytopic

## List all topics
rhoas kafka topic list

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

rhoas kafka update

Update configuration details of a Kafka instance.

Synopsis

Update certain configuration details of a Kafka instance.

Currently it is possible to update the "owner" field. The new owner will be authorized to manage this instance.

rhoas kafka update [flags]

Examples

# update the Kafka instance owner
$ rhoas kafka update --name=my-kafka --owner=other-user

# update the owner of the current Kafka instance
$ rhoas kafka update --owner=other-user

# update the current Kafka instance in interactive mode
$ rhoas kafka update

Options

--id string
Unique ID of the Kafka instance you want to update
--name string
Name of the Kafka instance you want to update
--owner string
ID of the user you want to set as the owner of this Kafka instance
-y, --yes
Forcibly update the Kafka instance without confirmation

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

  • rhoas kafka - Create, view, use, and manage your Kafka instances

rhoas kafka use

Set the current Apache Kafka instance

Synopsis

Select an Apache Kafka instance and set it as the current instance. You can specify a Apache Kafka instance by --name or --id.

When you set the Kafka instance to be used, it is set as the current instance for all rhoas kafka topics and rhoas kafka consumer-group commands.

rhoas kafka use [flags]

Examples

# set a kafka instance to be the current instance
$ rhoas kafka use --name=my-kafka

# set a kafka instance to be the current instance
$ rhoas kafka use --id=1iSY6RQ3JKI8Q0OTmjQFd3ocFRg

Options

--id string
Unique ID of the Kafka instance you want to set as the current instance
--name string
Name of the Kafka instance you want to set as the current instance

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

  • rhoas kafka - Create, view, use, and manage your Kafka instances

rhoas kafka

Create, view, use, and manage your Kafka instances

Synopsis

Commands for managing and interacting with Kafka instances.

Commands are divided into the following categories: - instance management commands: create, list, and so on - commands executed on the selected instance: topic, consumer-group - "use" command that selects the current instance

Examples

## Create an Kafka instance
rhoas kafka create --name my-kafka-instance

## View configuration details of an Kafka instance
rhoas kafka describe

## List all Kafka instances
rhoas kafka list

## Create an Kafka Topic
rhoas kafka topic create --name mytopic

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

rhoas login

Log in to RHOAS

Synopsis

Log in securely to RHOAS through a web browser.

This command opens your web browser, where you can enter your credentials.

When using the rhoas CLI in an environment without a web browser, you can log in using an offline-token by passing the "--token" flag, which can be obtained at https://console.redhat.com/openshift/token. Note: token-based login is not supported by the Kafka "topic" and "consumer-group" subcommands.

rhoas login [flags]

Examples

# securely log in to RHOAS by using a web browser
$ rhoas login

# print the authentication URL instead of automatically opening the browser
$ rhoas login --print-sso-url

# log in using an offline token
$ rhoas login --token f5cgc...

Options

--api-gateway string
URL of the API gateway (default "https://api.openshift.com")
--auth-url string
The URL of the SSO Authentication server (default "https://sso.redhat.com/auth/realms/redhat-external")
--client-id string
OpenID client identifier (default "rhoas-cli-prod")
--insecure
Enables insecure communication with the server. This disables verification of TLS certificates and host names.
--mas-auth-url string
The URL of the identity.api.openshift.com Authentication server. (default "https://identity.api.openshift.com/auth/realms/rhoas")
--print-sso-url
Prints the console login URL, which you can use to log in to RHOAS from a different web browser. This is useful if you need to log in with different credentials than the credentials you used in your default web browser.
--scope stringArray
Override the default OpenID scope. To specify multiple scopes, use a separate --scope for each scope. (default [openid])
-t, --token string
Allows you to log in using an offline token, which can be obtained at https://console.redhat.com/openshift/token.

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

rhoas logout

Log out from RHOAS

Synopsis

Log out from RHOAS. To manage your services again, log in using "rhoas login".

rhoas logout [flags]

Examples

rhoas logout

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

rhoas service-account create

Create a service account

Synopsis

Create a service account with credentials that are saved to a file.

Applications and tools use these service account credentials to authenticate and interact with your application services.

You must specify an output format into which the credentials will be stored. - env (default): Store credentials in an env file as environment variables - json: Store credentials in a JSON file - properties: Store credentials in a properties file, which is typically used in Java-related technologies.

rhoas service-account create [flags]

Examples

# create a service account through an interactive prompt
$ rhoas service-account create

# create a service account and save the credentials in a JSON file
$ rhoas service-account create --file-format json

# create a service account and forcibly overwrite the credentials file if it exists already
$ rhoas service-account create --overwrite

# create a service account and save credentials to a custom file location
$ rhoas service-account create --output-file=./service-acct-credentials.json

Options

--file-format string
Format in which to save the service account credentials (choose from: "env", "json", "properties")
--output-file string
Sets a custom file location to save the credentials
--overwrite
Forcibly overwrite a credentials file if it already exists
--short-description string
Short description of the service account

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

rhoas service-account delete

Delete a service account

Synopsis

Permanently delete a service account.

Applications and tools which use the service account credentials will stop working and should be updated.

rhoas service-account delete [flags]

Examples

# delete a service account
$ rhoas service-account delete --id 173c1ad9-932d-4007-ae0f-4da74f4d2ccd

Options

--id string
The unique ID of the service account to delete
-y, --yes
Skip confirmation to forcibly delete this service account

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

rhoas service-account describe

View configuration details of a service account

Synopsis

View configuration fields and their values for a service account.

Pass the "--id" flag to specify which service account you would like to view.

You can view the output as either as JSON or YAML.

rhoas service-account describe [flags]

Examples

# view a specific service account
$ rhoas service-account describe --id=8a06e685-f827-44bc-b0a7-250bc8abe52e --output yml

Options

--id string
The unique ID of the service account to view
-o, --output string
Format in which to display the service account (choose from: "json", "yml", "yaml") (default "json")

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

rhoas service-account list

List service accounts

Synopsis

List all service accounts.

This command will provide a high level view of all service accounts.

The service accounts are displayed by default in a table, but can also be displayed as JSON or YAML.

rhoas service-account list [flags]

Examples

# list all service accounts using the default output format
$ rhoas service-account list

# list all service accounts using JSON as the output format
$ rhoas service-account list -o json

Options

-o, --output string
Format in which to display the service accounts (choose from: "json", "yml", "yaml")

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

rhoas service-account reset-credentials

Reset service account credentials

Synopsis

Reset the credentials for a service account. This command will generate a new password for a service account. After the credentials have been reset, any applications or tools that use the credentials must be updated to use the new password.

You must specify an output format into which the credentials will be stored.

  • env (default): Store credentials in an env file as environment variables

  • json: Store credentials in a JSON file

  • properties: Store credentials in a properties file, which is typically used in Java-related technologies.

rhoas service-account reset-credentials [flags]

Examples

# start an interactive prompt to reset credentials
$ rhoas service-account reset-credentials

# reset credentials for the service account specified and save the credentials to a JSON file
$ rhoas service-account reset-credentials --id 173c1ad9-932d-4007-ae0f-4da74f4d2ccd -o json

Options

--file-format string
Format in which to save the service account credentials (choose from: "env", "json", "properties")
--id string
The unique ID of the service account for which you want to reset the credentials
--output-file string
Sets a custom file location to save the credentials
--overwrite
Forcibly overwrite a credentials file if it already exists
-y, --yes
Skip confirmation to forcibly reset service account credentials

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

rhoas service-account

Create, list, describe, delete and update service accounts

Synopsis

Use these commands to create, list, describe, delete and update service accounts. You can also reset the credentials for a service account.

Examples

## Create a service account
rhoas service-account create

## List all service accounts
rhoas service-account list

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

rhoas service-registry artifact create

[beta] Creates new artifact from file or standard input

Synopsis

Creates a new artifact by posting the artifact content to the registry instance.

Artifacts are typically in JSON format for most of the supported types, but may be in another format for a few (for example, PROTOBUF). Service Registry attempts to figure out what kind of artifact is being added from the following supported list:

  • Avro (AVRO)

  • Protobuf (PROTOBUF)

  • JSON Schema (JSON)

  • Kafka Connect (KCONNECT)

  • OpenAPI (OPENAPI)

  • AsyncAPI (ASYNCAPI)

  • GraphQL (GRAPHQL)

  • Web Services Description Language (WSDL)

  • XML Schema (XSD)

An artifact is created using the content provided in the request body. This content is created with a unique artifact ID that can be provided by user. If not provided in the request, the registry server generates a unique ID for the artifact. It is typically recommended that callers provide the ID, because this is a meaningful identifier, and for most use cases should be supplied by the caller. If an artifact with the provided artifact ID already exists, the command will fail with an error.

When the --group parameter is missing, the command uses the "default" group. when the --instance-id is missing, the command creates a new artifact for the currently active Service Registry instance (displayed in rhoas service-registry describe)

This command is available as part of the Development Preview release.

rhoas service-registry artifact create [flags]

Examples

# Create an artifact in the default group
rhoas service-registry artifact create my-artifact.json

# Create an artifact with the specified type
rhoas service-registry artifact create --type=JSON my-artifact.json

Options

--artifact-id string
ID of the artifact
--description string
Custom description of the artifact
--file string
File location of the artifact
-g, --group string
Artifact group (default "default")
--instance-id string
ID of the Service Registry instance to be used. By default, uses the currently selected instance
--name string
Custom name of the artifact
-o, --output string
Format in which to display the Service Registry instance (choose from: "json", "yml", "yaml") (default "json")
-t, --type string
Type of artifact. Choose from: AVRO, PROTOBUF, JSON, OPENAPI, ASYNCAPI, GRAPHQL, KCONNECT, WSDL, XSD, XML
--version string
Custom version of the artifact (for example 1.0.0)

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

rhoas service-registry artifact delete

[beta] Deletes single or all artifacts in a given group

Synopsis

Deletes single or all artifacts in a given group.

When called without arguments, deletes all artifacts in the group When --artifact-id is specified, deletes only a single artifact and its version When --group parameter is missing, the command uses the "default" group.

This command is available as part of the Development Preview release.

rhoas service-registry artifact delete [flags]

Examples

## Delete all artifacts in the group "default"
rhoas service-registry artifact delete

## Delete artifact in the group "default" with name "my-artifact"
rhoas service-registry artifact delete --artifact-id=my-artifact

Options

--artifact-id string
ID of the artifact
-g, --group string
Artifact group (default "default")
--instance-id string
ID of the Service Registry instance to be used. By default, uses the currently selected instance
-y, --yes
Delete artifact without prompt

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

rhoas service-registry artifact download

[beta] Download artifacts from Service Registry using global identifiers

Synopsis

Get single or more artifacts by group, content, hash or globalIds. NOTE: Use "service-registry get" command to download artifacts by artifactId.

Flags are used to specify the artifact to download:

--contentId - ID if the content is from metadata --globalId - globalId of the content from metadata --hash - SHA-256 hash of the content

This command is available as part of the Development Preview release.

rhoas service-registry artifact download [flags]

Examples

## Get latest artifact by content ID
rhoas service-registry artifact download --content-id=183282932983

## Get latest artifact by content ID to specific file
rhoas service-registry artifact download --content-id=183282932983 --output-file=schema.json

## Get latest artifact by global ID
rhoas service-registry artifact download --global-id=383282932983

## Get latest artifact by hash
rhoas service-registry artifact download --hash=c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4

Options

--content-id int
ContentId of the artifact (default -1)
--global-id int
Global ID of the artifact (default -1)
-g, --group string
Artifact group (default "default")
--hash string
SHA-256 hash of the artifact
--instance-id string
ID of the Service Registry instance to be used. By default, uses the currently selected instance
--output-file string
Location of the output file

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

rhoas service-registry artifact export

[beta] Export data from Service Registry instance

Synopsis

Export all artifacts and metadata from Service Registry instance to specified file

This command is available as part of the Development Preview release.

rhoas service-registry artifact export [flags]

Examples

## Export all artifacts and metadata to export file for another Service Registry instance
rhoas service-registry artifact export --file=export.zip

Options

--instance-id string
ID of the Service Registry instance to be used. By default, uses the currently selected instance
--output-file string
File location of the artifact

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

rhoas service-registry artifact get

[beta] Get artifact by ID and group

Synopsis

Get artifact by specifying ID and group. Command fetches the latest artifact from the registry based on the artifact-id and group.

When --version is specified, the command fetches the specific artifact version. Get command fetches artifacts based on --group and --artifact-id and --version. For fetching artifacts using global identifiers, use the "service-registry download" command

This command is available as part of the Development Preview release.

rhoas service-registry artifact get [flags]

Examples

## Get latest artifact with name "my-artifact" and print it out to standard out
rhoas service-registry artifact get --artifact-id=my-artifact

## Get latest artifact with name "my-artifact" from group "my-group" and save it to artifact.json file
rhoas service-registry artifact get --artifact-id=my-artifact --group=my-group --output-file=artifact.json

## Get latest artifact and pipe it to another command
rhoas service-registry artifact get --artifact-id=my-artifact | grep -i 'user'

## Get artifact with custom version and print it out to standard out
rhoas service-registry artifact get --artifact-id=myartifact --version=4

Options

--artifact-id string
ID of the artifact
-g, --group string
Artifact group (default "default")
--instance-id string
ID of the Service Registry instance to be used. By default, uses the currently selected instance
--output-file string
Location of the output file
--version string
Version of the artifact

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

rhoas service-registry artifact import

[beta] Import data into a Service Registry instance

Synopsis

Import all artifacts and metadata from export file to another Service Segistry instance

This command is available as part of the Development Preview release.

rhoas service-registry artifact import [flags]

Examples

## Import all artifacts and metadata from export file to another Service Registry instance
rhoas service-registry artifact import --file=export.zip

Options

--file string
File location of the artifact
--instance-id string
ID of the Service Registry instance to be used. By default, uses the currently selected instance

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

rhoas service-registry artifact list

[beta] List artifacts

Synopsis

List all artifacts for the group by specified output format (by default, table) This command is available as part of the Development Preview release.

rhoas service-registry artifact list [flags]

Examples

## List all artifacts for the "default" artifact group
rhoas service-registry artifact list

## List all artifacts with "my-group" group
rhoas service-registry artifact list --group=my-group

## List all artifacts with limit and group
rhoas service-registry artifact list --page=2 --limit=10

Options

-g, --group string
Artifact group (default "default")
--instance-id string
ID of the Service Registry instance to be used. By default, uses the currently selected instance
--limit int32
Page limit (default 100)
-o, --output string
Output format (json, yaml, yml)
--page int32
Page number (default 1)

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

rhoas service-registry artifact metadata-get

[beta] Get artifact metadata

Synopsis

Gets the metadata for an artifact in a Service Registry instance The returned metadata includes both generated (read-only) and editable metadata (such as name and description).

This command is available as part of the Development Preview release.

rhoas service-registry artifact metadata-get [flags]

Examples

## Get latest artifact metadata for default group
rhoas service-registry artifact metadata-get --artifact-id=my-artifact

## Get latest artifact metadata for my-group group
rhoas service-registry artifact metadata-get --artifact-id=my-artifact --group mygroup

Options

--artifact-id string
ID of the artifact
-g, --group string
Artifact group (default "default")
--instance-id string
ID of the Service Registry instance to be used. By default, uses the currently selected instance
-o, --output string
Output format (json, yaml, yml)

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

rhoas service-registry artifact metadata-set

[beta] Update artifact metadata

Synopsis

Updates the metadata for an artifact in a Service Registry instance Editable metadata includes fields like name and description

This command is available as part of the Development Preview release.

rhoas service-registry artifact metadata-set [flags]

Examples

## Update the metadata for an artifact
rhoas service-registry artifact metadata-set --artifact-id=my-artifact --group=my-group --name=my-name --description=my-description

## Update the metadata for an artifact using your default editor ($EDITOR)
rhoas service-registry artifact metadata-set --artifact-id=my-artifact

##  Update the metadata for an artifact using Visual Studio Code
EDITOR="code -w" rhoas service-registry artifact metadata-set --artifact-id=my-artifact

Options

--artifact-id string
ID of the artifact
--description string
Custom description of the artifact
-g, --group string
Artifact group (default "default")
--instance-id string
ID of the Service Registry instance to be used. By default, uses the currently selected instance
--name string
Custom name of the artifact
-o, --output string
Output format (json, yaml, yml)

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

rhoas service-registry artifact state-set

[beta] Set artifact state

Synopsis

Set artifact state by setting one of possible values - ENABLED (Enable artifact) - DISABLED (Disable artifact usage) - DEPRECATED (Deprecate artifact)

This command is available as part of the Development Preview release.

rhoas service-registry artifact state-set [flags]

Examples

## Set artifact state to DISABLED
rhoas service-registry artifact state-set --artifact-id=my-artifact --state=DISABLED

Options

--artifact-id string
ID of the artifact
-g, --group string
Artifact group (default "default")
--instance-id string
ID of the Service Registry instance to be used. By default, uses the currently selected instance
--state string
new artifact state

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

rhoas service-registry artifact update

[beta] Update artifact

Synopsis

Update artifact from file or directly standard input

Artifacts are typically in JSON format for most supported types, but may be in another format for a few (for example, PROTOBUF). The type of the content should be compatible with the current artifact type.

When successful, this creates a new version of the artifact, making it the most recent (and therefore official) version of the artifact.

An artifact is updated using the content provided in the request body. This content is updated under a unique artifactId provided by user.

Updated artifact content should conform to validity and compatibility rules set for the registry instance.

This command is available as part of the Development Preview release.

rhoas service-registry artifact update [flags]

Examples

## update artifact from group and artifact-id
rhoas service-registry artifact update --artifact-id=my-artifact --group my-group my-artifact.json

## update artifact from group and artifact-id
rhoas service-registry artifact update --artifact-id=my-artifact --group my-group my-artifact.json

Options

--artifact-id string
ID of the artifact
--description string
Custom description of the artifact
-f, --file string
File location of the artifact
-g, --group string
Artifact group (default "default")
--instance-id string
ID of the Service Registry instance to be used. By default, uses the currently selected instance
--name string
Custom name of the artifact
--version string
Custom version of the artifact (for example 1.0.0)

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

rhoas service-registry artifact versions

[beta] Get latest artifact versions by artifact-id and group

Synopsis

Get latest artifact versions by specifying group and artifact-id This command is available as part of the Development Preview release.

rhoas service-registry artifact versions [flags]

Examples

## Get latest artifact versions for default group
rhoas service-registry artifact versions --artifact-id=my-artifact

## Get latest artifact versions for my-group group
rhoas service-registry artifact versions --artifact-id=my-artifact --group mygroup

Options

--artifact-id string
ID of the artifact
-g, --group string
Artifact group (default "default")
--instance-id string
ID of the Service Registry instance to be used. By default, uses the currently selected instance
-o, --output string
Output format (json, yaml, yml)

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

rhoas service-registry artifact

[beta] Manage Service Registry artifacts

Synopsis

Manage Service Registry schema and API artifacts in the currently selected Service Registry instance.

Commands are executed on the currently selected Service Registry instance, which can be overridden using the --instance-id flag.

Service Registry enables developers to manage and share the structure of their data. For example, client applications can dynamically push or pull the latest schema or API updates to or from the registry without needing to redeploy. Service Registry also enables developers to create rules that govern how registry content can evolve over time. For example, this includes rules for content validation and version compatibility.

Artifact commands enable client applications to manage the schema and API artifacts in the registry instance. This set of commands provide create, read, update, and delete operations for artifacts, rules, versions, and metadata.

This command is available as part of the Development Preview release.

Examples

## Create artifact in my-group from schema.json file
rhoas service-registry artifact create --artifact-id=my-artifact --group=my-group artifact.json

## Get artifact content
rhoas service-registry artifact get --artifact-id=my-artifact --group=my-group --output-file=artifact.json

## Get artifact content by hash
rhoas service-registry artifact download --hash=cab4...al9 --output-file=artifact.json

## Delete artifact
rhoas service-registry artifact delete --artifact-id=my-artifact

## Get artifact metadata
rhoas service-registry artifact metadata --artifact-id=my-artifact --group=my-group

## Update artifact
rhoas service-registry artifact update --artifact-id=my-artifact artifact-new.json

## List artifacts
rhoas service-registry artifact list --group=my-group --limit=10 page=1

## View artifact versions
rhoas service-registry artifact versions --artifact-id=my-artifact --group=my-group

Artifacts file can be instance of any schema like OpenAPI, Avro etc.
For example: https://raw.githubusercontent.com/redhat-developer/app-services-cli/main/docs/resources/avro-userInfo.json

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

rhoas service-registry create

[beta] Create a Service Registry instance

Synopsis

Create a Service Registry instance to store and manage your schema and API artifacts.

This command is available as part of the Development Preview release.

rhoas service-registry create [flags]

Examples

## Create Service Registry instance
rhoas service-registry create --name myregistry

Options

--name string
Unique name of the Service Registry instance
-o, --output string
Format in which to display the Service Registry instance (choose from: "json", "yml", "yaml") (default "json")
--use
Set the new Service Registry instance to the current instance (default true)

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

rhoas service-registry delete

[beta] Delete a Service Registry instance

Synopsis

Delete a Service Registry instance along with all of its schema and API artifacts.

This command is available as part of the Development Preview release.

rhoas service-registry delete [flags]

Examples

# Delete a Service Registry instance by name
rhoas service-registry delete --name my-service-registry

# Delete a Service Registry instance by ID
rhoas service-registry delete --id 1iSY6RQ3JKI8Q0OTmjQFd3ocFRg

Options

--id string
Unique ID of the Service Registry instance you want to delete (if not provided, the current Service Registry instance will be deleted)
--name string
Name of the Service Registry instance to delete
-y, --yes
Skip confirmation to forcibly delete this Service Registry instance

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

rhoas service-registry describe

[beta] Describe a Service Registry instance

Synopsis

Describe a Service Registry instance. Fetch all required fields including the registry URL.

This command is available as part of the Development Preview release.

rhoas service-registry describe [flags]

Examples

# Describe a Service Registry instance by name
rhoas service-registry describe --name my-service-regisrty


# Describe a Service Registry instance by ID
rhoas service-registry describe --id 1iSY6RQ3JKI8Q0OTmjQFd3ocFRg

Options

--id string
Unique ID of the Service Registry instance (if not provided, the current Service Registry instance will be used)
--name string
Name of the Service Registry instance to view
-o, --output string
Format in which to display the Service Registry instance (choose from: "json", "yml", "yaml") (default "json")

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

rhoas service-registry list

[beta] List Service Registry instances

Synopsis

List all Service Registry instances for your account and paginate over the results.

This command is available as part of the Development Preview release.

rhoas service-registry list [flags]

Examples

rhoas service-registry list

Options

--limit int32
The maximum number of Service Registry instances to be returned (default 100)
-o, --output string
Format in which to display the Service Registry instance (choose from: "json", "yml", "yaml")
--page int32
Display the Service Registry instances from the specified page number (default 1)

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

rhoas service-registry role add

[beta] Add or update principal role

Synopsis

Add or update role for user or service account This command is available as part of the Development Preview release.

rhoas service-registry role add [flags]

Examples

## Create or update user role
rhoas service-registry role add --role=ADMIN --username=joedough

Options

--instance-id string
ID of the Service Registry instance to be used. By default, uses the currently selected instance
--role string
Role to apply
--service-account string
ServiceAccount name
--username string
Username of the user within organization

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

rhoas service-registry role list

[beta] List roles

Synopsis

Listing all roles on selected instance This command is available as part of the Development Preview release.

rhoas service-registry role list [flags]

Examples

## List user and service account roles
rhoas service-registry role list

Options

--instance-id string
ID of the Service Registry instance to be used. By default, uses the currently selected instance
-o, --output string
Output format (json, yaml, yml)

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

rhoas service-registry role revoke

[beta] Revoke role for principal

Synopsis

Revoke role for principal When revoking role of the owner of the instance user will still have ADMIN rights.

This command is available as part of the Development Preview release.

rhoas service-registry role revoke [flags]

Examples

## Revoke role for user
rhoas service-registry role revoke --username=janedough

Options

--instance-id string
ID of the Service Registry instance to be used. By default, uses the currently selected instance
--service-account string
ServiceAccount name
--username string
Username of the user within organization

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

rhoas service-registry role

[beta] Service Registry role management

Synopsis

Service Registry role management Set of commands that give users one of following permissions:

  • READ_ONLY (read artifacts)

  • DEVELOPER (write access to all resources)

  • ADMIN (Export/Import artifacts, Manage Roles)

Roles can be applied to users (e.g martin_redhat) and Service Account Client IDs (e.g srvc-acct-03ddedba-5b49-4aa0-9b68-02e8b8c31add). These commands are only accessible to users with the organization admin role or owners of the Service Registry instance.

This command is available as part of the Development Preview release.

Examples

## Create or update user role
rhoas service-registry role add --role=ADMIN --username=joedough

## List user and service account roles
rhoas service-registry role list

## Revoke role for user
rhoas service-registry role revoke --username=janedough

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

rhoas service-registry use

[beta] Use a Service Registry instance

Synopsis

Select a Service Registry instance to use with all instance-specific commands. You can specify a Service Registry instance by --name or --id.

When you set the Service Registry instance to be used, it is set as the current instance for all rhoas service-registry artifact commands.

This command is available as part of the Development Preview release.

rhoas service-registry use [flags]

Examples

# Use a Service Registry instance by name
rhoas service-registry use --name my-service-registry

# Use a Service Registry instance by ID
rhoas service-registry use --id 1iSY6RQ3JKI8Q0OTmjQFd3ocFRg

Options

--id string
Unique ID of the Service Registry instance you want to set as the current instance
--name string
Name the Service Registry instance you want to set as the current instance

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

rhoas service-registry

[beta] Service Registry commands

Synopsis

Manage and interact with your Service Registry instances directly from the command line.

Create new Service Registry instances and interact with them by adding schema and API artifacts and downloading them to your computer.

Commands are divided into the following categories: - instance management commands: create, list, and so on - commands executed on selected instance: artifacts - "use" command that selects the current instance

This command is available as part of the Development Preview release.

Examples

## Create Service Registry instance
rhoas service-registry create --name myregistry

## List Service Registry instances
rhoas service-registry list

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

rhoas status

View the status of all currently used services

Synopsis

View status information of your currently used services. Choose to view the status of all services with "rhoas status" or specific services with "rhoas status [service]"

To use a different service run "rhoas [service] use [args] [flags]".

rhoas status [args] [flags]

Examples

# view the status of all services
$ rhoas status

# view the status of the used Kafka
$ rhoas status kafka

# view the status of your services in JSON
$ rhoas status -o json

Options

-o, --output string
Format in which to display the status of your services (choose from: "json", "yml", "yaml")

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

rhoas whoami

Print current username

Synopsis

Print the username of the currently active user.

This command prints the username associated with the user currently logged in.

rhoas whoami [flags]

Examples

# print current username
$ rhoas whoami

Options inherited from parent commands

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode

See also

rhoas

RHOAS CLI

Synopsis

Manage your application services directly from the command line.

Examples

# authenticate securely through your web browser
$ rhoas login

# create a Kafka instance
$ rhoas kafka create --name my-kafka-instance

# create a service account and save credentials to a JSON file
$ rhoas service-account create -o json

# connect your Kubernetes/OpenShift cluster to a service
$ rhoas cluster connect

Options

-h, --help
Show help for a command
-v, --verbose
Enable verbose mode
--version
Show rhoas version

See also