1. Packages
  2. Kafka Provider
  3. API Docs
  4. Acl
Kafka v3.9.0 published on Sunday, Mar 9, 2025 by Pulumi

kafka.Acl

Explore with Pulumi AI

A resource for managing Kafka ACLs.

Example Usage

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

const test = new kafka.Acl("test", {
    aclResourceName: "syslog",
    aclResourceType: "Topic",
    aclPrincipal: "User:Alice",
    aclHost: "*",
    aclOperation: "Write",
    aclPermissionType: "Deny",
});
Copy
import pulumi
import pulumi_kafka as kafka

test = kafka.Acl("test",
    acl_resource_name="syslog",
    acl_resource_type="Topic",
    acl_principal="User:Alice",
    acl_host="*",
    acl_operation="Write",
    acl_permission_type="Deny")
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := kafka.NewAcl(ctx, "test", &kafka.AclArgs{
			AclResourceName:   pulumi.String("syslog"),
			AclResourceType:   pulumi.String("Topic"),
			AclPrincipal:      pulumi.String("User:Alice"),
			AclHost:           pulumi.String("*"),
			AclOperation:      pulumi.String("Write"),
			AclPermissionType: pulumi.String("Deny"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Kafka = Pulumi.Kafka;

return await Deployment.RunAsync(() => 
{
    var test = new Kafka.Acl("test", new()
    {
        AclResourceName = "syslog",
        AclResourceType = "Topic",
        AclPrincipal = "User:Alice",
        AclHost = "*",
        AclOperation = "Write",
        AclPermissionType = "Deny",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.kafka.Acl;
import com.pulumi.kafka.AclArgs;
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 test = new Acl("test", AclArgs.builder()
            .aclResourceName("syslog")
            .aclResourceType("Topic")
            .aclPrincipal("User:Alice")
            .aclHost("*")
            .aclOperation("Write")
            .aclPermissionType("Deny")
            .build());

    }
}
Copy
resources:
  test:
    type: kafka:Acl
    properties:
      aclResourceName: syslog
      aclResourceType: Topic
      aclPrincipal: User:Alice
      aclHost: '*'
      aclOperation: Write
      aclPermissionType: Deny
Copy

Create Acl Resource

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

Constructor syntax

new Acl(name: string, args: AclArgs, opts?: CustomResourceOptions);
@overload
def Acl(resource_name: str,
        args: AclArgs,
        opts: Optional[ResourceOptions] = None)

@overload
def Acl(resource_name: str,
        opts: Optional[ResourceOptions] = None,
        acl_host: Optional[str] = None,
        acl_operation: Optional[str] = None,
        acl_permission_type: Optional[str] = None,
        acl_principal: Optional[str] = None,
        acl_resource_name: Optional[str] = None,
        acl_resource_type: Optional[str] = None,
        resource_pattern_type_filter: Optional[str] = None)
func NewAcl(ctx *Context, name string, args AclArgs, opts ...ResourceOption) (*Acl, error)
public Acl(string name, AclArgs args, CustomResourceOptions? opts = null)
public Acl(String name, AclArgs args)
public Acl(String name, AclArgs args, CustomResourceOptions options)
type: kafka:Acl
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. AclArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. AclArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. AclArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. AclArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. AclArgs
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 aclResource = new Kafka.Acl("aclResource", new()
{
    AclHost = "string",
    AclOperation = "string",
    AclPermissionType = "string",
    AclPrincipal = "string",
    AclResourceName = "string",
    AclResourceType = "string",
    ResourcePatternTypeFilter = "string",
});
Copy
example, err := kafka.NewAcl(ctx, "aclResource", &kafka.AclArgs{
	AclHost:                   pulumi.String("string"),
	AclOperation:              pulumi.String("string"),
	AclPermissionType:         pulumi.String("string"),
	AclPrincipal:              pulumi.String("string"),
	AclResourceName:           pulumi.String("string"),
	AclResourceType:           pulumi.String("string"),
	ResourcePatternTypeFilter: pulumi.String("string"),
})
Copy
var aclResource = new Acl("aclResource", AclArgs.builder()
    .aclHost("string")
    .aclOperation("string")
    .aclPermissionType("string")
    .aclPrincipal("string")
    .aclResourceName("string")
    .aclResourceType("string")
    .resourcePatternTypeFilter("string")
    .build());
Copy
acl_resource = kafka.Acl("aclResource",
    acl_host="string",
    acl_operation="string",
    acl_permission_type="string",
    acl_principal="string",
    acl_resource_name="string",
    acl_resource_type="string",
    resource_pattern_type_filter="string")
Copy
const aclResource = new kafka.Acl("aclResource", {
    aclHost: "string",
    aclOperation: "string",
    aclPermissionType: "string",
    aclPrincipal: "string",
    aclResourceName: "string",
    aclResourceType: "string",
    resourcePatternTypeFilter: "string",
});
Copy
type: kafka:Acl
properties:
    aclHost: string
    aclOperation: string
    aclPermissionType: string
    aclPrincipal: string
    aclResourceName: string
    aclResourceType: string
    resourcePatternTypeFilter: string
Copy

Acl Resource Properties

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

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Acl resource accepts the following input properties:

AclHost
This property is required.
Changes to this property will trigger replacement.
string
Host from which principal listed in acl_principal will have access.
AclOperation
This property is required.
Changes to this property will trigger replacement.
string
Operation that is being allowed or denied. Valid values are Unknown, Any, All, Read, Write, Create, Delete, Alter, Describe, ClusterAction, DescribeConfigs, AlterConfigs, IdempotentWrite.
AclPermissionType
This property is required.
Changes to this property will trigger replacement.
string
Type of permission. Valid values are Unknown, Any, Allow, Deny.
AclPrincipal
This property is required.
Changes to this property will trigger replacement.
string
Principal that is being allowed or denied.
AclResourceName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource.
AclResourceType
This property is required.
Changes to this property will trigger replacement.
string
The type of resource. Valid values are Unknown, Any, Topic, Group, Cluster, TransactionalID.
ResourcePatternTypeFilter Changes to this property will trigger replacement. string
The pattern filter. Valid values are Prefixed, Any, Match, Literal. Default Literal.
AclHost
This property is required.
Changes to this property will trigger replacement.
string
Host from which principal listed in acl_principal will have access.
AclOperation
This property is required.
Changes to this property will trigger replacement.
string
Operation that is being allowed or denied. Valid values are Unknown, Any, All, Read, Write, Create, Delete, Alter, Describe, ClusterAction, DescribeConfigs, AlterConfigs, IdempotentWrite.
AclPermissionType
This property is required.
Changes to this property will trigger replacement.
string
Type of permission. Valid values are Unknown, Any, Allow, Deny.
AclPrincipal
This property is required.
Changes to this property will trigger replacement.
string
Principal that is being allowed or denied.
AclResourceName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource.
AclResourceType
This property is required.
Changes to this property will trigger replacement.
string
The type of resource. Valid values are Unknown, Any, Topic, Group, Cluster, TransactionalID.
ResourcePatternTypeFilter Changes to this property will trigger replacement. string
The pattern filter. Valid values are Prefixed, Any, Match, Literal. Default Literal.
aclHost
This property is required.
Changes to this property will trigger replacement.
String
Host from which principal listed in acl_principal will have access.
aclOperation
This property is required.
Changes to this property will trigger replacement.
String
Operation that is being allowed or denied. Valid values are Unknown, Any, All, Read, Write, Create, Delete, Alter, Describe, ClusterAction, DescribeConfigs, AlterConfigs, IdempotentWrite.
aclPermissionType
This property is required.
Changes to this property will trigger replacement.
String
Type of permission. Valid values are Unknown, Any, Allow, Deny.
aclPrincipal
This property is required.
Changes to this property will trigger replacement.
String
Principal that is being allowed or denied.
aclResourceName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource.
aclResourceType
This property is required.
Changes to this property will trigger replacement.
String
The type of resource. Valid values are Unknown, Any, Topic, Group, Cluster, TransactionalID.
resourcePatternTypeFilter Changes to this property will trigger replacement. String
The pattern filter. Valid values are Prefixed, Any, Match, Literal. Default Literal.
aclHost
This property is required.
Changes to this property will trigger replacement.
string
Host from which principal listed in acl_principal will have access.
aclOperation
This property is required.
Changes to this property will trigger replacement.
string
Operation that is being allowed or denied. Valid values are Unknown, Any, All, Read, Write, Create, Delete, Alter, Describe, ClusterAction, DescribeConfigs, AlterConfigs, IdempotentWrite.
aclPermissionType
This property is required.
Changes to this property will trigger replacement.
string
Type of permission. Valid values are Unknown, Any, Allow, Deny.
aclPrincipal
This property is required.
Changes to this property will trigger replacement.
string
Principal that is being allowed or denied.
aclResourceName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource.
aclResourceType
This property is required.
Changes to this property will trigger replacement.
string
The type of resource. Valid values are Unknown, Any, Topic, Group, Cluster, TransactionalID.
resourcePatternTypeFilter Changes to this property will trigger replacement. string
The pattern filter. Valid values are Prefixed, Any, Match, Literal. Default Literal.
acl_host
This property is required.
Changes to this property will trigger replacement.
str
Host from which principal listed in acl_principal will have access.
acl_operation
This property is required.
Changes to this property will trigger replacement.
str
Operation that is being allowed or denied. Valid values are Unknown, Any, All, Read, Write, Create, Delete, Alter, Describe, ClusterAction, DescribeConfigs, AlterConfigs, IdempotentWrite.
acl_permission_type
This property is required.
Changes to this property will trigger replacement.
str
Type of permission. Valid values are Unknown, Any, Allow, Deny.
acl_principal
This property is required.
Changes to this property will trigger replacement.
str
Principal that is being allowed or denied.
acl_resource_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the resource.
acl_resource_type
This property is required.
Changes to this property will trigger replacement.
str
The type of resource. Valid values are Unknown, Any, Topic, Group, Cluster, TransactionalID.
resource_pattern_type_filter Changes to this property will trigger replacement. str
The pattern filter. Valid values are Prefixed, Any, Match, Literal. Default Literal.
aclHost
This property is required.
Changes to this property will trigger replacement.
String
Host from which principal listed in acl_principal will have access.
aclOperation
This property is required.
Changes to this property will trigger replacement.
String
Operation that is being allowed or denied. Valid values are Unknown, Any, All, Read, Write, Create, Delete, Alter, Describe, ClusterAction, DescribeConfigs, AlterConfigs, IdempotentWrite.
aclPermissionType
This property is required.
Changes to this property will trigger replacement.
String
Type of permission. Valid values are Unknown, Any, Allow, Deny.
aclPrincipal
This property is required.
Changes to this property will trigger replacement.
String
Principal that is being allowed or denied.
aclResourceName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource.
aclResourceType
This property is required.
Changes to this property will trigger replacement.
String
The type of resource. Valid values are Unknown, Any, Topic, Group, Cluster, TransactionalID.
resourcePatternTypeFilter Changes to this property will trigger replacement. String
The pattern filter. Valid values are Prefixed, Any, Match, Literal. Default Literal.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing Acl Resource

Get an existing Acl 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?: AclState, opts?: CustomResourceOptions): Acl
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        acl_host: Optional[str] = None,
        acl_operation: Optional[str] = None,
        acl_permission_type: Optional[str] = None,
        acl_principal: Optional[str] = None,
        acl_resource_name: Optional[str] = None,
        acl_resource_type: Optional[str] = None,
        resource_pattern_type_filter: Optional[str] = None) -> Acl
func GetAcl(ctx *Context, name string, id IDInput, state *AclState, opts ...ResourceOption) (*Acl, error)
public static Acl Get(string name, Input<string> id, AclState? state, CustomResourceOptions? opts = null)
public static Acl get(String name, Output<String> id, AclState state, CustomResourceOptions options)
resources:  _:    type: kafka:Acl    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
AclHost Changes to this property will trigger replacement. string
Host from which principal listed in acl_principal will have access.
AclOperation Changes to this property will trigger replacement. string
Operation that is being allowed or denied. Valid values are Unknown, Any, All, Read, Write, Create, Delete, Alter, Describe, ClusterAction, DescribeConfigs, AlterConfigs, IdempotentWrite.
AclPermissionType Changes to this property will trigger replacement. string
Type of permission. Valid values are Unknown, Any, Allow, Deny.
AclPrincipal Changes to this property will trigger replacement. string
Principal that is being allowed or denied.
AclResourceName Changes to this property will trigger replacement. string
The name of the resource.
AclResourceType Changes to this property will trigger replacement. string
The type of resource. Valid values are Unknown, Any, Topic, Group, Cluster, TransactionalID.
ResourcePatternTypeFilter Changes to this property will trigger replacement. string
The pattern filter. Valid values are Prefixed, Any, Match, Literal. Default Literal.
AclHost Changes to this property will trigger replacement. string
Host from which principal listed in acl_principal will have access.
AclOperation Changes to this property will trigger replacement. string
Operation that is being allowed or denied. Valid values are Unknown, Any, All, Read, Write, Create, Delete, Alter, Describe, ClusterAction, DescribeConfigs, AlterConfigs, IdempotentWrite.
AclPermissionType Changes to this property will trigger replacement. string
Type of permission. Valid values are Unknown, Any, Allow, Deny.
AclPrincipal Changes to this property will trigger replacement. string
Principal that is being allowed or denied.
AclResourceName Changes to this property will trigger replacement. string
The name of the resource.
AclResourceType Changes to this property will trigger replacement. string
The type of resource. Valid values are Unknown, Any, Topic, Group, Cluster, TransactionalID.
ResourcePatternTypeFilter Changes to this property will trigger replacement. string
The pattern filter. Valid values are Prefixed, Any, Match, Literal. Default Literal.
aclHost Changes to this property will trigger replacement. String
Host from which principal listed in acl_principal will have access.
aclOperation Changes to this property will trigger replacement. String
Operation that is being allowed or denied. Valid values are Unknown, Any, All, Read, Write, Create, Delete, Alter, Describe, ClusterAction, DescribeConfigs, AlterConfigs, IdempotentWrite.
aclPermissionType Changes to this property will trigger replacement. String
Type of permission. Valid values are Unknown, Any, Allow, Deny.
aclPrincipal Changes to this property will trigger replacement. String
Principal that is being allowed or denied.
aclResourceName Changes to this property will trigger replacement. String
The name of the resource.
aclResourceType Changes to this property will trigger replacement. String
The type of resource. Valid values are Unknown, Any, Topic, Group, Cluster, TransactionalID.
resourcePatternTypeFilter Changes to this property will trigger replacement. String
The pattern filter. Valid values are Prefixed, Any, Match, Literal. Default Literal.
aclHost Changes to this property will trigger replacement. string
Host from which principal listed in acl_principal will have access.
aclOperation Changes to this property will trigger replacement. string
Operation that is being allowed or denied. Valid values are Unknown, Any, All, Read, Write, Create, Delete, Alter, Describe, ClusterAction, DescribeConfigs, AlterConfigs, IdempotentWrite.
aclPermissionType Changes to this property will trigger replacement. string
Type of permission. Valid values are Unknown, Any, Allow, Deny.
aclPrincipal Changes to this property will trigger replacement. string
Principal that is being allowed or denied.
aclResourceName Changes to this property will trigger replacement. string
The name of the resource.
aclResourceType Changes to this property will trigger replacement. string
The type of resource. Valid values are Unknown, Any, Topic, Group, Cluster, TransactionalID.
resourcePatternTypeFilter Changes to this property will trigger replacement. string
The pattern filter. Valid values are Prefixed, Any, Match, Literal. Default Literal.
acl_host Changes to this property will trigger replacement. str
Host from which principal listed in acl_principal will have access.
acl_operation Changes to this property will trigger replacement. str
Operation that is being allowed or denied. Valid values are Unknown, Any, All, Read, Write, Create, Delete, Alter, Describe, ClusterAction, DescribeConfigs, AlterConfigs, IdempotentWrite.
acl_permission_type Changes to this property will trigger replacement. str
Type of permission. Valid values are Unknown, Any, Allow, Deny.
acl_principal Changes to this property will trigger replacement. str
Principal that is being allowed or denied.
acl_resource_name Changes to this property will trigger replacement. str
The name of the resource.
acl_resource_type Changes to this property will trigger replacement. str
The type of resource. Valid values are Unknown, Any, Topic, Group, Cluster, TransactionalID.
resource_pattern_type_filter Changes to this property will trigger replacement. str
The pattern filter. Valid values are Prefixed, Any, Match, Literal. Default Literal.
aclHost Changes to this property will trigger replacement. String
Host from which principal listed in acl_principal will have access.
aclOperation Changes to this property will trigger replacement. String
Operation that is being allowed or denied. Valid values are Unknown, Any, All, Read, Write, Create, Delete, Alter, Describe, ClusterAction, DescribeConfigs, AlterConfigs, IdempotentWrite.
aclPermissionType Changes to this property will trigger replacement. String
Type of permission. Valid values are Unknown, Any, Allow, Deny.
aclPrincipal Changes to this property will trigger replacement. String
Principal that is being allowed or denied.
aclResourceName Changes to this property will trigger replacement. String
The name of the resource.
aclResourceType Changes to this property will trigger replacement. String
The type of resource. Valid values are Unknown, Any, Topic, Group, Cluster, TransactionalID.
resourcePatternTypeFilter Changes to this property will trigger replacement. String
The pattern filter. Valid values are Prefixed, Any, Match, Literal. Default Literal.

Import

ACLs can be imported using the following pattern

$ pulumi import kafka:index/acl:Acl test "acl_principal|acl_host|acl_operation|acl_permission_type|resource_type|resource_name|resource_pattern_type_filter"
Copy

e.g.

$ pulumi import kafka:index/acl:Acl test "User:Alice|*|Write|Deny|Topic|syslog|Prefixed"
Copy

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

Package Details

Repository
Kafka pulumi/pulumi-kafka
License
Apache-2.0
Notes
This Pulumi package is based on the kafka Terraform Provider.