Lenses Resource Names (LRNs)

LRNs uniquely identify all resources that Lenses understands. Examples are a Lenses User, a Kafka topic or a Kafka-Connect connector.

Use an LRN to specify a resource across all of Lenses, unambiguously:

  • To add topic permissions for a team in IAM permissions.

  • To share a consumer-group reference with a colleague.

LRN format

The top-level format has 3 parts called segments. A semi-colon : separates them:

service:resource-type:resource-id

service

service is the namespace of the Lenses service that manages a set of resource types.

e.g. kafka for things like topics and consumer groups.

resource-type

resource-type is the type of resources that are served by a service.

e.g. topic for a Kafka topic, consumer-group for a Kafka consumer group. They both belong to the kafka service.

resource-id

resource-id is the unique name or path that identifies a resource. The resource ID is specific to a service and resource type. The resource ID can be:

  • a single resource name, e.g. :

    • lucy.clearview@lenses.io for a user resource name.

    • The full LRN would be iam:user:lucy.clearview@lenses.io.

  • a nested resource path that contains slashes / e.g. :

    • dev-environment/kafka/my-topic for a kafka topic.

    • The full LRN would be kafka:topic:dev-environment/kafka/my-topic.

Examples

IAM user

iam:user:lucy.clearview@lenses.io

Kafka topic

kafka:topic:dev-environment/kafka/my-topic

Kafka consumer group

kafka:consumer-group:dev-environment/kafka/my-consumer-group

Schema Registry schema

schemas:schema:dev-environment/schema-registry/my-topic-value

Kafka Connect connector

kafka-connect:connector:dev-environment/connect-cluster-1/my-s3-sink

Allowed characters

LRNs separate top-level segments with a colon : and resource path segments with a slash /.

A segment may have:

  • Alphanumeric characters: a-z, A-Z, 0-9

  • Hyphen symbols only: -

Using wildcards

Use the wildcard asterisk * to express catch-all LRNs.

Good examples

Use these examples to express multiple resources easily.

Bad examples

Avoid these examples because they are ambiguous. Lenses does not allow them.

Last updated

Logo

2024 © Lenses.io Ltd. Apache, Apache Kafka, Kafka and associated open source project names are trademarks of the Apache Software Foundation.