tencentcloud.CkafkaAclRule
Explore with Pulumi AI
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:
- Instance
Id string - instance id.
- Pattern
Type string - Match type, currently supports prefix matching and preset strategy, enumeration value list{PREFIXED/PRESET}.
- Resource
Type string - Acl resource type, currently only supports Topic, enumeration value list{Topic}.
- Rule
Lists List<CkafkaAcl Rule Rule List> - List of configured ACL rules.
- Rule
Name string - rule name.
- Ckafka
Acl stringRule Id - ID of the resource.
- Is
Applied double - 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 string - instance id.
- Pattern
Type string - Match type, currently supports prefix matching and preset strategy, enumeration value list{PREFIXED/PRESET}.
- Resource
Type string - Acl resource type, currently only supports Topic, enumeration value list{Topic}.
- Rule
Lists []CkafkaAcl Rule Rule List Args - List of configured ACL rules.
- Rule
Name string - rule name.
- Ckafka
Acl stringRule Id - ID of the resource.
- Is
Applied float64 - 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 String - instance id.
- pattern
Type String - Match type, currently supports prefix matching and preset strategy, enumeration value list{PREFIXED/PRESET}.
- resource
Type String - Acl resource type, currently only supports Topic, enumeration value list{Topic}.
- rule
Lists List<CkafkaAcl Rule Rule List> - List of configured ACL rules.
- rule
Name String - rule name.
- ckafka
Acl StringRule Id - ID of the resource.
- is
Applied Double - 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 string - instance id.
- pattern
Type string - Match type, currently supports prefix matching and preset strategy, enumeration value list{PREFIXED/PRESET}.
- resource
Type string - Acl resource type, currently only supports Topic, enumeration value list{Topic}.
- rule
Lists CkafkaAcl Rule Rule List[] - List of configured ACL rules.
- rule
Name string - rule name.
- ckafka
Acl stringRule Id - ID of the resource.
- is
Applied 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[CkafkaAcl Rule Rule List Args] - List of configured ACL rules.
- rule_
name str - rule name.
- ckafka_
acl_ strrule_ id - 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.
- instance
Id String - instance id.
- pattern
Type String - Match type, currently supports prefix matching and preset strategy, enumeration value list{PREFIXED/PRESET}.
- resource
Type String - Acl resource type, currently only supports Topic, enumeration value list{Topic}.
- rule
Lists List<Property Map> - List of configured ACL rules.
- rule
Name String - rule name.
- ckafka
Acl StringRule Id - ID of the resource.
- is
Applied 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.
- Ckafka
Acl stringRule Id - ID of the resource.
- Instance
Id string - instance id.
- Is
Applied double - Whether the preset ACL rule is applied to the newly added topic.
- Pattern string
- A value representing the prefix that the prefix matches.
- Pattern
Type string - Match type, currently supports prefix matching and preset strategy, enumeration value list{PREFIXED/PRESET}.
- Resource
Type string - Acl resource type, currently only supports Topic, enumeration value list{Topic}.
- Rule
Lists List<CkafkaAcl Rule Rule List> - List of configured ACL rules.
- Rule
Name string - rule name.
- Ckafka
Acl stringRule Id - ID of the resource.
- Instance
Id string - instance id.
- Is
Applied float64 - Whether the preset ACL rule is applied to the newly added topic.
- Pattern string
- A value representing the prefix that the prefix matches.
- Pattern
Type string - Match type, currently supports prefix matching and preset strategy, enumeration value list{PREFIXED/PRESET}.
- Resource
Type string - Acl resource type, currently only supports Topic, enumeration value list{Topic}.
- Rule
Lists []CkafkaAcl Rule Rule List Args - List of configured ACL rules.
- Rule
Name string - rule name.
- ckafka
Acl StringRule Id - ID of the resource.
- instance
Id String - instance id.
- is
Applied Double - Whether the preset ACL rule is applied to the newly added topic.
- pattern String
- A value representing the prefix that the prefix matches.
- pattern
Type String - Match type, currently supports prefix matching and preset strategy, enumeration value list{PREFIXED/PRESET}.
- resource
Type String - Acl resource type, currently only supports Topic, enumeration value list{Topic}.
- rule
Lists List<CkafkaAcl Rule Rule List> - List of configured ACL rules.
- rule
Name String - rule name.
- ckafka
Acl stringRule Id - ID of the resource.
- instance
Id string - instance id.
- is
Applied number - Whether the preset ACL rule is applied to the newly added topic.
- pattern string
- A value representing the prefix that the prefix matches.
- pattern
Type string - Match type, currently supports prefix matching and preset strategy, enumeration value list{PREFIXED/PRESET}.
- resource
Type string - Acl resource type, currently only supports Topic, enumeration value list{Topic}.
- rule
Lists CkafkaAcl Rule Rule List[] - List of configured ACL rules.
- rule
Name string - rule name.
- ckafka_
acl_ strrule_ id - 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[CkafkaAcl Rule Rule List Args] - List of configured ACL rules.
- rule_
name str - rule name.
- ckafka
Acl StringRule Id - ID of the resource.
- instance
Id String - instance id.
- is
Applied Number - Whether the preset ACL rule is applied to the newly added topic.
- pattern String
- A value representing the prefix that the prefix matches.
- pattern
Type String - Match type, currently supports prefix matching and preset strategy, enumeration value list{PREFIXED/PRESET}.
- resource
Type String - Acl resource type, currently only supports Topic, enumeration value list{Topic}.
- rule
Lists List<Property Map> - List of configured ACL rules.
- rule
Name 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).
- Permission
Type 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).
- Permission
Type 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).
- permission
Type 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).
- permission
Type 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).
- permission
Type 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.