ALIYUN::KAFKA::Instance is used to create a Message Queue for Apache Kafka instance.

Syntax

{
  "Type": "ALIYUN::KAFKA::Instance",
  "Properties": {
    "DeployType": Integer,
    "DiskType": String,
    "DeployOption": Map,
    "EipMax": Integer,
    "SpecType": String,
    "IoMax": Integer,
    "IoMaxSpec": String,
    "DiskSize": Integer,
    "TopicQuota": Integer,
    "PayType": String,
    "Tags": List,
    "DeletionForce": Boolean,
    "OpenConnector": Boolean
  }
}

Properties

Property Type Required Editable Description Constraint
DeployType Integer Yes No The network in which you deploy the instance. Valid values:
  • 4: Internet and virtual private cloud (VPC)
  • 5: VPC
DiskType String Yes No The category of the disk. Valid values:
  • 0: ultra disk
  • 1: SSD
DeployOption Map No No The details of deployment options. For more information, see DeployOption properties.
EipMax Integer No No The Internet traffic. This property is required when you set the DeployType property to 4.

Valid values: 1 to 160.

SpecType String No Yes The edition of the instance. Valid values:
  • normal: Standard Edition (High Write)
  • professional: Professional Edition (High Write)
  • professionalForHighRead: Professional Edition (High Read)
IoMax Integer No Yes The peak traffic. You must specify the IoMax or IoMaxSpec property. If you specify both the properties, the value of the IoMaxSpec property takes precedence over the value of the IoMax property. We recommend that you specify only the IoMaxSpec property.

For more information about the valid values, see Overview.

IoMaxSpec String No Yes The traffic specification. You must specify the IoMax or IoMaxSpec property. If you specify both the properties, the value of the IoMaxSpec property takes precedence over the value of the IoMax property. We recommend that you specify only the IoMaxSpec property.

For more information about the valid values, see Overview.

DiskSize Integer Yes Yes The size of the disk. Valid values: 500 to 96000.

Unit: GB.

TopicQuota Integer Yes Yes The number of topics. Valid values: 50 to 79.
PayType String No No The billing cycle of the instance. Valid values:
  • Hour
  • Month
Tags List No Yes The tags of the instance. You can add up to 20 tags.

For more information, see Tags properties.

DeletionForce Boolean No Yes Specifies whether to force delete the instance. Default value: false. Valid values:
  • true: force deletes the instance.
  • false: does not force delete the instance.
OpenConnector Boolean No No Specifies whether to enable the connector. Default value: false. Valid values:
  • true: enables the connector.
  • false: disables the connector.
Note For more information about connectors, see Overview.

Tags syntax

"Tags": [
  {
    "Key": String,
    "Value": String
  }
]  

Tags properties

Property Type Required Editable Description Constraint
Key String Yes No The key of the tag. The tag key must be 1 to 128 characters in length, and cannot contain http:// or https://. The tag key cannot start with aliyun or acs:.
Value String No No The value of the tag. The tag value must be 0 to 128 characters in length, and cannot contain http:// or https://. The tag value cannot start with aliyun or acs:.

DeployOption syntax

"DeployOption": {
  "IsEipInner": Boolean,
  "VpcId": String,
  "ZoneId": String,
  "VSwitchId": String,
  "SecurityGroup": String,
  "DeployModule": String,
  "Name": String,
  "IsSetUserAndPassword": Boolean,
  "Username": String,
  "Password": String,
  "ServiceVersion": String,
  "Config": Map
}

DeployOption properties

Property Type Required Editable Description Constraint
IsEipInner Boolean No No Specifies whether the instance supports elastic IP addresses (EIPs). Default value: false. Valid values:
  • true: The instance supports EIPs.
  • false: The instance does not support EIPs.

You must specify the value of this property based on the instance type. If you use an Internet- and VPC-connected instance, set the IsEipInner property to true. If you use a VPC-connected instance, set the IsEipInner property to false.

DeployModule String Yes No The deployment mode. Valid values:
  • vpc: VPC
  • eip: Internet and VPC
VpcId String No No The ID of the VPC in which you deploy the instance. None.
ZoneId String No No The ID of the zone in which you deploy the instance. None.
VSwitchId String Yes No The ID of the vSwitch in which you deploy the instance. None.
SecurityGroup String No No The security group of the instance. If you do not specify this property, Message Queue for Apache Kafka automatically configures a security group for the instance.
Name String No No The name of the instance. None.
IsSetUserAndPassword Boolean No No Specifies whether to configure a new username and password. Only Internet- and VPC-connected instances are supported. Default value: false. Valid values:
  • true: configures a new username and password.
  • false: does not configure a new username or password.
Username String No No The username.

Only Internet- and VPC-connected instances are supported.

The username must be 8 to 40 characters in length, and can contain letters and digits.

Password String No No The password.

Only Internet- and VPC-connected instances are supported.

The password must be 8 to 40 characters in length, and must contain lowercase letters, uppercase letters, and digits.

ServiceVersion String No No The version of the Message Queue for Apache Kafka service that you deploy. Valid values:
  • 0.10.2
  • 2.2.0
Config Map No No The initial configurations of the Message Queue for Apache Kafka service that you deploy. The value must be a valid JSON string. Valid values:
  • enable.vpc_sasl_ssl: specifies whether to enable VPC transmission encryption. Default value: false. Valid values:
    • true: enables VPC transmission encryption. If you enable VPC transmission encryption, you must also enable the access control list (ACL) feature.
    • false: disables VPC transmission encryption.
  • enable.acl: specifies whether to enable the ACL feature. Default value: false. Valid values:
    • true: enables the ACL feature.
    • false: disables the ACL feature.
  • kafka.log.retention.hours: the maximum retention period of messages when the disk capacity is sufficient.

    Valid values: 24 to 480.

    Default value: 72.

    Unit: hours.

    Note When the disk usage reaches 85%, the system considers that the disk capacity is insufficient. In this case, the system deletes messages in the order in which the messages are stored, from the earliest to the latest. This ensures service availability.
  • kafka.message.max.bytes: the maximum size of messages that Message Queue for Apache Kafka can send and receive.

    Valid values: 1048576 to 10485760.

    Default value: 1048576.

    Unit: byte.

    Note Before you modify the maximum message size, make sure that the new value matches the configurations on the producer and consumer.

Return values

Fn::GetAtt

  • InstanceId: the ID of the instance.
  • OrderId: the ID of the order.
  • name: the name of the instance.

Examples

JSON format

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "DeployType": {
      "Type": "Number",
      "Description": "The deployment mode of the Message Queue for Apache Kafka instance. Valid values: \n  4: Instance of the public type \n  5: Instance of the VPC type",
      "AllowedValues": [
        4,
        5
      ],
      "Default": 5
    },
    "SpecType": {
      "Type": "String",
      "Description": "The edition of the Message Queue for Apache Kafka instance. Valid values: \nprofessional: Professional Edition \nnormal: Normal version",
      "AllowedValues": [
        "normal",
        "professional",
        "professionalForHighRead"
      ],
      "Default": "normal"
    },
    "IoMaxSpec": {
      "Type": "String",
      "Description": "Flow specification (recommended) \nThe IoMax and IoMaxSpec must be optional. \nWhen filling in at the same time, subject to IoMaxSpec. \nIt is recommended that you only fill in the flow specification \n",
      "Default": "alikafka.hw.2xlarge"
    },
    "PayType": {
      "Type": "String",
      "Description": "Pay by hour or month.",
      "AllowedValues": [
        "Hour",
        "Month"
      ],
      "Default": "Hour"
    },
    "DiskType": {
      "Type": "String",
      "Description": "The type of the disk to be configured for the Message Queue for Apache Kafka instance. Valid values: \n0: Ultra disk \n1: SSD",
      "AllowedValues": [
        "0",
        "1"
      ],
      "Default": "1"
    },
    "DeployOption": {
      "Type": "Json",
      "Description": "If you want to deploy instance after create at once, the VSwitchId and DeployModule parameters is required",
      "Default": {
        "VpcId": "vpc-bp1vo0eez19cmlv1w****",
        "ZoneId": "cn-hangzhou-i",
        "VSwitchId": "vsw-bp1mq4dvcnvzbyevo****",
        "SecurityGroup": "sg-bp1gjon8qil2uf1a****",
        "DeployModule": "vpc",
        "ServiceVersion": "0.10.2",
        "Config": {
          "kafka.log.retention.hours": "33"
        }
      }
    },
    "DeletionForce": {
      "Type": "Boolean",
      "Description": "Whether delete all topics, consumer groups of the kafka instance and then delete instance. Default is false",
      "AllowedValues": [
        "True",
        "true",
        "False",
        "false"
      ],
      "Default": "false"
    },
    "DiskSize": {
      "Type": "Number",
      "Description": "The size of the disk to be configured for the Message Queue for Apache Kafka instance.",
      "Default": 500
    },
    "TopicQuota": {
      "Type": "Number",
      "Description": "The number of topics to be configured for the Message Queue for Apache Kafka instance. \nThe default value of this parameter varies with different peak traffic values. \nAdditional fees are charged if the default values are exceeded.\n Different specifications have different default values, and extra fees are charged. \nFor more information, see Billing.",
      "Default": 50
    },
    "OpenConnector": {
      "Type": "Boolean",
      "Description": "Whether open kafka connector or not",
      "AllowedValues": [
        "True",
        "true",
        "False",
        "false"
      ],
      "Default": "false"
    }
  },
  "Resources": {
    "Instance": {
      "Type": "ALIYUN::KAFKA::Instance",
      "Properties": {
        "DeployType": {
          "Ref": "DeployType"
        },
        "SpecType": {
          "Ref": "SpecType"
        },
        "PayType": {
          "Ref": "PayType"
        },
        "DiskType": {
          "Ref": "DiskType"
        },
        "DeployOption": {
          "Ref": "DeployOption"
        },
        "DeletionForce": {
          "Ref": "DeletionForce"
        },
        "DiskSize": {
          "Ref": "DiskSize"
        },
        "TopicQuota": {
          "Ref": "TopicQuota"
        },
        "OpenConnector": {
          "Ref": "OpenConnector"
        },
        "IoMaxSpec": {
          "Ref": "IoMaxSpec"
        }
      }
    }
  },
  "Outputs": {
    "InstanceId": {
      "Description": "Id of the instance. ",
      "Value": {
        "Fn::GetAtt": [
          "Instance",
          "InstanceId"
        ]
      }
    },
    "OrderId": {
      "Description": "Id of the order. ",
      "Value": {
        "Fn::GetAtt": [
          "Instance",
          "OrderId"
        ]
      }
    },
    "Name": {
      "Description": "Name of the instance.",
      "Value": {
        "Fn::GetAtt": [
          "Instance",
          "Name"
        ]
      }
    }
  }
}

To view more examples, visit Instance.json and Instance.yml.