SaslUser
Provides an ALIKAFKA sasl user 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 defaultSaslUser = new AliCloud.AliKafka.SaslUser("defaultSaslUser", new AliCloud.AliKafka.SaslUserArgs
{
InstanceId = defaultInstance.Id,
Password = password,
Username = username,
});
}
}
Coming soon!
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
username = config.get("username")
if username is None:
username = "testusername"
password = config.get("password")
if password is None:
password = "testpassword"
default_zones = alicloud.get_zones(available_resource_creation="VSwitch")
default_network = alicloud.vpc.Network("defaultNetwork", cidr_block="172.16.0.0/12")
default_switch = alicloud.vpc.Switch("defaultSwitch",
availability_zone=default_zones.zones[0]["id"],
cidr_block="172.16.0.0/24",
vpc_id=default_network.id)
default_instance = alicloud.alikafka.Instance("defaultInstance",
deploy_type="5",
disk_size="500",
disk_type="1",
io_max="20",
topic_quota="50",
vswitch_id=default_switch.id)
default_sasl_user = alicloud.alikafka.SaslUser("defaultSaslUser",
instance_id=default_instance.id,
password=password,
username=username)import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const username = config.get("username") || "testusername";
const password = config.get("password") || "testpassword";
const defaultZones = pulumi.output(alicloud.getZones({
availableResourceCreation: "VSwitch",
}, { async: true }));
const defaultNetwork = new alicloud.vpc.Network("default", {
cidrBlock: "172.16.0.0/12",
});
const defaultSwitch = new alicloud.vpc.Switch("default", {
availabilityZone: defaultZones.zones[0].id,
cidrBlock: "172.16.0.0/24",
vpcId: defaultNetwork.id,
});
const defaultInstance = new alicloud.alikafka.Instance("default", {
deployType: 5,
diskSize: 500,
diskType: 1,
ioMax: 20,
topicQuota: 50,
vswitchId: defaultSwitch.id,
});
const defaultSaslUser = new alicloud.alikafka.SaslUser("default", {
instanceId: defaultInstance.id,
password: password,
username: username,
});Create a SaslUser Resource
new SaslUser(name: string, args: SaslUserArgs, opts?: CustomResourceOptions);def SaslUser(resource_name, opts=None, instance_id=None, kms_encrypted_password=None, kms_encryption_context=None, password=None, username=None, __props__=None);func NewSaslUser(ctx *Context, name string, args SaslUserArgs, opts ...ResourceOption) (*SaslUser, error)public SaslUser(string name, SaslUserArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args SaslUserArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args SaslUserArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SaslUserArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
SaslUser Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The SaslUser resource accepts the following input properties:
- Instance
Id string ID of the ALIKAFKA Instance that owns the groups.
- Username string
Username for the sasl user. The length should between 1 to 64 characters. The characters can only contain ‘a’-‘z’, ‘A’-‘Z’, ‘0’-‘9’, ‘_’ and ‘-’.
- Kms
Encrypted stringPassword An KMS encrypts password used to a db account. You have to specify one of
passwordandkms_encrypted_passwordfields.- Kms
Encryption Dictionary<string, object>Context An KMS encryption context used to decrypt
kms_encrypted_passwordbefore creating or updating a user withkms_encrypted_password. See Encryption Context. It is valid whenkms_encrypted_passwordis set.- Password string
Operation password. It may consist of letters, digits, or underlines, with a length of 1 to 64 characters. You have to specify one of
passwordandkms_encrypted_passwordfields.
- Instance
Id string ID of the ALIKAFKA Instance that owns the groups.
- Username string
Username for the sasl user. The length should between 1 to 64 characters. The characters can only contain ‘a’-‘z’, ‘A’-‘Z’, ‘0’-‘9’, ‘_’ and ‘-’.
- Kms
Encrypted stringPassword An KMS encrypts password used to a db account. You have to specify one of
passwordandkms_encrypted_passwordfields.- Kms
Encryption map[string]interface{}Context An KMS encryption context used to decrypt
kms_encrypted_passwordbefore creating or updating a user withkms_encrypted_password. See Encryption Context. It is valid whenkms_encrypted_passwordis set.- Password string
Operation password. It may consist of letters, digits, or underlines, with a length of 1 to 64 characters. You have to specify one of
passwordandkms_encrypted_passwordfields.
- instance
Id string ID of the ALIKAFKA Instance that owns the groups.
- username string
Username for the sasl user. The length should between 1 to 64 characters. The characters can only contain ‘a’-‘z’, ‘A’-‘Z’, ‘0’-‘9’, ‘_’ and ‘-’.
- kms
Encrypted stringPassword An KMS encrypts password used to a db account. You have to specify one of
passwordandkms_encrypted_passwordfields.- kms
Encryption {[key: string]: any}Context An KMS encryption context used to decrypt
kms_encrypted_passwordbefore creating or updating a user withkms_encrypted_password. See Encryption Context. It is valid whenkms_encrypted_passwordis set.- password string
Operation password. It may consist of letters, digits, or underlines, with a length of 1 to 64 characters. You have to specify one of
passwordandkms_encrypted_passwordfields.
- instance_
id str ID of the ALIKAFKA Instance that owns the groups.
- username str
Username for the sasl user. The length should between 1 to 64 characters. The characters can only contain ‘a’-‘z’, ‘A’-‘Z’, ‘0’-‘9’, ‘_’ and ‘-’.
- kms_
encrypted_ strpassword An KMS encrypts password used to a db account. You have to specify one of
passwordandkms_encrypted_passwordfields.- kms_
encryption_ Dict[str, Any]context An KMS encryption context used to decrypt
kms_encrypted_passwordbefore creating or updating a user withkms_encrypted_password. See Encryption Context. It is valid whenkms_encrypted_passwordis set.- password str
Operation password. It may consist of letters, digits, or underlines, with a length of 1 to 64 characters. You have to specify one of
passwordandkms_encrypted_passwordfields.
Outputs
All input properties are implicitly available as output properties. Additionally, the SaslUser resource produces the following output properties:
Look up an Existing SaslUser Resource
Get an existing SaslUser 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?: SaslUserState, opts?: CustomResourceOptions): SaslUserstatic get(resource_name, id, opts=None, instance_id=None, kms_encrypted_password=None, kms_encryption_context=None, password=None, username=None, __props__=None);func GetSaslUser(ctx *Context, name string, id IDInput, state *SaslUserState, opts ...ResourceOption) (*SaslUser, error)public static SaslUser Get(string name, Input<string> id, SaslUserState? state, CustomResourceOptions? opts = null)- 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.
The following state arguments are supported:
- Instance
Id string ID of the ALIKAFKA Instance that owns the groups.
- Kms
Encrypted stringPassword An KMS encrypts password used to a db account. You have to specify one of
passwordandkms_encrypted_passwordfields.- Kms
Encryption Dictionary<string, object>Context An KMS encryption context used to decrypt
kms_encrypted_passwordbefore creating or updating a user withkms_encrypted_password. See Encryption Context. It is valid whenkms_encrypted_passwordis set.- Password string
Operation password. It may consist of letters, digits, or underlines, with a length of 1 to 64 characters. You have to specify one of
passwordandkms_encrypted_passwordfields.- Username string
Username for the sasl user. The length should between 1 to 64 characters. The characters can only contain ‘a’-‘z’, ‘A’-‘Z’, ‘0’-‘9’, ‘_’ and ‘-’.
- Instance
Id string ID of the ALIKAFKA Instance that owns the groups.
- Kms
Encrypted stringPassword An KMS encrypts password used to a db account. You have to specify one of
passwordandkms_encrypted_passwordfields.- Kms
Encryption map[string]interface{}Context An KMS encryption context used to decrypt
kms_encrypted_passwordbefore creating or updating a user withkms_encrypted_password. See Encryption Context. It is valid whenkms_encrypted_passwordis set.- Password string
Operation password. It may consist of letters, digits, or underlines, with a length of 1 to 64 characters. You have to specify one of
passwordandkms_encrypted_passwordfields.- Username string
Username for the sasl user. The length should between 1 to 64 characters. The characters can only contain ‘a’-‘z’, ‘A’-‘Z’, ‘0’-‘9’, ‘_’ and ‘-’.
- instance
Id string ID of the ALIKAFKA Instance that owns the groups.
- kms
Encrypted stringPassword An KMS encrypts password used to a db account. You have to specify one of
passwordandkms_encrypted_passwordfields.- kms
Encryption {[key: string]: any}Context An KMS encryption context used to decrypt
kms_encrypted_passwordbefore creating or updating a user withkms_encrypted_password. See Encryption Context. It is valid whenkms_encrypted_passwordis set.- password string
Operation password. It may consist of letters, digits, or underlines, with a length of 1 to 64 characters. You have to specify one of
passwordandkms_encrypted_passwordfields.- username string
Username for the sasl user. The length should between 1 to 64 characters. The characters can only contain ‘a’-‘z’, ‘A’-‘Z’, ‘0’-‘9’, ‘_’ and ‘-’.
- instance_
id str ID of the ALIKAFKA Instance that owns the groups.
- kms_
encrypted_ strpassword An KMS encrypts password used to a db account. You have to specify one of
passwordandkms_encrypted_passwordfields.- kms_
encryption_ Dict[str, Any]context An KMS encryption context used to decrypt
kms_encrypted_passwordbefore creating or updating a user withkms_encrypted_password. See Encryption Context. It is valid whenkms_encrypted_passwordis set.- password str
Operation password. It may consist of letters, digits, or underlines, with a length of 1 to 64 characters. You have to specify one of
passwordandkms_encrypted_passwordfields.- username str
Username for the sasl user. The length should between 1 to 64 characters. The characters can only contain ‘a’-‘z’, ‘A’-‘Z’, ‘0’-‘9’, ‘_’ and ‘-’.
Package Details
- Repository
- https://github.com/pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.