kafka logo
Kafka v3.4.0, Jan 31 23

kafka.Acl

A resource for managing Kafka ACLs.

Example Usage

using System.Collections.Generic;
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",
    });

});
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
	})
}
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());

    }
}
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")
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",
});
resources:
  test:
    type: kafka:Acl
    properties:
      aclResourceName: syslog
      aclResourceType: Topic
      aclPrincipal: User:Alice
      aclHost: '*'
      aclOperation: Write
      aclPermissionType: Deny

Create Acl Resource

new Acl(name: string, args: AclArgs, opts?: CustomResourceOptions);
@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)
@overload
def Acl(resource_name: str,
        args: AclArgs,
        opts: Optional[ResourceOptions] = 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.

name string
The unique name of the resource.
args AclArgs
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 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 string
The unique name of the resource.
args AclArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AclArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args AclArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

The Acl resource accepts the following input properties:

AclHost string

Host from which principal listed in acl_principal will have access.

AclOperation 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 string

Type of permission. Valid values are Unknown, Any, Allow, Deny.

AclPrincipal string

Principal that is being allowed or denied.

AclResourceName string

The name of the resource.

AclResourceType string

The type of resource. Valid values are Unknown, Any, Topic, Group, Cluster, TransactionalID.

ResourcePatternTypeFilter string

The pattern filter. Valid values are Prefixed, Any, Match, Literal. Default Literal.

AclHost string

Host from which principal listed in acl_principal will have access.

AclOperation 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 string

Type of permission. Valid values are Unknown, Any, Allow, Deny.

AclPrincipal string

Principal that is being allowed or denied.

AclResourceName string

The name of the resource.

AclResourceType string

The type of resource. Valid values are Unknown, Any, Topic, Group, Cluster, TransactionalID.

ResourcePatternTypeFilter string

The pattern filter. Valid values are Prefixed, Any, Match, Literal. Default Literal.

aclHost String

Host from which principal listed in acl_principal will have access.

aclOperation 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 String

Type of permission. Valid values are Unknown, Any, Allow, Deny.

aclPrincipal String

Principal that is being allowed or denied.

aclResourceName String

The name of the resource.

aclResourceType String

The type of resource. Valid values are Unknown, Any, Topic, Group, Cluster, TransactionalID.

resourcePatternTypeFilter String

The pattern filter. Valid values are Prefixed, Any, Match, Literal. Default Literal.

aclHost string

Host from which principal listed in acl_principal will have access.

aclOperation 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 string

Type of permission. Valid values are Unknown, Any, Allow, Deny.

aclPrincipal string

Principal that is being allowed or denied.

aclResourceName string

The name of the resource.

aclResourceType string

The type of resource. Valid values are Unknown, Any, Topic, Group, Cluster, TransactionalID.

resourcePatternTypeFilter string

The pattern filter. Valid values are Prefixed, Any, Match, Literal. Default Literal.

acl_host str

Host from which principal listed in acl_principal will have access.

acl_operation 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 str

Type of permission. Valid values are Unknown, Any, Allow, Deny.

acl_principal str

Principal that is being allowed or denied.

acl_resource_name str

The name of the resource.

acl_resource_type str

The type of resource. Valid values are Unknown, Any, Topic, Group, Cluster, TransactionalID.

resource_pattern_type_filter str

The pattern filter. Valid values are Prefixed, Any, Match, Literal. Default Literal.

aclHost String

Host from which principal listed in acl_principal will have access.

aclOperation 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 String

Type of permission. Valid values are Unknown, Any, Allow, Deny.

aclPrincipal String

Principal that is being allowed or denied.

aclResourceName String

The name of the resource.

aclResourceType String

The type of resource. Valid values are Unknown, Any, Topic, Group, Cluster, TransactionalID.

resourcePatternTypeFilter 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)
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:
AclHost string

Host from which principal listed in acl_principal will have access.

AclOperation 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 string

Type of permission. Valid values are Unknown, Any, Allow, Deny.

AclPrincipal string

Principal that is being allowed or denied.

AclResourceName string

The name of the resource.

AclResourceType string

The type of resource. Valid values are Unknown, Any, Topic, Group, Cluster, TransactionalID.

ResourcePatternTypeFilter string

The pattern filter. Valid values are Prefixed, Any, Match, Literal. Default Literal.

AclHost string

Host from which principal listed in acl_principal will have access.

AclOperation 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 string

Type of permission. Valid values are Unknown, Any, Allow, Deny.

AclPrincipal string

Principal that is being allowed or denied.

AclResourceName string

The name of the resource.

AclResourceType string

The type of resource. Valid values are Unknown, Any, Topic, Group, Cluster, TransactionalID.

ResourcePatternTypeFilter string

The pattern filter. Valid values are Prefixed, Any, Match, Literal. Default Literal.

aclHost String

Host from which principal listed in acl_principal will have access.

aclOperation 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 String

Type of permission. Valid values are Unknown, Any, Allow, Deny.

aclPrincipal String

Principal that is being allowed or denied.

aclResourceName String

The name of the resource.

aclResourceType String

The type of resource. Valid values are Unknown, Any, Topic, Group, Cluster, TransactionalID.

resourcePatternTypeFilter String

The pattern filter. Valid values are Prefixed, Any, Match, Literal. Default Literal.

aclHost string

Host from which principal listed in acl_principal will have access.

aclOperation 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 string

Type of permission. Valid values are Unknown, Any, Allow, Deny.

aclPrincipal string

Principal that is being allowed or denied.

aclResourceName string

The name of the resource.

aclResourceType string

The type of resource. Valid values are Unknown, Any, Topic, Group, Cluster, TransactionalID.

resourcePatternTypeFilter string

The pattern filter. Valid values are Prefixed, Any, Match, Literal. Default Literal.

acl_host str

Host from which principal listed in acl_principal will have access.

acl_operation 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 str

Type of permission. Valid values are Unknown, Any, Allow, Deny.

acl_principal str

Principal that is being allowed or denied.

acl_resource_name str

The name of the resource.

acl_resource_type str

The type of resource. Valid values are Unknown, Any, Topic, Group, Cluster, TransactionalID.

resource_pattern_type_filter str

The pattern filter. Valid values are Prefixed, Any, Match, Literal. Default Literal.

aclHost String

Host from which principal listed in acl_principal will have access.

aclOperation 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 String

Type of permission. Valid values are Unknown, Any, Allow, Deny.

aclPrincipal String

Principal that is being allowed or denied.

aclResourceName String

The name of the resource.

aclResourceType String

The type of resource. Valid values are Unknown, Any, Topic, Group, Cluster, TransactionalID.

resourcePatternTypeFilter 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"

e.g.

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

Package Details

Repository
Kafka pulumi/pulumi-kafka
License
Apache-2.0
Notes

This Pulumi package is based on the kafka Terraform Provider.