Class SaslAcl
Provides an ALIKAFKA sasl acl resource.
NOTE: Available in 1.66.0+
NOTE: Only the following regions support create alikafka sasl user. [
cn-hangzhou,cn-beijing,cn-shenzhen,cn-shanghai,cn-qingdao,cn-hongkong,cn-huhehaote,cn-zhangjiakou,ap-southeast-1,ap-south-1,ap-southeast-5]
Example Usage
using Pulumi;
using AliCloud = Pulumi.AliCloud;
class MyStack : Stack
{
public MyStack()
{
var config = new Config();
var username = config.Get("username") ?? "testusername";
var password = config.Get("password") ?? "testpassword";
var defaultZones = Output.Create(AliCloud.GetZones.InvokeAsync(new AliCloud.GetZonesArgs
{
AvailableResourceCreation = "VSwitch",
}));
var defaultNetwork = new AliCloud.Vpc.Network("defaultNetwork", new AliCloud.Vpc.NetworkArgs
{
CidrBlock = "172.16.0.0/12",
});
var defaultSwitch = new AliCloud.Vpc.Switch("defaultSwitch", new AliCloud.Vpc.SwitchArgs
{
AvailabilityZone = defaultZones.Apply(defaultZones => defaultZones.Zones[0].Id),
CidrBlock = "172.16.0.0/24",
VpcId = defaultNetwork.Id,
});
var defaultInstance = new AliCloud.AliKafka.Instance("defaultInstance", new AliCloud.AliKafka.InstanceArgs
{
DeployType = "5",
DiskSize = "500",
DiskType = "1",
IoMax = "20",
TopicQuota = "50",
VswitchId = defaultSwitch.Id,
});
var defaultTopic = new AliCloud.AliKafka.Topic("defaultTopic", new AliCloud.AliKafka.TopicArgs
{
InstanceId = defaultInstance.Id,
Remark = "topic-remark",
Topic = "test-topic",
});
var defaultSaslUser = new AliCloud.AliKafka.SaslUser("defaultSaslUser", new AliCloud.AliKafka.SaslUserArgs
{
InstanceId = defaultInstance.Id,
Password = password,
Username = username,
});
var defaultSaslAcl = new AliCloud.AliKafka.SaslAcl("defaultSaslAcl", new AliCloud.AliKafka.SaslAclArgs
{
AclOperationType = "Write",
AclResourceName = defaultTopic.TopicName,
AclResourcePatternType = "LITERAL",
AclResourceType = "Topic",
InstanceId = defaultInstance.Id,
Username = defaultSaslUser.Username,
});
}
}
Inherited Members
Namespace: Pulumi.AliCloud.AliKafka
Assembly: Pulumi.AliCloud.dll
Syntax
public class SaslAcl : CustomResource
Constructors
View SourceSaslAcl(String, SaslAclArgs, CustomResourceOptions)
Create a SaslAcl resource with the given unique name, arguments, and options.
Declaration
public SaslAcl(string name, SaslAclArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| SaslAclArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceAclOperationType
Operation type for this acl. The operation type can only be "Write" and "Read".
Declaration
public Output<string> AclOperationType { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
AclResourceName
Resource name for this acl. The resource name should be a topic or consumer group name.
Declaration
public Output<string> AclResourceName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
AclResourcePatternType
Resource pattern type for this acl. The resource pattern support two types "LITERAL" and "PREFIXED". "LITERAL": A literal name defines the full name of a resource. The special wildcard character "*" can be used to represent a resource with any name. "PREFIXED": A prefixed name defines a prefix for a resource.
Declaration
public Output<string> AclResourcePatternType { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
AclResourceType
Resource type for this acl. The resource type can only be "Topic" and "Group".
Declaration
public Output<string> AclResourceType { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Host
The host of the acl.
Declaration
public Output<string> Host { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
InstanceId
ID of the ALIKAFKA Instance that owns the groups.
Declaration
public Output<string> InstanceId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Username
Username for the sasl user. The length should between 1 to 64 characters. The user should be an existed sasl user.
Declaration
public Output<string> Username { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, SaslAclState, CustomResourceOptions)
Get an existing SaslAcl resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static SaslAcl Get(string name, Input<string> id, SaslAclState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| SaslAclState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| SaslAcl |