> For the complete documentation index, see [llms.txt](https://docs.lenses.io/latest/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lenses.io/latest/user-guide/using/security/iam-reference.md).

# IAM Reference

This page describes the IAM Reference options.

### Administration

service: **administration**

**Resource Syntax**

* `administration:connection:${Environment}/${Connection}`
* `administration:license:${Environment}/${License}`
* `administration:lenses-logs:${Environment}/${LensesLogs}`
* `administration:lenses-configuration:${Environment}/${LensesConfiguration}`
* `administration:setting:${Environment}/${Setting}`

| Operation              | Resource Type        | Description                                                                                |
| ---------------------- | -------------------- | ------------------------------------------------------------------------------------------ |
| CreateConnection       | connection           |                                                                                            |
| ListConnections        | connection           |                                                                                            |
| GetConnectionDetails   | connection           |                                                                                            |
| UpdateConnection       | connection           |                                                                                            |
| DeleteConnection       | connection           |                                                                                            |
| ListLicenses           | license              |                                                                                            |
| GetLicenseDetails      | license              |                                                                                            |
| UpdateLicenseDetails   | license              |                                                                                            |
| GetLensesLogs          | lenses-logs          | Read the Agent logs and the full detail of failed connection tests. See the warning below. |
| GetLensesConfiguration | lenses-configuration |                                                                                            |
| GetSetting             | setting              |                                                                                            |
| UpdateSetting          | setting              |                                                                                            |

{% hint style="warning" %}
`GetLensesLogs` is a sensitive permission. Users who have it can read the Agent logs. When they test a connection or a provisioning file, a failed test also shows them the full detail the Agent logs, which can include what the tested service returned. Grant `GetLensesLogs` only to operators and administrators.
{% endhint %}

### Applications

service: **applications**

**Resource Syntax**

| Operation                 | Resource Type        | Description |
| ------------------------- | -------------------- | ----------- |
| RegisterApplication       | external-application |             |
| UnregisterApplication     | external-application |             |
| ListApplications          | external-application |             |
| GetApplicationDetails     | external-application |             |
| ListApplicationDependants | external-application |             |

### Alerts

service: **alerts**

**Resource Syntax**

* `alerts:rule:${Environment}/${AlertType}/${AlertRule}`
* `alerts:event:${Environment}/${AlertLevel}/${AlertCategory}`
* `alerts:channel:${Environment}/${AlertChannelType}/${AlertChannel}`

| Operation           | Resource Type | Description |
| ------------------- | ------------- | ----------- |
| CreateAlertRule     | rule          |             |
| DeleteAlertRule     | rule          |             |
| UpdateAlertRule     | rule          |             |
| ListAlertRules      | rule          |             |
| GetAlertRuleDetails | rule          |             |
| ToggleAlertRule     | rule          |             |
| GetChannelRoutes    | rule          |             |
| UpdateChannelRoutes | rule          |             |
| ListAlertEvents     | event         |             |
| CreateChannel       | channel       |             |
| ListChannels        | channel       |             |
| GetChannelDetails   | channel       |             |
| UpdateChannel       | channel       |             |
| DeleteChannel       | channel       |             |
| ToggleChannel       | channel       |             |

### K2K

service: **k2k**

**Resource Syntax**

* `k2k:app:${Name}`

| Action          | Resource Type | Description |
| --------------- | ------------- | ----------- |
| `CreateApp`     | `app`         |             |
| `DeleteApp`     | `app`         |             |
| `GetApp`        | `app`         |             |
| `ListApps`      | `app`         |             |
| `ManageOffsets` | `app`         |             |
| `UpdateApp`     | `app`         |             |
| `UpsertApp`     | `app`         |             |

### Audits

service: **audit**

**Resource Syntax**

* `audit:log:${Environment}/${Log}`
* `audit:channel:${Environment}/${AuditChannelType}/${AuditChannel}`

| Operation         | Resource Type | Description |
| ----------------- | ------------- | ----------- |
| ListLogs          | log           |             |
| DeleteLogs        | log           |             |
| CreateChannel     | channel       |             |
| ListChannels      | channel       |             |
| GetChannelDetails | channel       |             |
| UpdateChannel     | channel       |             |
| DeleteChannel     | channel       |             |
| ToggleChannel     | channel       |             |

### Data Policies

service: **data-policies**

{% hint style="warning" %}
The `data-policies` service controls agent data policies, which are deprecated from Lenses 6.3. See [Data policies](/latest/user-guide/using/governance/data-policies.md). To mask data with IAM, use [Data Policy Statements](#data-policy-statements) on roles.
{% endhint %}

**Resource Syntax**

* `data-policies:policy:${Environment}/${Policy}`

| Operation        | Resource Type | Description |
| ---------------- | ------------- | ----------- |
| CreatePolicy     | policy        |             |
| ListPolicies     | policy        |             |
| GetPolicyDetails | policy        |             |
| UpdatePolicy     | policy        |             |
| DeletePolicy     | policy        |             |

### Data Policy Statements

Data policy statements are not a service. They are set in the `data_policies` property of a role, next to `policy`. For how they apply and how to enable them on an agent, see [Data policies in IAM](/latest/user-guide/using/governance/data-policies-iam.md).

**Statement Syntax**

```yaml
name: ${Role}
policy: []
data_policies:
  - resources:
      - kafka:topic:${Environment}/kafka/${Topic}
    fields:
      - ${FieldPattern}
    obfuscation: ${ObfuscationType}
```

**Resource Syntax**

* `kafka:topic:${Environment}/kafka/${Topic}`

No other resource type is accepted.

| Property      | Required | Allowed values                                                                                                                                                                                                                                                                    |
| ------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `resources`   | Yes      | One or more `kafka:topic` resource patterns. `*` is the only wildcard.                                                                                                                                                                                                            |
| `fields`      | Yes      | One or more field path patterns, for example `email` or `*.email`. `*` is the only wildcard. `/` is not allowed.                                                                                                                                                                  |
| `obfuscation` | Yes      | `none`, `all`, `email`, `initials`, `first_1`, `first_2`, `first_3`, `first_4`, `last_1`, `last_2`, `last_3`, `last_4`, `number_negative_one`, `number_zero`, `number_null`. See [Obfuscation types](/latest/user-guide/using/governance/data-policies-iam.md#obfuscation-types). |

To create, change, view or delete data policy statements, use the role operations of the [IAM](#iam) service: `CreateRole`, `UpdateRole`, `GetRoleDetails` and `DeleteRole`.

### Environments

service: **environments**

**Resource Syntax**

* `environments:environment:${Environment}`

| Operation             | Resource Type | Description                                                                                                                  |
| --------------------- | ------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| CreateEnvironment     | environment   |                                                                                                                              |
| DeleteEnvironment     | environment   |                                                                                                                              |
| ListEnvironments      | environment   |                                                                                                                              |
| UpdateEnvironment     | environment   |                                                                                                                              |
| AccessEnvironment     | environment   |                                                                                                                              |
| GetEnvironmentDetails | environment   | Permission which allows users to gain overview of more information about the environment such as metrics, versions and more. |

### Kafka Connections

service: **environments**

**Resource Syntax**

* `environments:kafka-connection:${Environment}/${Connection}`

| Operation                 | Resource Type    | Description                         |
| ------------------------- | ---------------- | ----------------------------------- |
| GetKafkaConnectionDetails | kafka-connection |                                     |
| ListKafkaConnections      | kafka-connection |                                     |
| UpsertKafkaConnection     | kafka-connection | Create or update a Kafka Connection |
| DeleteKafkaConnection     | kafka-connection |                                     |

### Governance

service: **governance**

**Resource Syntax**

* `governance:request:${Environment}/*`
* `governance:rule:${Environment}/*`

Governance permissions apply to all requests and rules in an environment, so the resource always ends in `*`.

| Operation         | Resource Type | Description |
| ----------------- | ------------- | ----------- |
| CreateRequest     | request       |             |
| ListRequests      | request       |             |
| GetRequestDetails | request       |             |
| ApproveRequest    | request       |             |
| DenyRequest       | request       |             |
| GetRuleDetails    | rule          |             |
| UpdateRule        | rule          |             |

### IAM

service: **iam**

**Resource Syntax**

* `iam:role:${Role}`
* `iam:group:${Group}`
* `iam:user:${Username}`
* `iam:service-account:${ServiceAccount}`

| Operation                | Resource Type   | Description |
| ------------------------ | --------------- | ----------- |
| CreateRole               | role            |             |
| DeleteRole               | role            |             |
| UpdateRole               | role            |             |
| ListRoles                | role            |             |
| GetRoleDetails           | role            |             |
| CreateGroup              | group           |             |
| DeleteGroup              | group           |             |
| UpdateGroup              | group           |             |
| ListGroups               | group           |             |
| GetGroupDetails          | group           |             |
| CreateUser               | user            |             |
| DeleteUser               | user            |             |
| UpdateUser               | user            |             |
| ListUsers                | user            |             |
| GetUserDetails           | user            |             |
| CreateServiceAccount     | service-account |             |
| DeleteServiceAccount     | service-account |             |
| UpdateServiceAccount     | service-account |             |
| ListServiceAccounts      | service-account |             |
| GetServiceAccountDetails | service-account |             |

Roles can also contain data policy statements. See [Data Policy Statements](#data-policy-statements).

### Kafka Connect

service: **kafka-connect**

**Resource Syntax**

* `kafka-connect:connector:${Environment}/${KafkaConnectCluster}/${Connector}`
* `kafka-connect:cluster:${Environment}/${KafkaConnectCluster}`

**Example role permission**

```yaml
name: global-connector-operator
policy:
  - action:
      - iam:List*
      - iam:Get*
    resource: iam:*
    effect: allow
  - action:
      - environments:Get*
      - environments:List*
      - environments:AccessEnvironment
    resource: environments:*
    effect: allow
  - action:
      - kafka-connect:List*
      - kafka-connect:GetClusterDetails
      - kafka-connect:GetConnectorDetails
      - kafka-connect:StartConnector
      - kafka-connect:StopConnector
    resource:
      - kafka-connect:cluster:*/*
      - kafka-connect:connector:*/*/*
    effect: allow
```

| Operation                    | Resource Type | Description |
| ---------------------------- | ------------- | ----------- |
| CreateConnector              | connector     |             |
| ListConnectors               | connector     |             |
| GetConnectorDetails          | connector     |             |
| GetConnectorConfiguration    | connector     |             |
| UpdateConnectorConfiguration | connector     |             |
| DeleteConnector              | connector     |             |
| StartConnector               | connector     |             |
| StopConnector                | connector     |             |
| ListConnectorDependants      | connector     |             |
| ListClusters                 | cluster       |             |
| GetClusterDetails            | cluster       |             |
| DeployConnector              | cluster       |             |
| GetConnectorOffsets          | connector     |             |
| SetConnectoroffsets          | connector     |             |

### Kafka

service: **kafka**

**Resource Syntax**

* `kafka:topic:${Environment}/kafka/${Topic}`
* `kafka:acl:${Environment}/kafka/${AclResourceType}/${PrincipalType}/${Principal}`
* `kafka:quota:${Environment}/kafka/${QuotaPrincipalType}/${QuotaPrincipalIdPath}`
* `kafka:consumer-group:${Environment}/kafka/${ConsumerGroup}`
* `kafka:cluster:${Environment}/kafka`

**Example role permission**

```yaml
name: example
policy:
  - action:
      - kafka:ListTopics
      - kafka:GetTopicDetails
    resource:
      - kafka:topic:my_env/kafka/my_topic
```

| Operation                   | Resource Type  | Description                                                                                                                                                                                                                                 |
| --------------------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| CreateTopic                 | topic          |                                                                                                                                                                                                                                             |
| DeleteTopic                 | topic          |                                                                                                                                                                                                                                             |
| ListTopics                  | topic          |                                                                                                                                                                                                                                             |
| GetTopicDetails             | topic          |                                                                                                                                                                                                                                             |
| UpdateTopicDetails          | topic          |                                                                                                                                                                                                                                             |
| ReadTopicData               | topic          |                                                                                                                                                                                                                                             |
| WriteTopicData              | topic          |                                                                                                                                                                                                                                             |
| DeleteTopicData             | topic          |                                                                                                                                                                                                                                             |
| ListTopicDependants         | topic          | List visibility of all entities that depend on this entity e.g. ListTopicDependants means that you'll be able to see (i.e. List) all consumer groups that read from that topic regardless of what your specific consumer group permissions. |
| CreateAcl                   | acl            |                                                                                                                                                                                                                                             |
| ListAcls                    | acl            |                                                                                                                                                                                                                                             |
| GetAclDetails               | acl            |                                                                                                                                                                                                                                             |
| UpdateAcl                   | acl            |                                                                                                                                                                                                                                             |
| DeleteAcl                   | acl            |                                                                                                                                                                                                                                             |
| CreateQuota                 | quota          |                                                                                                                                                                                                                                             |
| ListQuotas                  | quota          |                                                                                                                                                                                                                                             |
| GetQuotaDetails             | quota          |                                                                                                                                                                                                                                             |
| UpdateQuota                 | quota          |                                                                                                                                                                                                                                             |
| DeleteQuota                 | quota          |                                                                                                                                                                                                                                             |
| DeleteConsumerGroup         | consumer-group |                                                                                                                                                                                                                                             |
| UpdateConsumerGroup         | consumer-group |                                                                                                                                                                                                                                             |
| ListConsumerGroups          | consumer-group |                                                                                                                                                                                                                                             |
| GetConsumerGroupDetails     | consumer-group |                                                                                                                                                                                                                                             |
| ListConsumerGroupDependants | consumer-group |                                                                                                                                                                                                                                             |

### Kubernetes

service: **kubernetes**

**Resource Syntax**

* `kubernetes:cluster:${Environment}/${KubernetesCluster}`
* `kubernetes:namespace:${Environment}/${KubernetesCluster}/${KubernetesNamespace}`

| Operation         | Resource Type | Description | Example |
| ----------------- | ------------- | ----------- | ------- |
| ListClusters      | cluster       |             |         |
| GetClusterDetails | cluster       |             |         |
| ListNamespaces    | namespace     |             |         |
| DeployApps        | namespace     |             |         |

### Registry

service: **registry**

**Resource Syntax**

* `schemas:registry:${Environment}/${SchemaRegistry}`

| Operation                   | Resource Type | Description |
| --------------------------- | ------------- | ----------- |
| GetRegistryConfiguration    | registry      |             |
| UpdateRegistryConfiguration | registry      |             |

### Schemas

service: **schemas**

**Resource Syntax**

* `schemas:schema:${Environment}/${SchemaRegistry}/${Schema}`

| Operation        | Resource Type | Description |
| ---------------- | ------------- | ----------- |
| CreateSchema     | schema        |             |
| DeleteSchema     | schema        |             |
| UpdateSchema     | schema        |             |
| GetSchemaDetails | schema        |             |
| ListSchemas      | schema        |             |

### SQL Streaming

service: **sql-streaming**

**Resource Syntax**

* `sql-streaming:sql-processor:${Environment}/${KubernetesCluster}/${KubernetesNamespace}/${SqlProcessor}`
* For IN\_PROC processors `sql-streaming:sql-processor:${Environment}/lenses-in-process/default/${SqlProcessor}`

**Available Actions**

| Operation               | Resource Type | Description |
| ----------------------- | ------------- | ----------- |
| CreateProcessor         | sql-processor |             |
| ListProcessors          | sql-processor |             |
| GetProcessorDetails     | sql-processor |             |
| GetProcessorSql         | sql-processor |             |
| UpdateProcessorSql      | sql-processor |             |
| DeleteProcessor         | sql-processor |             |
| StartProcessor          | sql-processor |             |
| StopProcessor           | sql-processor |             |
| ScaleProcessor          | sql-processor |             |
| GetProcessorLogs        | sql-processor |             |
| ListProcessorDependants | sql-processor |             |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.lenses.io/latest/user-guide/using/security/iam-reference.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
