1. Packages
  2. Aiven Provider
  3. API Docs
  4. getKafkaAcl
Aiven v6.37.0 published on Thursday, Apr 10, 2025 by Pulumi

aiven.getKafkaAcl

Explore with Pulumi AI

Aiven v6.37.0 published on Thursday, Apr 10, 2025 by Pulumi

Gets information about an ACL entry for an Aiven for Apache Kafka® service.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aiven from "@pulumi/aiven";

const exampleAcl = aiven.getKafkaAcl({
    project: exampleProject.project,
    serviceName: exampleKafka.serviceName,
    topic: "example-topic",
    permission: "admin",
    username: "example-user",
});
Copy
import pulumi
import pulumi_aiven as aiven

example_acl = aiven.get_kafka_acl(project=example_project["project"],
    service_name=example_kafka["serviceName"],
    topic="example-topic",
    permission="admin",
    username="example-user")
Copy
package main

import (
	"github.com/pulumi/pulumi-aiven/sdk/v6/go/aiven"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := aiven.LookupKafkaAcl(ctx, &aiven.LookupKafkaAclArgs{
			Project:     exampleProject.Project,
			ServiceName: exampleKafka.ServiceName,
			Topic:       "example-topic",
			Permission:  "admin",
			Username:    "example-user",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aiven = Pulumi.Aiven;

return await Deployment.RunAsync(() => 
{
    var exampleAcl = Aiven.GetKafkaAcl.Invoke(new()
    {
        Project = exampleProject.Project,
        ServiceName = exampleKafka.ServiceName,
        Topic = "example-topic",
        Permission = "admin",
        Username = "example-user",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aiven.AivenFunctions;
import com.pulumi.aiven.inputs.GetKafkaAclArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var exampleAcl = AivenFunctions.getKafkaAcl(GetKafkaAclArgs.builder()
            .project(exampleProject.project())
            .serviceName(exampleKafka.serviceName())
            .topic("example-topic")
            .permission("admin")
            .username("example-user")
            .build());

    }
}
Copy
variables:
  exampleAcl:
    fn::invoke:
      function: aiven:getKafkaAcl
      arguments:
        project: ${exampleProject.project}
        serviceName: ${exampleKafka.serviceName}
        topic: example-topic
        permission: admin
        username: example-user
Copy

Using getKafkaAcl

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getKafkaAcl(args: GetKafkaAclArgs, opts?: InvokeOptions): Promise<GetKafkaAclResult>
function getKafkaAclOutput(args: GetKafkaAclOutputArgs, opts?: InvokeOptions): Output<GetKafkaAclResult>
Copy
def get_kafka_acl(permission: Optional[str] = None,
                  project: Optional[str] = None,
                  service_name: Optional[str] = None,
                  topic: Optional[str] = None,
                  username: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetKafkaAclResult
def get_kafka_acl_output(permission: Optional[pulumi.Input[str]] = None,
                  project: Optional[pulumi.Input[str]] = None,
                  service_name: Optional[pulumi.Input[str]] = None,
                  topic: Optional[pulumi.Input[str]] = None,
                  username: Optional[pulumi.Input[str]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[GetKafkaAclResult]
Copy
func LookupKafkaAcl(ctx *Context, args *LookupKafkaAclArgs, opts ...InvokeOption) (*LookupKafkaAclResult, error)
func LookupKafkaAclOutput(ctx *Context, args *LookupKafkaAclOutputArgs, opts ...InvokeOption) LookupKafkaAclResultOutput
Copy

> Note: This function is named LookupKafkaAcl in the Go SDK.

public static class GetKafkaAcl 
{
    public static Task<GetKafkaAclResult> InvokeAsync(GetKafkaAclArgs args, InvokeOptions? opts = null)
    public static Output<GetKafkaAclResult> Invoke(GetKafkaAclInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetKafkaAclResult> getKafkaAcl(GetKafkaAclArgs args, InvokeOptions options)
public static Output<GetKafkaAclResult> getKafkaAcl(GetKafkaAclArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: aiven:index/getKafkaAcl:getKafkaAcl
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Permission This property is required. string
Permissions to grant. The possible values are admin, read, readwrite and write. Changing this property forces recreation of the resource.
Project This property is required. string
The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
ServiceName This property is required. string
The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
Topic This property is required. string
Topics that the permissions apply to. Changing this property forces recreation of the resource.
Username This property is required. string
Usernames to grant permissions to. Changing this property forces recreation of the resource.
Permission This property is required. string
Permissions to grant. The possible values are admin, read, readwrite and write. Changing this property forces recreation of the resource.
Project This property is required. string
The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
ServiceName This property is required. string
The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
Topic This property is required. string
Topics that the permissions apply to. Changing this property forces recreation of the resource.
Username This property is required. string
Usernames to grant permissions to. Changing this property forces recreation of the resource.
permission This property is required. String
Permissions to grant. The possible values are admin, read, readwrite and write. Changing this property forces recreation of the resource.
project This property is required. String
The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
serviceName This property is required. String
The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
topic This property is required. String
Topics that the permissions apply to. Changing this property forces recreation of the resource.
username This property is required. String
Usernames to grant permissions to. Changing this property forces recreation of the resource.
permission This property is required. string
Permissions to grant. The possible values are admin, read, readwrite and write. Changing this property forces recreation of the resource.
project This property is required. string
The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
serviceName This property is required. string
The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
topic This property is required. string
Topics that the permissions apply to. Changing this property forces recreation of the resource.
username This property is required. string
Usernames to grant permissions to. Changing this property forces recreation of the resource.
permission This property is required. str
Permissions to grant. The possible values are admin, read, readwrite and write. Changing this property forces recreation of the resource.
project This property is required. str
The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
service_name This property is required. str
The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
topic This property is required. str
Topics that the permissions apply to. Changing this property forces recreation of the resource.
username This property is required. str
Usernames to grant permissions to. Changing this property forces recreation of the resource.
permission This property is required. String
Permissions to grant. The possible values are admin, read, readwrite and write. Changing this property forces recreation of the resource.
project This property is required. String
The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
serviceName This property is required. String
The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
topic This property is required. String
Topics that the permissions apply to. Changing this property forces recreation of the resource.
username This property is required. String
Usernames to grant permissions to. Changing this property forces recreation of the resource.

getKafkaAcl Result

The following output properties are available:

AclId string
Kafka ACL ID.
Id string
The provider-assigned unique ID for this managed resource.
Permission string
Permissions to grant. The possible values are admin, read, readwrite and write. Changing this property forces recreation of the resource.
Project string
The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
ServiceName string
The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
Topic string
Topics that the permissions apply to. Changing this property forces recreation of the resource.
Username string
Usernames to grant permissions to. Changing this property forces recreation of the resource.
AclId string
Kafka ACL ID.
Id string
The provider-assigned unique ID for this managed resource.
Permission string
Permissions to grant. The possible values are admin, read, readwrite and write. Changing this property forces recreation of the resource.
Project string
The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
ServiceName string
The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
Topic string
Topics that the permissions apply to. Changing this property forces recreation of the resource.
Username string
Usernames to grant permissions to. Changing this property forces recreation of the resource.
aclId String
Kafka ACL ID.
id String
The provider-assigned unique ID for this managed resource.
permission String
Permissions to grant. The possible values are admin, read, readwrite and write. Changing this property forces recreation of the resource.
project String
The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
serviceName String
The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
topic String
Topics that the permissions apply to. Changing this property forces recreation of the resource.
username String
Usernames to grant permissions to. Changing this property forces recreation of the resource.
aclId string
Kafka ACL ID.
id string
The provider-assigned unique ID for this managed resource.
permission string
Permissions to grant. The possible values are admin, read, readwrite and write. Changing this property forces recreation of the resource.
project string
The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
serviceName string
The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
topic string
Topics that the permissions apply to. Changing this property forces recreation of the resource.
username string
Usernames to grant permissions to. Changing this property forces recreation of the resource.
acl_id str
Kafka ACL ID.
id str
The provider-assigned unique ID for this managed resource.
permission str
Permissions to grant. The possible values are admin, read, readwrite and write. Changing this property forces recreation of the resource.
project str
The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
service_name str
The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
topic str
Topics that the permissions apply to. Changing this property forces recreation of the resource.
username str
Usernames to grant permissions to. Changing this property forces recreation of the resource.
aclId String
Kafka ACL ID.
id String
The provider-assigned unique ID for this managed resource.
permission String
Permissions to grant. The possible values are admin, read, readwrite and write. Changing this property forces recreation of the resource.
project String
The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
serviceName String
The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
topic String
Topics that the permissions apply to. Changing this property forces recreation of the resource.
username String
Usernames to grant permissions to. Changing this property forces recreation of the resource.

Package Details

Repository
Aiven pulumi/pulumi-aiven
License
Apache-2.0
Notes
This Pulumi package is based on the aiven Terraform Provider.
Aiven v6.37.0 published on Thursday, Apr 10, 2025 by Pulumi