1. Packages
  2. Aiven Provider
  3. API Docs
  4. KafkaAcl
Aiven v6.25.0 published on Friday, Sep 27, 2024 by Pulumi

aiven.KafkaAcl

Explore with Pulumi AI

aiven logo
Aiven v6.25.0 published on Friday, Sep 27, 2024 by Pulumi

    Creates and manages an access control list (ACL) entry for an Aiven for Apache Kafka® service.

    ACL entries grant users rights to produce, consume, and manage Kafka topics.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aiven from "@pulumi/aiven";
    
    const exampleAcl = new aiven.KafkaAcl("example_acl", {
        project: exampleProject.project,
        serviceName: exampleKafka.serviceName,
        topic: "example-topic",
        permission: "admin",
        username: "example-user",
    });
    
    import pulumi
    import pulumi_aiven as aiven
    
    example_acl = aiven.KafkaAcl("example_acl",
        project=example_project["project"],
        service_name=example_kafka["serviceName"],
        topic="example-topic",
        permission="admin",
        username="example-user")
    
    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.NewKafkaAcl(ctx, "example_acl", &aiven.KafkaAclArgs{
    			Project:     pulumi.Any(exampleProject.Project),
    			ServiceName: pulumi.Any(exampleKafka.ServiceName),
    			Topic:       pulumi.String("example-topic"),
    			Permission:  pulumi.String("admin"),
    			Username:    pulumi.String("example-user"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aiven = Pulumi.Aiven;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleAcl = new Aiven.KafkaAcl("example_acl", new()
        {
            Project = exampleProject.Project,
            ServiceName = exampleKafka.ServiceName,
            Topic = "example-topic",
            Permission = "admin",
            Username = "example-user",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aiven.KafkaAcl;
    import com.pulumi.aiven.KafkaAclArgs;
    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) {
            var exampleAcl = new KafkaAcl("exampleAcl", KafkaAclArgs.builder()
                .project(exampleProject.project())
                .serviceName(exampleKafka.serviceName())
                .topic("example-topic")
                .permission("admin")
                .username("example-user")
                .build());
    
        }
    }
    
    resources:
      exampleAcl:
        type: aiven:KafkaAcl
        name: example_acl
        properties:
          project: ${exampleProject.project}
          serviceName: ${exampleKafka.serviceName}
          topic: example-topic
          permission: admin
          username: example-user
    

    Create KafkaAcl Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new KafkaAcl(name: string, args: KafkaAclArgs, opts?: CustomResourceOptions);
    @overload
    def KafkaAcl(resource_name: str,
                 args: KafkaAclArgs,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def KafkaAcl(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 permission: Optional[str] = None,
                 project: Optional[str] = None,
                 service_name: Optional[str] = None,
                 topic: Optional[str] = None,
                 username: Optional[str] = None)
    func NewKafkaAcl(ctx *Context, name string, args KafkaAclArgs, opts ...ResourceOption) (*KafkaAcl, error)
    public KafkaAcl(string name, KafkaAclArgs args, CustomResourceOptions? opts = null)
    public KafkaAcl(String name, KafkaAclArgs args)
    public KafkaAcl(String name, KafkaAclArgs args, CustomResourceOptions options)
    
    type: aiven:KafkaAcl
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args KafkaAclArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args KafkaAclArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args KafkaAclArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args KafkaAclArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args KafkaAclArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var kafkaAclResource = new Aiven.KafkaAcl("kafkaAclResource", new()
    {
        Permission = "string",
        Project = "string",
        ServiceName = "string",
        Topic = "string",
        Username = "string",
    });
    
    example, err := aiven.NewKafkaAcl(ctx, "kafkaAclResource", &aiven.KafkaAclArgs{
    	Permission:  pulumi.String("string"),
    	Project:     pulumi.String("string"),
    	ServiceName: pulumi.String("string"),
    	Topic:       pulumi.String("string"),
    	Username:    pulumi.String("string"),
    })
    
    var kafkaAclResource = new KafkaAcl("kafkaAclResource", KafkaAclArgs.builder()
        .permission("string")
        .project("string")
        .serviceName("string")
        .topic("string")
        .username("string")
        .build());
    
    kafka_acl_resource = aiven.KafkaAcl("kafkaAclResource",
        permission="string",
        project="string",
        service_name="string",
        topic="string",
        username="string")
    
    const kafkaAclResource = new aiven.KafkaAcl("kafkaAclResource", {
        permission: "string",
        project: "string",
        serviceName: "string",
        topic: "string",
        username: "string",
    });
    
    type: aiven:KafkaAcl
    properties:
        permission: string
        project: string
        serviceName: string
        topic: string
        username: string
    

    KafkaAcl Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The KafkaAcl resource accepts the following input properties:

    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.
    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.
    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.
    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.
    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.
    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.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the KafkaAcl resource produces the following output properties:

    AclId string
    Kafka ACL ID.
    Id string
    The provider-assigned unique ID for this managed resource.
    AclId string
    Kafka ACL ID.
    Id string
    The provider-assigned unique ID for this managed resource.
    aclId String
    Kafka ACL ID.
    id String
    The provider-assigned unique ID for this managed resource.
    aclId string
    Kafka ACL ID.
    id string
    The provider-assigned unique ID for this managed resource.
    acl_id str
    Kafka ACL ID.
    id str
    The provider-assigned unique ID for this managed resource.
    aclId String
    Kafka ACL ID.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing KafkaAcl Resource

    Get an existing KafkaAcl resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: KafkaAclState, opts?: CustomResourceOptions): KafkaAcl
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            acl_id: Optional[str] = None,
            permission: Optional[str] = None,
            project: Optional[str] = None,
            service_name: Optional[str] = None,
            topic: Optional[str] = None,
            username: Optional[str] = None) -> KafkaAcl
    func GetKafkaAcl(ctx *Context, name string, id IDInput, state *KafkaAclState, opts ...ResourceOption) (*KafkaAcl, error)
    public static KafkaAcl Get(string name, Input<string> id, KafkaAclState? state, CustomResourceOptions? opts = null)
    public static KafkaAcl get(String name, Output<String> id, KafkaAclState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AclId string
    Kafka ACL ID.
    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.
    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.
    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.
    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.
    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.
    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.

    Import

    $ pulumi import aiven:index/kafkaAcl:KafkaAcl example_acl PROJECT/SERVICE_NAME/ID
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Aiven pulumi/pulumi-aiven
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aiven Terraform Provider.
    aiven logo
    Aiven v6.25.0 published on Friday, Sep 27, 2024 by Pulumi