UNPKG

@huaweicloudos/pulumi

Version:

A Pulumi package for creating and managing Huaweicloud cloud resources.

997 lines (996 loc) 41.7 kB
import * as pulumi from "@pulumi/pulumi"; import { input as inputs, output as outputs } from "../types"; /** * Manage DMS Kafka instance resources within HuaweiCloud. * * ## Example Usage * ### Create a Kafka instance using flavor ID * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as huaweicloud from "@pulumi/huaweicloud"; * import * as pulumi from "@huaweicloudos/pulumi"; * * const config = new pulumi.Config(); * const vpcId = config.requireObject("vpcId"); * const subnetId = config.requireObject("subnetId"); * const securityGroupId = config.requireObject("securityGroupId"); * const accessPassword = config.requireObject("accessPassword"); * const availabilityZones = config.getObject("availabilityZones") || [ * "your_availability_zones_a", * "your_availability_zones_b", * "your_availability_zones_c", * ]; * const flavorId = config.get("flavorId") || "your_flavor_id, such: c6.2u4g.cluster"; * const storageSpecCode = config.get("storageSpecCode") || "your_storage_spec_code, such: dms.physical.storage.ultra.v2"; * const testFlavors = huaweicloud.Dms.getFlavors({ * type: "cluster", * flavorId: flavorId, * availabilityZones: availabilityZones, * storageSpecCode: storageSpecCode, * }); * const testKafkaInstance = new huaweicloud.dms.KafkaInstance("testKafkaInstance", { * vpcId: vpcId, * networkId: subnetId, * securityGroupId: securityGroupId, * flavorId: testFlavors.then(testFlavors => testFlavors.flavorId), * storageSpecCode: testFlavors.then(testFlavors => testFlavors.flavors?[0]?.ios?[0]?.storageSpecCode), * availabilityZones: availabilityZones, * engineVersion: "2.7", * storageSpace: 600, * brokerNum: 3, * sslEnable: true, * accessUser: "user", * password: accessPassword, * parameters: [{ * name: "min.insync.replicas", * value: "2", * }], * }); * ``` * * ## Import * * DMS Kafka instance can be imported using the instance id, e.g. * * ```sh * $ pulumi import huaweicloud:Dms/kafkaInstance:KafkaInstance huaweicloud_dms_kafka_instance.instance_1 8d3c7938-dc47-4937-a30f-c80de381c5e3 * ``` * * Note that the imported state may not be identical to your resource definition, due to some attributes missing from the API response, security or some other reason. The missing attributes include`password`, `public_ip_ids`, `security_protocol`, `enabled_mechanisms` and `arch_type`. It is generally recommended running `terraform plan` after importing a DMS Kafka instance. You can then decide if changes should be applied to the instance, or the resource definition should be updated to align with the instance. Also you can ignore changes as below. hcl resource "huaweicloud_dms_kafka_instance" "instance_1" { * * ... * * lifecycle { * * ignore_changes = [ * * password, * * ] * * } } */ export declare class KafkaInstance extends pulumi.CustomResource { /** * Get an existing KafkaInstance resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: KafkaInstanceState, opts?: pulumi.CustomResourceOptions): KafkaInstance; /** * Returns true if the given object is an instance of KafkaInstance. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is KafkaInstance; /** * Specifies the username of SASL_SSL user. A username consists of 4 * to 64 characters and supports only letters, digits, and hyphens (-). Changing this creates a new instance resource. */ readonly accessUser: pulumi.Output<string | undefined>; /** * Specifies the CPU architecture. Valid value is **X86**. * Changing this creates a new instance resource. */ readonly archType: pulumi.Output<string | undefined>; /** * Specifies whether auto renew is enabled. Valid values are "true" and "false". */ readonly autoRenew: pulumi.Output<string | undefined>; /** * The names of the AZ where the Kafka instances reside. * The parameter value can not be left blank or an empty array. Changing this creates a new instance resource. */ readonly availabilityZones: pulumi.Output<string[]>; /** * @deprecated available_zones has deprecated, please use "availability_zones" instead. */ readonly availableZones: pulumi.Output<string[]>; /** * @deprecated The bandwidth has been deprecated. If you need to change the bandwidth, please update the product_id. */ readonly bandwidth: pulumi.Output<string>; /** * Specifies the broker numbers. * It is required when creating an instance with `flavorId`. */ readonly brokerNum: pulumi.Output<number>; /** * Indicates whether the certificate can be replaced. */ readonly certReplaced: pulumi.Output<boolean>; /** * Specifies the charging mode of the instance. Valid values are *prePaid* * and *postPaid*, defaults to *postPaid*. Changing this creates a new resource. */ readonly chargingMode: pulumi.Output<string>; /** * Indicates the IP address of the DMS Kafka instance. */ readonly connectAddress: pulumi.Output<string>; /** * Indicates the connector ID. */ readonly connectorId: pulumi.Output<string>; /** * Indicates the number of connector node. */ readonly connectorNodeNum: pulumi.Output<number>; /** * Indicates the create time. */ readonly createdAt: pulumi.Output<string>; /** * Specifies the cross-VPC access information. * The object structure is documented below. */ readonly crossVpcAccesses: pulumi.Output<outputs.Dms.KafkaInstanceCrossVpcAccess[]>; /** * Specifies the description of the DMS Kafka instance. It is a character string * containing not more than 1,024 characters. */ readonly description: pulumi.Output<string | undefined>; /** * Specifies whether to enable message dumping(smart connect). * Changing this creates a new instance resource. */ readonly dumping: pulumi.Output<boolean>; /** * Specifies whether to enable automatic topic creation. If automatic * topic creation is enabled, a topic will be automatically created with 3 partitions and 3 replicas when a message is * produced to or consumed from a topic that does not exist. * The default value is false. */ readonly enableAutoTopic: pulumi.Output<boolean>; /** * Indicates whether public access to the DMS Kafka instance is enabled. */ readonly enablePublicIp: pulumi.Output<boolean>; /** * Specifies the authentication mechanisms to use after SASL is * enabled. Value options: * + **PLAIN**: Simple username and password verification. * + **SCRAM-SHA-512**: User credential verification, which is more secure than **PLAIN**. */ readonly enabledMechanisms: pulumi.Output<string[] | undefined>; /** * Indicates the message engine. */ readonly engine: pulumi.Output<string>; /** * Specifies the version of the Kafka engine, * such as 1.1.0, 2.3.0, 2.7 or other supported versions. Changing this creates a new instance resource. */ readonly engineVersion: pulumi.Output<string>; /** * Specifies the enterprise project ID of the Kafka instance. */ readonly enterpriseProjectId: pulumi.Output<string>; /** * Indicates the extend times. If the value exceeds `20`, disk expansion is no longer allowed. */ readonly extendTimes: pulumi.Output<number>; /** * Specifies the Kafka [flavor ID](https://support.huaweicloud.com/intl/en-us/productdesc-kafka/Kafka-specification.html), * e.g. **c6.2u4g.cluster**. This parameter and `productId` are alternative. */ readonly flavorId: pulumi.Output<string | undefined>; /** * Indicates the IPv6 connect addresses list. */ readonly ipv6ConnectAddresses: pulumi.Output<string[]>; /** * Specifies whether to enable IPv6. Defaults to **false**. * Changing this creates a new instance resource. */ readonly ipv6Enable: pulumi.Output<boolean>; /** * Indicates whether the instance is a new instance. */ readonly isLogicalVolume: pulumi.Output<boolean>; /** * Specifies the time at which a maintenance time window starts. Format: HH:mm. The * start time and end time of a maintenance time window must indicate the time segment of a supported maintenance time * window. The start time must be set to 22:00, 02:00, 06:00, 10:00, 14:00, or 18:00. Parameters `maintainBegin` * and `maintainEnd` must be set in pairs. If parameter `maintainBegin` is left blank, parameter `maintainEnd` is also * blank. In this case, the system automatically allocates the default start time 02:00. */ readonly maintainBegin: pulumi.Output<string>; /** * Specifies the time at which a maintenance time window ends. Format: HH:mm. The * start time and end time of a maintenance time window must indicate the time segment of a supported maintenance time * window. The end time is four hours later than the start time. For example, if the start time is 22:00, the end time is * 02:00. Parameters `maintainBegin` * and `maintainEnd` must be set in pairs. If parameter `maintainEnd` is left blank, parameter * `maintainBegin` is also blank. In this case, the system automatically allocates the default end time 06:00. */ readonly maintainEnd: pulumi.Output<string>; /** * @deprecated Deprecated */ readonly managementConnectAddress: pulumi.Output<string>; /** * @deprecated Deprecated */ readonly managerPassword: pulumi.Output<string | undefined>; /** * @deprecated Deprecated */ readonly managerUser: pulumi.Output<string | undefined>; /** * @deprecated typo in manegement_connect_address, please use "management_connect_address" instead. */ readonly manegementConnectAddress: pulumi.Output<string>; /** * Indicates whether message query is enabled. */ readonly messageQueryInstEnable: pulumi.Output<boolean>; /** * Specifies the parameter name. Static parameter needs to restart the instance to take effect. */ readonly name: pulumi.Output<string>; /** * Specifies the ID of a subnet. Changing this creates a new instance * resource. */ readonly networkId: pulumi.Output<string>; /** * Specifies the IPv4 private IP addresses for the new brokers. */ readonly newTenantIps: pulumi.Output<string[] | undefined>; /** * Indicates the node quantity. */ readonly nodeNum: pulumi.Output<number>; /** * Specifies the array of one or more parameters to be set to the Kafka instance after * launched. The parameters structure is documented below. */ readonly parameters: pulumi.Output<outputs.Dms.KafkaInstanceParameter[]>; /** * Indicates the number of partitions in Kafka instance. */ readonly partitionNum: pulumi.Output<number>; /** * Specifies the password of SASL_SSL user. A password must meet the following * complexity requirements: Must be 8 to 32 characters long. Must contain at least 2 of the following character types: * lowercase letters, uppercase letters, digits, and special characters (`~!@#$%^&*()-_=+\\|[{}]:'",<.>/?). */ readonly password: pulumi.Output<string | undefined>; /** * Specifies the charging period of the instance. If `periodUnit` is set to *month* * , the value ranges from 1 to 9. If `periodUnit` is set to *year*, the value ranges from 1 to 3. This parameter is * mandatory if `chargingMode` is set to *prePaid*. Changing this creates a new resource. */ readonly period: pulumi.Output<number | undefined>; /** * Specifies the charging period unit of the instance. * Valid values are *month* and *year*. This parameter is mandatory if `chargingMode` is set to *prePaid*. * Changing this creates a new resource. */ readonly periodUnit: pulumi.Output<string | undefined>; /** * Indicates the connection address on the tenant side. */ readonly podConnectAddress: pulumi.Output<string>; /** * The port number. */ readonly port: pulumi.Output<number>; /** * Indicates instance connection address. The structure is documented below. * The portProtocols structure is documented below. */ readonly portProtocols: pulumi.Output<outputs.Dms.KafkaInstancePortProtocol[]>; /** * Specifies a product ID, which includes bandwidth, partition, broker and default * storage capacity. */ readonly productId: pulumi.Output<string | undefined>; /** * Indicates the public network access bandwidth. */ readonly publicBandwidth: pulumi.Output<number>; /** * Indicates the public IP addresses list of the instance. */ readonly publicIpAddresses: pulumi.Output<string[]>; /** * Specifies the IDs of the elastic IP address (EIP) * bound to the DMS Kafka instance. Changing this creates a new instance resource. * + If the instance is created with `flavorId`, the total number of public IPs is equal to `brokerNum`. * + If the instance is created with `productId`, the total number of public IPs must provide as follows: */ readonly publicIpIds: pulumi.Output<string[] | undefined>; /** * The region in which to create the DMS Kafka instances. If omitted, the * provider-level region will be used. Changing this creates a new instance resource. */ readonly region: pulumi.Output<string>; /** * Indicates a resource specifications identifier. */ readonly resourceSpecCode: pulumi.Output<string>; /** * Specifies the action to be taken when the memory usage reaches the disk * capacity threshold. The valid values are as follows: * + **time_base**: Automatically delete the earliest messages. * + **produce_reject**: Stop producing new messages. */ readonly retentionPolicy: pulumi.Output<string>; /** * Specifies the ID of a security group. */ readonly securityGroupId: pulumi.Output<string>; /** * Specifies the protocol to use after SASL is enabled. Value options: * + **SASL_SSL**: Data is encrypted with SSL certificates for high-security transmission. * + **SASL_PLAINTEXT**: Data is transmitted in plaintext with username and password authentication. This protocol only * uses the SCRAM-SHA-512 mechanism and delivers high performance. */ readonly securityProtocol: pulumi.Output<string | undefined>; /** * Specifies whether the Kafka SASL_SSL is enabled. * Changing this creates a new resource. */ readonly sslEnable: pulumi.Output<boolean>; /** * Indicates whether to enable two-way authentication. */ readonly sslTwoWayEnable: pulumi.Output<boolean>; /** * Indicates the status of the DMS Kafka instance. */ readonly status: pulumi.Output<string>; /** * Indicates the storage resource ID. */ readonly storageResourceId: pulumi.Output<string>; /** * Specifies the message storage capacity, the unit is GB. * The storage spaces corresponding to the product IDs are as follows: * + **c6.2u4g.cluster** (100MB bandwidth): `300` to `300,000` GB * + **c6.4u8g.cluster** (300MB bandwidth): `300` to `600,000` GB * + **c6.8u16g.cluster** (600MB bandwidth): `300` to `900,000` GB * + **c6.12u12g.cluster**: `300` to `900,000` GB * + **c6.16u32g.cluster** (1,200MB bandwidth): `300` to `900,000` GB */ readonly storageSpace: pulumi.Output<number>; /** * Specifies the storage I/O specification. * If the instance is created with `flavorId`, the valid values are as follows: * + **dms.physical.storage.high.v2**: Type of the disk that uses high I/O. * + **dms.physical.storage.ultra.v2**: Type of the disk that uses ultra-high I/O. */ readonly storageSpecCode: pulumi.Output<string>; /** * Indicates the storage type. */ readonly storageType: pulumi.Output<string>; /** * The key/value pairs to associate with the DMS Kafka instance. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Indicates the DMS Kafka instance type. */ readonly type: pulumi.Output<string>; /** * Indicates the used message storage space. Unit: GB */ readonly usedStorageSpace: pulumi.Output<number>; /** * Indicates the ID of the user who created the DMS Kafka instance */ readonly userId: pulumi.Output<string>; /** * Indicates the name of the user who created the DMS Kafka instance */ readonly userName: pulumi.Output<string>; /** * Specifies whether the intra-VPC plaintext access is enabled. * Defaults to **false**. Changing this creates a new resource. */ readonly vpcClientPlain: pulumi.Output<boolean>; /** * Specifies the ID of a VPC. Changing this creates a new instance resource. */ readonly vpcId: pulumi.Output<string>; /** * Create a KafkaInstance resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: KafkaInstanceArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering KafkaInstance resources. */ export interface KafkaInstanceState { /** * Specifies the username of SASL_SSL user. A username consists of 4 * to 64 characters and supports only letters, digits, and hyphens (-). Changing this creates a new instance resource. */ accessUser?: pulumi.Input<string>; /** * Specifies the CPU architecture. Valid value is **X86**. * Changing this creates a new instance resource. */ archType?: pulumi.Input<string>; /** * Specifies whether auto renew is enabled. Valid values are "true" and "false". */ autoRenew?: pulumi.Input<string>; /** * The names of the AZ where the Kafka instances reside. * The parameter value can not be left blank or an empty array. Changing this creates a new instance resource. */ availabilityZones?: pulumi.Input<pulumi.Input<string>[]>; /** * @deprecated available_zones has deprecated, please use "availability_zones" instead. */ availableZones?: pulumi.Input<pulumi.Input<string>[]>; /** * @deprecated The bandwidth has been deprecated. If you need to change the bandwidth, please update the product_id. */ bandwidth?: pulumi.Input<string>; /** * Specifies the broker numbers. * It is required when creating an instance with `flavorId`. */ brokerNum?: pulumi.Input<number>; /** * Indicates whether the certificate can be replaced. */ certReplaced?: pulumi.Input<boolean>; /** * Specifies the charging mode of the instance. Valid values are *prePaid* * and *postPaid*, defaults to *postPaid*. Changing this creates a new resource. */ chargingMode?: pulumi.Input<string>; /** * Indicates the IP address of the DMS Kafka instance. */ connectAddress?: pulumi.Input<string>; /** * Indicates the connector ID. */ connectorId?: pulumi.Input<string>; /** * Indicates the number of connector node. */ connectorNodeNum?: pulumi.Input<number>; /** * Indicates the create time. */ createdAt?: pulumi.Input<string>; /** * Specifies the cross-VPC access information. * The object structure is documented below. */ crossVpcAccesses?: pulumi.Input<pulumi.Input<inputs.Dms.KafkaInstanceCrossVpcAccess>[]>; /** * Specifies the description of the DMS Kafka instance. It is a character string * containing not more than 1,024 characters. */ description?: pulumi.Input<string>; /** * Specifies whether to enable message dumping(smart connect). * Changing this creates a new instance resource. */ dumping?: pulumi.Input<boolean>; /** * Specifies whether to enable automatic topic creation. If automatic * topic creation is enabled, a topic will be automatically created with 3 partitions and 3 replicas when a message is * produced to or consumed from a topic that does not exist. * The default value is false. */ enableAutoTopic?: pulumi.Input<boolean>; /** * Indicates whether public access to the DMS Kafka instance is enabled. */ enablePublicIp?: pulumi.Input<boolean>; /** * Specifies the authentication mechanisms to use after SASL is * enabled. Value options: * + **PLAIN**: Simple username and password verification. * + **SCRAM-SHA-512**: User credential verification, which is more secure than **PLAIN**. */ enabledMechanisms?: pulumi.Input<pulumi.Input<string>[]>; /** * Indicates the message engine. */ engine?: pulumi.Input<string>; /** * Specifies the version of the Kafka engine, * such as 1.1.0, 2.3.0, 2.7 or other supported versions. Changing this creates a new instance resource. */ engineVersion?: pulumi.Input<string>; /** * Specifies the enterprise project ID of the Kafka instance. */ enterpriseProjectId?: pulumi.Input<string>; /** * Indicates the extend times. If the value exceeds `20`, disk expansion is no longer allowed. */ extendTimes?: pulumi.Input<number>; /** * Specifies the Kafka [flavor ID](https://support.huaweicloud.com/intl/en-us/productdesc-kafka/Kafka-specification.html), * e.g. **c6.2u4g.cluster**. This parameter and `productId` are alternative. */ flavorId?: pulumi.Input<string>; /** * Indicates the IPv6 connect addresses list. */ ipv6ConnectAddresses?: pulumi.Input<pulumi.Input<string>[]>; /** * Specifies whether to enable IPv6. Defaults to **false**. * Changing this creates a new instance resource. */ ipv6Enable?: pulumi.Input<boolean>; /** * Indicates whether the instance is a new instance. */ isLogicalVolume?: pulumi.Input<boolean>; /** * Specifies the time at which a maintenance time window starts. Format: HH:mm. The * start time and end time of a maintenance time window must indicate the time segment of a supported maintenance time * window. The start time must be set to 22:00, 02:00, 06:00, 10:00, 14:00, or 18:00. Parameters `maintainBegin` * and `maintainEnd` must be set in pairs. If parameter `maintainBegin` is left blank, parameter `maintainEnd` is also * blank. In this case, the system automatically allocates the default start time 02:00. */ maintainBegin?: pulumi.Input<string>; /** * Specifies the time at which a maintenance time window ends. Format: HH:mm. The * start time and end time of a maintenance time window must indicate the time segment of a supported maintenance time * window. The end time is four hours later than the start time. For example, if the start time is 22:00, the end time is * 02:00. Parameters `maintainBegin` * and `maintainEnd` must be set in pairs. If parameter `maintainEnd` is left blank, parameter * `maintainBegin` is also blank. In this case, the system automatically allocates the default end time 06:00. */ maintainEnd?: pulumi.Input<string>; /** * @deprecated Deprecated */ managementConnectAddress?: pulumi.Input<string>; /** * @deprecated Deprecated */ managerPassword?: pulumi.Input<string>; /** * @deprecated Deprecated */ managerUser?: pulumi.Input<string>; /** * @deprecated typo in manegement_connect_address, please use "management_connect_address" instead. */ manegementConnectAddress?: pulumi.Input<string>; /** * Indicates whether message query is enabled. */ messageQueryInstEnable?: pulumi.Input<boolean>; /** * Specifies the parameter name. Static parameter needs to restart the instance to take effect. */ name?: pulumi.Input<string>; /** * Specifies the ID of a subnet. Changing this creates a new instance * resource. */ networkId?: pulumi.Input<string>; /** * Specifies the IPv4 private IP addresses for the new brokers. */ newTenantIps?: pulumi.Input<pulumi.Input<string>[]>; /** * Indicates the node quantity. */ nodeNum?: pulumi.Input<number>; /** * Specifies the array of one or more parameters to be set to the Kafka instance after * launched. The parameters structure is documented below. */ parameters?: pulumi.Input<pulumi.Input<inputs.Dms.KafkaInstanceParameter>[]>; /** * Indicates the number of partitions in Kafka instance. */ partitionNum?: pulumi.Input<number>; /** * Specifies the password of SASL_SSL user. A password must meet the following * complexity requirements: Must be 8 to 32 characters long. Must contain at least 2 of the following character types: * lowercase letters, uppercase letters, digits, and special characters (`~!@#$%^&*()-_=+\\|[{}]:'",<.>/?). */ password?: pulumi.Input<string>; /** * Specifies the charging period of the instance. If `periodUnit` is set to *month* * , the value ranges from 1 to 9. If `periodUnit` is set to *year*, the value ranges from 1 to 3. This parameter is * mandatory if `chargingMode` is set to *prePaid*. Changing this creates a new resource. */ period?: pulumi.Input<number>; /** * Specifies the charging period unit of the instance. * Valid values are *month* and *year*. This parameter is mandatory if `chargingMode` is set to *prePaid*. * Changing this creates a new resource. */ periodUnit?: pulumi.Input<string>; /** * Indicates the connection address on the tenant side. */ podConnectAddress?: pulumi.Input<string>; /** * The port number. */ port?: pulumi.Input<number>; /** * Indicates instance connection address. The structure is documented below. * The portProtocols structure is documented below. */ portProtocols?: pulumi.Input<pulumi.Input<inputs.Dms.KafkaInstancePortProtocol>[]>; /** * Specifies a product ID, which includes bandwidth, partition, broker and default * storage capacity. */ productId?: pulumi.Input<string>; /** * Indicates the public network access bandwidth. */ publicBandwidth?: pulumi.Input<number>; /** * Indicates the public IP addresses list of the instance. */ publicIpAddresses?: pulumi.Input<pulumi.Input<string>[]>; /** * Specifies the IDs of the elastic IP address (EIP) * bound to the DMS Kafka instance. Changing this creates a new instance resource. * + If the instance is created with `flavorId`, the total number of public IPs is equal to `brokerNum`. * + If the instance is created with `productId`, the total number of public IPs must provide as follows: */ publicIpIds?: pulumi.Input<pulumi.Input<string>[]>; /** * The region in which to create the DMS Kafka instances. If omitted, the * provider-level region will be used. Changing this creates a new instance resource. */ region?: pulumi.Input<string>; /** * Indicates a resource specifications identifier. */ resourceSpecCode?: pulumi.Input<string>; /** * Specifies the action to be taken when the memory usage reaches the disk * capacity threshold. The valid values are as follows: * + **time_base**: Automatically delete the earliest messages. * + **produce_reject**: Stop producing new messages. */ retentionPolicy?: pulumi.Input<string>; /** * Specifies the ID of a security group. */ securityGroupId?: pulumi.Input<string>; /** * Specifies the protocol to use after SASL is enabled. Value options: * + **SASL_SSL**: Data is encrypted with SSL certificates for high-security transmission. * + **SASL_PLAINTEXT**: Data is transmitted in plaintext with username and password authentication. This protocol only * uses the SCRAM-SHA-512 mechanism and delivers high performance. */ securityProtocol?: pulumi.Input<string>; /** * Specifies whether the Kafka SASL_SSL is enabled. * Changing this creates a new resource. */ sslEnable?: pulumi.Input<boolean>; /** * Indicates whether to enable two-way authentication. */ sslTwoWayEnable?: pulumi.Input<boolean>; /** * Indicates the status of the DMS Kafka instance. */ status?: pulumi.Input<string>; /** * Indicates the storage resource ID. */ storageResourceId?: pulumi.Input<string>; /** * Specifies the message storage capacity, the unit is GB. * The storage spaces corresponding to the product IDs are as follows: * + **c6.2u4g.cluster** (100MB bandwidth): `300` to `300,000` GB * + **c6.4u8g.cluster** (300MB bandwidth): `300` to `600,000` GB * + **c6.8u16g.cluster** (600MB bandwidth): `300` to `900,000` GB * + **c6.12u12g.cluster**: `300` to `900,000` GB * + **c6.16u32g.cluster** (1,200MB bandwidth): `300` to `900,000` GB */ storageSpace?: pulumi.Input<number>; /** * Specifies the storage I/O specification. * If the instance is created with `flavorId`, the valid values are as follows: * + **dms.physical.storage.high.v2**: Type of the disk that uses high I/O. * + **dms.physical.storage.ultra.v2**: Type of the disk that uses ultra-high I/O. */ storageSpecCode?: pulumi.Input<string>; /** * Indicates the storage type. */ storageType?: pulumi.Input<string>; /** * The key/value pairs to associate with the DMS Kafka instance. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * Indicates the DMS Kafka instance type. */ type?: pulumi.Input<string>; /** * Indicates the used message storage space. Unit: GB */ usedStorageSpace?: pulumi.Input<number>; /** * Indicates the ID of the user who created the DMS Kafka instance */ userId?: pulumi.Input<string>; /** * Indicates the name of the user who created the DMS Kafka instance */ userName?: pulumi.Input<string>; /** * Specifies whether the intra-VPC plaintext access is enabled. * Defaults to **false**. Changing this creates a new resource. */ vpcClientPlain?: pulumi.Input<boolean>; /** * Specifies the ID of a VPC. Changing this creates a new instance resource. */ vpcId?: pulumi.Input<string>; } /** * The set of arguments for constructing a KafkaInstance resource. */ export interface KafkaInstanceArgs { /** * Specifies the username of SASL_SSL user. A username consists of 4 * to 64 characters and supports only letters, digits, and hyphens (-). Changing this creates a new instance resource. */ accessUser?: pulumi.Input<string>; /** * Specifies the CPU architecture. Valid value is **X86**. * Changing this creates a new instance resource. */ archType?: pulumi.Input<string>; /** * Specifies whether auto renew is enabled. Valid values are "true" and "false". */ autoRenew?: pulumi.Input<string>; /** * The names of the AZ where the Kafka instances reside. * The parameter value can not be left blank or an empty array. Changing this creates a new instance resource. */ availabilityZones?: pulumi.Input<pulumi.Input<string>[]>; /** * @deprecated available_zones has deprecated, please use "availability_zones" instead. */ availableZones?: pulumi.Input<pulumi.Input<string>[]>; /** * @deprecated The bandwidth has been deprecated. If you need to change the bandwidth, please update the product_id. */ bandwidth?: pulumi.Input<string>; /** * Specifies the broker numbers. * It is required when creating an instance with `flavorId`. */ brokerNum?: pulumi.Input<number>; /** * Specifies the charging mode of the instance. Valid values are *prePaid* * and *postPaid*, defaults to *postPaid*. Changing this creates a new resource. */ chargingMode?: pulumi.Input<string>; /** * Specifies the cross-VPC access information. * The object structure is documented below. */ crossVpcAccesses?: pulumi.Input<pulumi.Input<inputs.Dms.KafkaInstanceCrossVpcAccess>[]>; /** * Specifies the description of the DMS Kafka instance. It is a character string * containing not more than 1,024 characters. */ description?: pulumi.Input<string>; /** * Specifies whether to enable message dumping(smart connect). * Changing this creates a new instance resource. */ dumping?: pulumi.Input<boolean>; /** * Specifies whether to enable automatic topic creation. If automatic * topic creation is enabled, a topic will be automatically created with 3 partitions and 3 replicas when a message is * produced to or consumed from a topic that does not exist. * The default value is false. */ enableAutoTopic?: pulumi.Input<boolean>; /** * Specifies the authentication mechanisms to use after SASL is * enabled. Value options: * + **PLAIN**: Simple username and password verification. * + **SCRAM-SHA-512**: User credential verification, which is more secure than **PLAIN**. */ enabledMechanisms?: pulumi.Input<pulumi.Input<string>[]>; /** * Specifies the version of the Kafka engine, * such as 1.1.0, 2.3.0, 2.7 or other supported versions. Changing this creates a new instance resource. */ engineVersion: pulumi.Input<string>; /** * Specifies the enterprise project ID of the Kafka instance. */ enterpriseProjectId?: pulumi.Input<string>; /** * Specifies the Kafka [flavor ID](https://support.huaweicloud.com/intl/en-us/productdesc-kafka/Kafka-specification.html), * e.g. **c6.2u4g.cluster**. This parameter and `productId` are alternative. */ flavorId?: pulumi.Input<string>; /** * Specifies whether to enable IPv6. Defaults to **false**. * Changing this creates a new instance resource. */ ipv6Enable?: pulumi.Input<boolean>; /** * Specifies the time at which a maintenance time window starts. Format: HH:mm. The * start time and end time of a maintenance time window must indicate the time segment of a supported maintenance time * window. The start time must be set to 22:00, 02:00, 06:00, 10:00, 14:00, or 18:00. Parameters `maintainBegin` * and `maintainEnd` must be set in pairs. If parameter `maintainBegin` is left blank, parameter `maintainEnd` is also * blank. In this case, the system automatically allocates the default start time 02:00. */ maintainBegin?: pulumi.Input<string>; /** * Specifies the time at which a maintenance time window ends. Format: HH:mm. The * start time and end time of a maintenance time window must indicate the time segment of a supported maintenance time * window. The end time is four hours later than the start time. For example, if the start time is 22:00, the end time is * 02:00. Parameters `maintainBegin` * and `maintainEnd` must be set in pairs. If parameter `maintainEnd` is left blank, parameter * `maintainBegin` is also blank. In this case, the system automatically allocates the default end time 06:00. */ maintainEnd?: pulumi.Input<string>; /** * @deprecated Deprecated */ managerPassword?: pulumi.Input<string>; /** * @deprecated Deprecated */ managerUser?: pulumi.Input<string>; /** * Specifies the parameter name. Static parameter needs to restart the instance to take effect. */ name?: pulumi.Input<string>; /** * Specifies the ID of a subnet. Changing this creates a new instance * resource. */ networkId: pulumi.Input<string>; /** * Specifies the IPv4 private IP addresses for the new brokers. */ newTenantIps?: pulumi.Input<pulumi.Input<string>[]>; /** * Specifies the array of one or more parameters to be set to the Kafka instance after * launched. The parameters structure is documented below. */ parameters?: pulumi.Input<pulumi.Input<inputs.Dms.KafkaInstanceParameter>[]>; /** * Specifies the password of SASL_SSL user. A password must meet the following * complexity requirements: Must be 8 to 32 characters long. Must contain at least 2 of the following character types: * lowercase letters, uppercase letters, digits, and special characters (`~!@#$%^&*()-_=+\\|[{}]:'",<.>/?). */ password?: pulumi.Input<string>; /** * Specifies the charging period of the instance. If `periodUnit` is set to *month* * , the value ranges from 1 to 9. If `periodUnit` is set to *year*, the value ranges from 1 to 3. This parameter is * mandatory if `chargingMode` is set to *prePaid*. Changing this creates a new resource. */ period?: pulumi.Input<number>; /** * Specifies the charging period unit of the instance. * Valid values are *month* and *year*. This parameter is mandatory if `chargingMode` is set to *prePaid*. * Changing this creates a new resource. */ periodUnit?: pulumi.Input<string>; /** * Specifies a product ID, which includes bandwidth, partition, broker and default * storage capacity. */ productId?: pulumi.Input<string>; /** * Specifies the IDs of the elastic IP address (EIP) * bound to the DMS Kafka instance. Changing this creates a new instance resource. * + If the instance is created with `flavorId`, the total number of public IPs is equal to `brokerNum`. * + If the instance is created with `productId`, the total number of public IPs must provide as follows: */ publicIpIds?: pulumi.Input<pulumi.Input<string>[]>; /** * The region in which to create the DMS Kafka instances. If omitted, the * provider-level region will be used. Changing this creates a new instance resource. */ region?: pulumi.Input<string>; /** * Specifies the action to be taken when the memory usage reaches the disk * capacity threshold. The valid values are as follows: * + **time_base**: Automatically delete the earliest messages. * + **produce_reject**: Stop producing new messages. */ retentionPolicy?: pulumi.Input<string>; /** * Specifies the ID of a security group. */ securityGroupId: pulumi.Input<string>; /** * Specifies the protocol to use after SASL is enabled. Value options: * + **SASL_SSL**: Data is encrypted with SSL certificates for high-security transmission. * + **SASL_PLAINTEXT**: Data is transmitted in plaintext with username and password authentication. This protocol only * uses the SCRAM-SHA-512 mechanism and delivers high performance. */ securityProtocol?: pulumi.Input<string>; /** * Specifies whether the Kafka SASL_SSL is enabled. * Changing this creates a new resource. */ sslEnable?: pulumi.Input<boolean>; /** * Specifies the message storage capacity, the unit is GB. * The storage spaces corresponding to the product IDs are as follows: * + **c6.2u4g.cluster** (100MB bandwidth): `300` to `300,000` GB * + **c6.4u8g.cluster** (300MB bandwidth): `300` to `600,000` GB * + **c6.8u16g.cluster** (600MB bandwidth): `300` to `900,000` GB * + **c6.12u12g.cluster**: `300` to `900,000` GB * + **c6.16u32g.cluster** (1,200MB bandwidth): `300` to `900,000` GB */ storageSpace?: pulumi.Input<number>; /** * Specifies the storage I/O specification. * If the instance is created with `flavorId`, the valid values are as follows: * + **dms.physical.storage.high.v2**: Type of the disk that uses high I/O. * + **dms.physical.storage.ultra.v2**: Type of the disk that uses ultra-high I/O. */ storageSpecCode: pulumi.Input<string>; /** * The key/value pairs to associate with the DMS Kafka instance. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * Specifies whether the intra-VPC plaintext access is enabled. * Defaults to **false**. Changing this creates a new resource. */ vpcClientPlain?: pulumi.Input<boolean>; /** * Specifies the ID of a VPC. Changing this creates a new instance resource. */ vpcId: pulumi.Input<string>; }