getKafkaAcl
# Kafka ACL Data Source
The Data Source Kafka ACL data source provides information about the existing Aiven Kafka ACL for a Kafka service.
Example Usage
using Pulumi;
using Aiven = Pulumi.Aiven;
class MyStack : Stack
{
public MyStack()
{
var mytestacl = Output.Create(Aiven.GetKafkaAcl.InvokeAsync(new Aiven.GetKafkaAclArgs
{
Permission = "admin",
Project = aiven_project.Myproject.Project,
ServiceName = aiven_service.Myservice.Service_name,
Topic = "<TOPIC_NAME_PATTERN>",
Username = "<USERNAME_PATTERN>",
}));
}
}
package main
import (
"github.com/pulumi/pulumi-aiven/sdk/v3/go/aiven"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := aiven.LookupKafkaAcl(ctx, &aiven.LookupKafkaAclArgs{
Permission: "admin",
Project: aiven_project.Myproject.Project,
ServiceName: aiven_service.Myservice.Service_name,
Topic: "<TOPIC_NAME_PATTERN>",
Username: "<USERNAME_PATTERN>",
}, nil)
if err != nil {
return err
}
return nil
})
}
import pulumi
import pulumi_aiven as aiven
mytestacl = aiven.get_kafka_acl(permission="admin",
project=aiven_project["myproject"]["project"],
service_name=aiven_service["myservice"]["service_name"],
topic="<TOPIC_NAME_PATTERN>",
username="<USERNAME_PATTERN>")
import * as pulumi from "@pulumi/pulumi";
import * as aiven from "@pulumi/aiven";
const mytestacl = pulumi.all([aiven_project_myproject.project, aiven_service_myservice.serviceName]).apply(([project, serviceName]) => aiven.getKafkaAcl({
permission: "admin",
project: project,
serviceName: serviceName,
topic: "<TOPIC_NAME_PATTERN>",
username: "<USERNAME_PATTERN>",
}, { async: true }));
Using getKafkaAcl
function getKafkaAcl(args: GetKafkaAclArgs, opts?: InvokeOptions): Promise<GetKafkaAclResult>
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
func LookupKafkaAcl(ctx *Context, args *LookupKafkaAclArgs, opts ...InvokeOption) (*LookupKafkaAclResult, error)
Note: This function is named
LookupKafkaAcl
in the Go SDK.
public static class GetKafkaAcl {
public static Task<GetKafkaAclResult> InvokeAsync(GetKafkaAclArgs args, InvokeOptions? opts = null)
}
The following arguments are supported:
- Permission string
is the level of permission the matching users are given to the matching topics (admin, read, readwrite, write).
- Project string
and
service_name
- (Required) define the project and service the ACL belongs to. They should be defined using reference as shown above to set up dependencies correctly. These properties cannot be changed once the service is created. Doing so will result in the topic being deleted and new one created instead.- Service
Name string - Topic string
is a topic name pattern the ACL entry matches to.
- Username string
is a username pattern the ACL entry matches to.
- Permission string
is the level of permission the matching users are given to the matching topics (admin, read, readwrite, write).
- Project string
and
service_name
- (Required) define the project and service the ACL belongs to. They should be defined using reference as shown above to set up dependencies correctly. These properties cannot be changed once the service is created. Doing so will result in the topic being deleted and new one created instead.- Service
Name string - Topic string
is a topic name pattern the ACL entry matches to.
- Username string
is a username pattern the ACL entry matches to.
- permission string
is the level of permission the matching users are given to the matching topics (admin, read, readwrite, write).
- project string
and
service_name
- (Required) define the project and service the ACL belongs to. They should be defined using reference as shown above to set up dependencies correctly. These properties cannot be changed once the service is created. Doing so will result in the topic being deleted and new one created instead.- service
Name string - topic string
is a topic name pattern the ACL entry matches to.
- username string
is a username pattern the ACL entry matches to.
- permission str
is the level of permission the matching users are given to the matching topics (admin, read, readwrite, write).
- project str
and
service_name
- (Required) define the project and service the ACL belongs to. They should be defined using reference as shown above to set up dependencies correctly. These properties cannot be changed once the service is created. Doing so will result in the topic being deleted and new one created instead.- service_
name str - topic str
is a topic name pattern the ACL entry matches to.
- username str
is a username pattern the ACL entry matches to.
getKafkaAcl Result
The following output properties are available:
- Id string
The provider-assigned unique ID for this managed resource.
- Permission string
- Project string
- Service
Name string - Topic string
- Username string
- Id string
The provider-assigned unique ID for this managed resource.
- Permission string
- Project string
- Service
Name string - Topic string
- Username string
- id string
The provider-assigned unique ID for this managed resource.
- permission string
- project string
- service
Name string - topic string
- username string
- id str
The provider-assigned unique ID for this managed resource.
- permission str
- project str
- service_
name str - topic str
- username str
Package Details
- Repository
- https://github.com/pulumi/pulumi-aiven
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aiven
Terraform Provider.