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",
});
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")
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
})
}
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",
});
});
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());
}
}
resources:
test:
type: kafka:Acl
properties:
aclResourceName: syslog
aclResourceType: Topic
aclPrincipal: User:Alice
aclHost: '*'
aclOperation: Write
aclPermissionType: Deny
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)
type: kafka:Acl
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 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.
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",
});
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"),
})
var aclResource = new Acl("aclResource", AclArgs.builder()
.aclHost("string")
.aclOperation("string")
.aclPermissionType("string")
.aclPrincipal("string")
.aclResourceName("string")
.aclResourceType("string")
.resourcePatternTypeFilter("string")
.build());
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")
const aclResource = new kafka.Acl("aclResource", {
aclHost: "string",
aclOperation: "string",
aclPermissionType: "string",
aclPrincipal: "string",
aclResourceName: "string",
aclResourceType: "string",
resourcePatternTypeFilter: "string",
});
type: kafka:Acl
properties:
aclHost: string
aclOperation: string
aclPermissionType: string
aclPrincipal: string
aclResourceName: string
aclResourceType: string
resourcePatternTypeFilter: string
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:
- Acl
Host string - Host from which principal listed in
acl_principal
will have access. - Acl
Operation string - 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 stringType - Type of permission. Valid values are
Unknown
,Any
,Allow
,Deny
. - Acl
Principal string - Principal that is being allowed or denied.
- Acl
Resource stringName - The name of the resource.
- Acl
Resource stringType - The type of resource. Valid values are
Unknown
,Any
,Topic
,Group
,Cluster
,TransactionalID
. - Resource
Pattern stringType Filter - The pattern filter. Valid values
are
Prefixed
,Any
,Match
,Literal
. DefaultLiteral
.
- Acl
Host string - Host from which principal listed in
acl_principal
will have access. - Acl
Operation string - 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 stringType - Type of permission. Valid values are
Unknown
,Any
,Allow
,Deny
. - Acl
Principal string - Principal that is being allowed or denied.
- Acl
Resource stringName - The name of the resource.
- Acl
Resource stringType - The type of resource. Valid values are
Unknown
,Any
,Topic
,Group
,Cluster
,TransactionalID
. - Resource
Pattern stringType Filter - The pattern filter. Valid values
are
Prefixed
,Any
,Match
,Literal
. DefaultLiteral
.
- acl
Host String - Host from which principal listed in
acl_principal
will have access. - acl
Operation String - 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 StringType - Type of permission. Valid values are
Unknown
,Any
,Allow
,Deny
. - acl
Principal String - Principal that is being allowed or denied.
- acl
Resource StringName - The name of the resource.
- acl
Resource StringType - The type of resource. Valid values are
Unknown
,Any
,Topic
,Group
,Cluster
,TransactionalID
. - resource
Pattern StringType Filter - The pattern filter. Valid values
are
Prefixed
,Any
,Match
,Literal
. DefaultLiteral
.
- acl
Host string - Host from which principal listed in
acl_principal
will have access. - acl
Operation string - 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 stringType - Type of permission. Valid values are
Unknown
,Any
,Allow
,Deny
. - acl
Principal string - Principal that is being allowed or denied.
- acl
Resource stringName - The name of the resource.
- acl
Resource stringType - The type of resource. Valid values are
Unknown
,Any
,Topic
,Group
,Cluster
,TransactionalID
. - resource
Pattern stringType Filter - The pattern filter. Valid values
are
Prefixed
,Any
,Match
,Literal
. DefaultLiteral
.
- 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_ strtype - Type of permission. Valid values are
Unknown
,Any
,Allow
,Deny
. - acl_
principal str - Principal that is being allowed or denied.
- acl_
resource_ strname - The name of the resource.
- acl_
resource_ strtype - The type of resource. Valid values are
Unknown
,Any
,Topic
,Group
,Cluster
,TransactionalID
. - resource_
pattern_ strtype_ filter - The pattern filter. Valid values
are
Prefixed
,Any
,Match
,Literal
. DefaultLiteral
.
- acl
Host String - Host from which principal listed in
acl_principal
will have access. - acl
Operation String - 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 StringType - Type of permission. Valid values are
Unknown
,Any
,Allow
,Deny
. - acl
Principal String - Principal that is being allowed or denied.
- acl
Resource StringName - The name of the resource.
- acl
Resource StringType - The type of resource. Valid values are
Unknown
,Any
,Topic
,Group
,Cluster
,TransactionalID
. - resource
Pattern StringType Filter - The pattern filter. Valid values
are
Prefixed
,Any
,Match
,Literal
. DefaultLiteral
.
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.
- Acl
Host string - Host from which principal listed in
acl_principal
will have access. - Acl
Operation string - 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 stringType - Type of permission. Valid values are
Unknown
,Any
,Allow
,Deny
. - Acl
Principal string - Principal that is being allowed or denied.
- Acl
Resource stringName - The name of the resource.
- Acl
Resource stringType - The type of resource. Valid values are
Unknown
,Any
,Topic
,Group
,Cluster
,TransactionalID
. - Resource
Pattern stringType Filter - The pattern filter. Valid values
are
Prefixed
,Any
,Match
,Literal
. DefaultLiteral
.
- Acl
Host string - Host from which principal listed in
acl_principal
will have access. - Acl
Operation string - 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 stringType - Type of permission. Valid values are
Unknown
,Any
,Allow
,Deny
. - Acl
Principal string - Principal that is being allowed or denied.
- Acl
Resource stringName - The name of the resource.
- Acl
Resource stringType - The type of resource. Valid values are
Unknown
,Any
,Topic
,Group
,Cluster
,TransactionalID
. - Resource
Pattern stringType Filter - The pattern filter. Valid values
are
Prefixed
,Any
,Match
,Literal
. DefaultLiteral
.
- acl
Host String - Host from which principal listed in
acl_principal
will have access. - acl
Operation String - 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 StringType - Type of permission. Valid values are
Unknown
,Any
,Allow
,Deny
. - acl
Principal String - Principal that is being allowed or denied.
- acl
Resource StringName - The name of the resource.
- acl
Resource StringType - The type of resource. Valid values are
Unknown
,Any
,Topic
,Group
,Cluster
,TransactionalID
. - resource
Pattern StringType Filter - The pattern filter. Valid values
are
Prefixed
,Any
,Match
,Literal
. DefaultLiteral
.
- acl
Host string - Host from which principal listed in
acl_principal
will have access. - acl
Operation string - 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 stringType - Type of permission. Valid values are
Unknown
,Any
,Allow
,Deny
. - acl
Principal string - Principal that is being allowed or denied.
- acl
Resource stringName - The name of the resource.
- acl
Resource stringType - The type of resource. Valid values are
Unknown
,Any
,Topic
,Group
,Cluster
,TransactionalID
. - resource
Pattern stringType Filter - The pattern filter. Valid values
are
Prefixed
,Any
,Match
,Literal
. DefaultLiteral
.
- 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_ strtype - Type of permission. Valid values are
Unknown
,Any
,Allow
,Deny
. - acl_
principal str - Principal that is being allowed or denied.
- acl_
resource_ strname - The name of the resource.
- acl_
resource_ strtype - The type of resource. Valid values are
Unknown
,Any
,Topic
,Group
,Cluster
,TransactionalID
. - resource_
pattern_ strtype_ filter - The pattern filter. Valid values
are
Prefixed
,Any
,Match
,Literal
. DefaultLiteral
.
- acl
Host String - Host from which principal listed in
acl_principal
will have access. - acl
Operation String - 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 StringType - Type of permission. Valid values are
Unknown
,Any
,Allow
,Deny
. - acl
Principal String - Principal that is being allowed or denied.
- acl
Resource StringName - The name of the resource.
- acl
Resource StringType - The type of resource. Valid values are
Unknown
,Any
,Topic
,Group
,Cluster
,TransactionalID
. - resource
Pattern StringType Filter - The pattern filter. Valid values
are
Prefixed
,Any
,Match
,Literal
. DefaultLiteral
.
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"
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.