1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. CkafkaAclRule
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.CkafkaAclRule

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Provides a resource to create a ckafka acl_rule

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const aclRule = new tencentcloud.CkafkaAclRule("aclRule", {
        instanceId: "ckafka-xxx",
        isApplied: 1,
        pattern: "prefix",
        patternType: "PREFIXED",
        resourceType: "Topic",
        ruleLists: [{
            host: "*",
            operation: "All",
            permissionType: "Deny",
            principal: "User:*",
        }],
        ruleName: "RuleName",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    acl_rule = tencentcloud.CkafkaAclRule("aclRule",
        instance_id="ckafka-xxx",
        is_applied=1,
        pattern="prefix",
        pattern_type="PREFIXED",
        resource_type="Topic",
        rule_lists=[{
            "host": "*",
            "operation": "All",
            "permission_type": "Deny",
            "principal": "User:*",
        }],
        rule_name="RuleName")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := tencentcloud.NewCkafkaAclRule(ctx, "aclRule", &tencentcloud.CkafkaAclRuleArgs{
    			InstanceId:   pulumi.String("ckafka-xxx"),
    			IsApplied:    pulumi.Float64(1),
    			Pattern:      pulumi.String("prefix"),
    			PatternType:  pulumi.String("PREFIXED"),
    			ResourceType: pulumi.String("Topic"),
    			RuleLists: tencentcloud.CkafkaAclRuleRuleListArray{
    				&tencentcloud.CkafkaAclRuleRuleListArgs{
    					Host:           pulumi.String("*"),
    					Operation:      pulumi.String("All"),
    					PermissionType: pulumi.String("Deny"),
    					Principal:      pulumi.String("User:*"),
    				},
    			},
    			RuleName: pulumi.String("RuleName"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var aclRule = new Tencentcloud.CkafkaAclRule("aclRule", new()
        {
            InstanceId = "ckafka-xxx",
            IsApplied = 1,
            Pattern = "prefix",
            PatternType = "PREFIXED",
            ResourceType = "Topic",
            RuleLists = new[]
            {
                new Tencentcloud.Inputs.CkafkaAclRuleRuleListArgs
                {
                    Host = "*",
                    Operation = "All",
                    PermissionType = "Deny",
                    Principal = "User:*",
                },
            },
            RuleName = "RuleName",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.CkafkaAclRule;
    import com.pulumi.tencentcloud.CkafkaAclRuleArgs;
    import com.pulumi.tencentcloud.inputs.CkafkaAclRuleRuleListArgs;
    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 aclRule = new CkafkaAclRule("aclRule", CkafkaAclRuleArgs.builder()
                .instanceId("ckafka-xxx")
                .isApplied(1)
                .pattern("prefix")
                .patternType("PREFIXED")
                .resourceType("Topic")
                .ruleLists(CkafkaAclRuleRuleListArgs.builder()
                    .host("*")
                    .operation("All")
                    .permissionType("Deny")
                    .principal("User:*")
                    .build())
                .ruleName("RuleName")
                .build());
    
        }
    }
    
    resources:
      aclRule:
        type: tencentcloud:CkafkaAclRule
        properties:
          instanceId: ckafka-xxx
          isApplied: 1
          pattern: prefix
          patternType: PREFIXED
          resourceType: Topic
          ruleLists:
            - host: '*'
              operation: All
              permissionType: Deny
              principal: User:*
          ruleName: RuleName
    

    Create CkafkaAclRule Resource

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

    Constructor syntax

    new CkafkaAclRule(name: string, args: CkafkaAclRuleArgs, opts?: CustomResourceOptions);
    @overload
    def CkafkaAclRule(resource_name: str,
                      args: CkafkaAclRuleArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def CkafkaAclRule(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      instance_id: Optional[str] = None,
                      pattern_type: Optional[str] = None,
                      resource_type: Optional[str] = None,
                      rule_lists: Optional[Sequence[CkafkaAclRuleRuleListArgs]] = None,
                      rule_name: Optional[str] = None,
                      ckafka_acl_rule_id: Optional[str] = None,
                      is_applied: Optional[float] = None,
                      pattern: Optional[str] = None)
    func NewCkafkaAclRule(ctx *Context, name string, args CkafkaAclRuleArgs, opts ...ResourceOption) (*CkafkaAclRule, error)
    public CkafkaAclRule(string name, CkafkaAclRuleArgs args, CustomResourceOptions? opts = null)
    public CkafkaAclRule(String name, CkafkaAclRuleArgs args)
    public CkafkaAclRule(String name, CkafkaAclRuleArgs args, CustomResourceOptions options)
    
    type: tencentcloud:CkafkaAclRule
    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 CkafkaAclRuleArgs
    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 CkafkaAclRuleArgs
    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 CkafkaAclRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CkafkaAclRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CkafkaAclRuleArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    CkafkaAclRule 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 CkafkaAclRule resource accepts the following input properties:

    InstanceId string
    instance id.
    PatternType string
    Match type, currently supports prefix matching and preset strategy, enumeration value list{PREFIXED/PRESET}.
    ResourceType string
    Acl resource type, currently only supports Topic, enumeration value list{Topic}.
    RuleLists List<CkafkaAclRuleRuleList>
    List of configured ACL rules.
    RuleName string
    rule name.
    CkafkaAclRuleId string
    ID of the resource.
    IsApplied double
    Whether the preset ACL rule is applied to the newly added topic.
    Pattern string
    A value representing the prefix that the prefix matches.
    InstanceId string
    instance id.
    PatternType string
    Match type, currently supports prefix matching and preset strategy, enumeration value list{PREFIXED/PRESET}.
    ResourceType string
    Acl resource type, currently only supports Topic, enumeration value list{Topic}.
    RuleLists []CkafkaAclRuleRuleListArgs
    List of configured ACL rules.
    RuleName string
    rule name.
    CkafkaAclRuleId string
    ID of the resource.
    IsApplied float64
    Whether the preset ACL rule is applied to the newly added topic.
    Pattern string
    A value representing the prefix that the prefix matches.
    instanceId String
    instance id.
    patternType String
    Match type, currently supports prefix matching and preset strategy, enumeration value list{PREFIXED/PRESET}.
    resourceType String
    Acl resource type, currently only supports Topic, enumeration value list{Topic}.
    ruleLists List<CkafkaAclRuleRuleList>
    List of configured ACL rules.
    ruleName String
    rule name.
    ckafkaAclRuleId String
    ID of the resource.
    isApplied Double
    Whether the preset ACL rule is applied to the newly added topic.
    pattern String
    A value representing the prefix that the prefix matches.
    instanceId string
    instance id.
    patternType string
    Match type, currently supports prefix matching and preset strategy, enumeration value list{PREFIXED/PRESET}.
    resourceType string
    Acl resource type, currently only supports Topic, enumeration value list{Topic}.
    ruleLists CkafkaAclRuleRuleList[]
    List of configured ACL rules.
    ruleName string
    rule name.
    ckafkaAclRuleId string
    ID of the resource.
    isApplied number
    Whether the preset ACL rule is applied to the newly added topic.
    pattern string
    A value representing the prefix that the prefix matches.
    instance_id str
    instance id.
    pattern_type str
    Match type, currently supports prefix matching and preset strategy, enumeration value list{PREFIXED/PRESET}.
    resource_type str
    Acl resource type, currently only supports Topic, enumeration value list{Topic}.
    rule_lists Sequence[CkafkaAclRuleRuleListArgs]
    List of configured ACL rules.
    rule_name str
    rule name.
    ckafka_acl_rule_id str
    ID of the resource.
    is_applied float
    Whether the preset ACL rule is applied to the newly added topic.
    pattern str
    A value representing the prefix that the prefix matches.
    instanceId String
    instance id.
    patternType String
    Match type, currently supports prefix matching and preset strategy, enumeration value list{PREFIXED/PRESET}.
    resourceType String
    Acl resource type, currently only supports Topic, enumeration value list{Topic}.
    ruleLists List<Property Map>
    List of configured ACL rules.
    ruleName String
    rule name.
    ckafkaAclRuleId String
    ID of the resource.
    isApplied Number
    Whether the preset ACL rule is applied to the newly added topic.
    pattern String
    A value representing the prefix that the prefix matches.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the CkafkaAclRule 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 CkafkaAclRule Resource

    Get an existing CkafkaAclRule 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?: CkafkaAclRuleState, opts?: CustomResourceOptions): CkafkaAclRule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            ckafka_acl_rule_id: Optional[str] = None,
            instance_id: Optional[str] = None,
            is_applied: Optional[float] = None,
            pattern: Optional[str] = None,
            pattern_type: Optional[str] = None,
            resource_type: Optional[str] = None,
            rule_lists: Optional[Sequence[CkafkaAclRuleRuleListArgs]] = None,
            rule_name: Optional[str] = None) -> CkafkaAclRule
    func GetCkafkaAclRule(ctx *Context, name string, id IDInput, state *CkafkaAclRuleState, opts ...ResourceOption) (*CkafkaAclRule, error)
    public static CkafkaAclRule Get(string name, Input<string> id, CkafkaAclRuleState? state, CustomResourceOptions? opts = null)
    public static CkafkaAclRule get(String name, Output<String> id, CkafkaAclRuleState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:CkafkaAclRule    get:      id: ${id}
    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:
    CkafkaAclRuleId string
    ID of the resource.
    InstanceId string
    instance id.
    IsApplied double
    Whether the preset ACL rule is applied to the newly added topic.
    Pattern string
    A value representing the prefix that the prefix matches.
    PatternType string
    Match type, currently supports prefix matching and preset strategy, enumeration value list{PREFIXED/PRESET}.
    ResourceType string
    Acl resource type, currently only supports Topic, enumeration value list{Topic}.
    RuleLists List<CkafkaAclRuleRuleList>
    List of configured ACL rules.
    RuleName string
    rule name.
    CkafkaAclRuleId string
    ID of the resource.
    InstanceId string
    instance id.
    IsApplied float64
    Whether the preset ACL rule is applied to the newly added topic.
    Pattern string
    A value representing the prefix that the prefix matches.
    PatternType string
    Match type, currently supports prefix matching and preset strategy, enumeration value list{PREFIXED/PRESET}.
    ResourceType string
    Acl resource type, currently only supports Topic, enumeration value list{Topic}.
    RuleLists []CkafkaAclRuleRuleListArgs
    List of configured ACL rules.
    RuleName string
    rule name.
    ckafkaAclRuleId String
    ID of the resource.
    instanceId String
    instance id.
    isApplied Double
    Whether the preset ACL rule is applied to the newly added topic.
    pattern String
    A value representing the prefix that the prefix matches.
    patternType String
    Match type, currently supports prefix matching and preset strategy, enumeration value list{PREFIXED/PRESET}.
    resourceType String
    Acl resource type, currently only supports Topic, enumeration value list{Topic}.
    ruleLists List<CkafkaAclRuleRuleList>
    List of configured ACL rules.
    ruleName String
    rule name.
    ckafkaAclRuleId string
    ID of the resource.
    instanceId string
    instance id.
    isApplied number
    Whether the preset ACL rule is applied to the newly added topic.
    pattern string
    A value representing the prefix that the prefix matches.
    patternType string
    Match type, currently supports prefix matching and preset strategy, enumeration value list{PREFIXED/PRESET}.
    resourceType string
    Acl resource type, currently only supports Topic, enumeration value list{Topic}.
    ruleLists CkafkaAclRuleRuleList[]
    List of configured ACL rules.
    ruleName string
    rule name.
    ckafka_acl_rule_id str
    ID of the resource.
    instance_id str
    instance id.
    is_applied float
    Whether the preset ACL rule is applied to the newly added topic.
    pattern str
    A value representing the prefix that the prefix matches.
    pattern_type str
    Match type, currently supports prefix matching and preset strategy, enumeration value list{PREFIXED/PRESET}.
    resource_type str
    Acl resource type, currently only supports Topic, enumeration value list{Topic}.
    rule_lists Sequence[CkafkaAclRuleRuleListArgs]
    List of configured ACL rules.
    rule_name str
    rule name.
    ckafkaAclRuleId String
    ID of the resource.
    instanceId String
    instance id.
    isApplied Number
    Whether the preset ACL rule is applied to the newly added topic.
    pattern String
    A value representing the prefix that the prefix matches.
    patternType String
    Match type, currently supports prefix matching and preset strategy, enumeration value list{PREFIXED/PRESET}.
    resourceType String
    Acl resource type, currently only supports Topic, enumeration value list{Topic}.
    ruleLists List<Property Map>
    List of configured ACL rules.
    ruleName String
    rule name.

    Supporting Types

    CkafkaAclRuleRuleList, CkafkaAclRuleRuleListArgs

    Host string
    The default is *, which means that any host can be accessed. Currently, ckafka does not support host and ip network segment.
    Operation string
    Acl operation mode, enumeration value (all operations All, read Read, write Write).
    PermissionType string
    permission type, (Deny|Allow).
    Principal string
    User list, the default is User:, which means that any user can access, and the current user can only be the user included in the user list. The input format needs to be prefixed with [User:]. For example, user A is passed in as User:A.
    Host string
    The default is *, which means that any host can be accessed. Currently, ckafka does not support host and ip network segment.
    Operation string
    Acl operation mode, enumeration value (all operations All, read Read, write Write).
    PermissionType string
    permission type, (Deny|Allow).
    Principal string
    User list, the default is User:, which means that any user can access, and the current user can only be the user included in the user list. The input format needs to be prefixed with [User:]. For example, user A is passed in as User:A.
    host String
    The default is *, which means that any host can be accessed. Currently, ckafka does not support host and ip network segment.
    operation String
    Acl operation mode, enumeration value (all operations All, read Read, write Write).
    permissionType String
    permission type, (Deny|Allow).
    principal String
    User list, the default is User:, which means that any user can access, and the current user can only be the user included in the user list. The input format needs to be prefixed with [User:]. For example, user A is passed in as User:A.
    host string
    The default is *, which means that any host can be accessed. Currently, ckafka does not support host and ip network segment.
    operation string
    Acl operation mode, enumeration value (all operations All, read Read, write Write).
    permissionType string
    permission type, (Deny|Allow).
    principal string
    User list, the default is User:, which means that any user can access, and the current user can only be the user included in the user list. The input format needs to be prefixed with [User:]. For example, user A is passed in as User:A.
    host str
    The default is *, which means that any host can be accessed. Currently, ckafka does not support host and ip network segment.
    operation str
    Acl operation mode, enumeration value (all operations All, read Read, write Write).
    permission_type str
    permission type, (Deny|Allow).
    principal str
    User list, the default is User:, which means that any user can access, and the current user can only be the user included in the user list. The input format needs to be prefixed with [User:]. For example, user A is passed in as User:A.
    host String
    The default is *, which means that any host can be accessed. Currently, ckafka does not support host and ip network segment.
    operation String
    Acl operation mode, enumeration value (all operations All, read Read, write Write).
    permissionType String
    permission type, (Deny|Allow).
    principal String
    User list, the default is User:, which means that any user can access, and the current user can only be the user included in the user list. The input format needs to be prefixed with [User:]. For example, user A is passed in as User:A.

    Import

    ckafka acl_rule can be imported using the id, e.g.

    $ pulumi import tencentcloud:index/ckafkaAclRule:CkafkaAclRule acl_rule acl_rule_id
    

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

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack