All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::KAFKA::Instance

Last Updated:Aug 29, 2023

ALIYUN::KAFKA::Instance is used to create an ApsaraMQ for 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,
    "PartitionNum": Integer
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

DeployType

Integer

Yes

No

The type of the network in which you want to deploy the instance.

Valid values:

  • 4: Internet and virtual private cloud (VPC)

  • 5: VPC

DiskType

String

Yes

No

The disk category of the instance.

Valid values:

  • 0: ultra disk

  • 1: standard SSD

DeployOption

Map

No

No

Details of the deployment options.

For more information, see DeployOption properties.

EipMax

Integer

No

Yes

The Internet traffic.

This property is required if DeployType is set 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 one of the IoMax and IoMaxSpec properties. If you specify both the properties, the IoMaxSpec value takes precedence over the IoMax value. We recommend that you specify only IoMaxSpec.

For more information, see Billing overview.

IoMaxSpec

String

No

Yes

The traffic specification.

You must specify one of the IoMax and IoMaxSpec properties. If you specify both the properties, the IoMaxSpec value takes precedence over the IoMax value. We recommend that you specify only IoMaxSpec.

For more information, see Billing overview.

DiskSize

Integer

Yes

Yes

The capacity of the disk.

Valid values: 500 to 96000.

Unit: GB.

TopicQuota

Integer

No

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 forcefully delete the instance.

Valid values:

  • true

  • false (default)

OpenConnector

Boolean

No

No

Specifies whether to enable the connector.

Valid values:

  • true

  • false (default)

Note

For more information about connectors, see Overview.

PartitionNum

Integer

No

Yes

The number of partitions.

The following rules apply:

  • You must specify one of the PartitionNum and TopicQuota properties. We recommend that you specify only PartitionNum.

  • If you specify both the properties, the topic-based sales model is used to check whether the PartitionNum value is the same as the TopicQuota value. If the values are not the same, a failure response is returned. If the values are the same, the order is placed based on the PartitionNum value.

For more information, see Billing 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://. It cannot start with aliyun or acs:.

Value

String

No

No

The value of the tag.

The tag value can be up to 128 characters in length, and cannot contain http:// or https://. It 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).

Valid values:

  • true

  • false (default)

This property must be consistent with the type of the instance. Set the value to true for instances of the Internet and VPC type, and false for instances of the VPC type.

DeployModule

String

Yes

No

The type of the network in which you want to deploy the instance.

Valid values:

  • vpc: VPC

  • eip: Internet and VPC

VpcId

String

No

No

The VPC ID of the instance.

None.

ZoneId

String

No

No

The zone ID of the instance.

None.

VSwitchId

String

Yes

No

The vSwitch ID of the instance.

None.

SecurityGroup

String

No

No

The security group of the instance.

If you leave this property empty, ApsaraMQ for 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 instances of the Internet and VPC type are supported. Valid values:

  • true

  • false (default)

Username

String

No

No

The username.

Only instances of the Internet and VPC type are supported.

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

Password

String

No

No

The password that corresponds to the username.

Only instances of the Internet and VPC type 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 ApsaraMQ for Kafka.

Valid values:

  • 0.10.2

  • 2.2.0

Config

Map

No

No

The initial configurations of the ApsaraMQ for Kafka instance that you want to deploy.

The value must be a valid JSON string. Valid values:

  • enable.vpc_sasl_ssl: specifies whether to enable VPC transmission encryption. Valid values:

    • true: enables VPC transmission encryption. If you enable VPC transmission encryption, you must enable the access control list (ACL) feature.

    • false (default): disables VPC transmission encryption.

  • enable.acl: specifies whether to enable the ACL feature. Valid values:

    • true

    • false (default)

  • 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: hour.

    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 they are stored, from the earliest one to the latest one. This ensures service availability.

  • kafka.message.max.bytes: the maximum size of messages that ApsaraMQ for Kafka can send and receive.

    Valid values: 1048576 to 10485760.

    Default value: 1048576.

    Unit: bytes.

    Note

    Before you change the maximum message size, make sure that the new value matches the configurations of the producer and consumer.

Return values

Fn::GetAtt

  • InstanceId: the instance ID.

  • OrderId: the order ID.

  • name: the instance name.

  • SslEndpoint: the SSL endpoint in the IP address format.

  • SaslDomainEndpoint: the Simple Authentication and Security Layer (SASL) endpoint in the domain name format.

  • SslDomainEndpoint: the SSL endpoint in the domain name format.

  • DomainEndpoint: the default endpoint in the domain name format.

  • Endpoint: the default endpoint in the IP address format.

Examples

  • YAML format

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      VpcId:
        Type: String
        AssociationProperty: ALIYUN::ECS::VPC::VPCId
      ZoneId:
        Type: String
        AssociationProperty: ALIYUN::ECS::ZoneId
      VSwitchId:
        Type: String
        AssociationProperty: ALIYUN::ECS::VSwitch::VSwitchId
        AssociationPropertyMetadata:
          VpcId: ${VpcId}
          ZoneId: ${ZoneId}
      SecurityGroupId:
        Type: String
        AssociationProperty: ALIYUN::ECS::SecurityGroup::SecurityGroupId
        AssociationPropertyMetadata:
          VpcId: ${VpcId}
    Resources:
      Instance:
        Type: ALIYUN::KAFKA::Instance
        Properties:
          DeployType: 5
          SpecType: normal
          PayType: Hour
          DiskType: '1'
          DeployOption:
            VpcId:
              Ref: VpcId
            ZoneId:
              Ref: ZoneId
            VSwitchId:
              Ref: VSwitchId
            SecurityGroup:
              Ref: SecurityGroupId
            DeployModule: vpc
            ServiceVersion: 0.10.2
            Config:
              kafka.log.retention.hours: '33'
          DeletionForce: 'false'
          DiskSize: 500
          TopicQuota: 50
          OpenConnector: 'false'
          IoMaxSpec: alikafka.hw.2xlarge
    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
  • JSON format

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "VpcId": {
          "Type": "String",
          "AssociationProperty": "ALIYUN::ECS::VPC::VPCId"
        },
        "ZoneId": {
          "Type": "String",
          "AssociationProperty": "ALIYUN::ECS::ZoneId"
        },
        "VSwitchId": {
          "Type": "String",
          "AssociationProperty": "ALIYUN::ECS::VSwitch::VSwitchId",
          "AssociationPropertyMetadata": {
            "VpcId": "${VpcId}",
            "ZoneId": "${ZoneId}"
          }
        },
        "SecurityGroupId": {
          "Type": "String",
          "AssociationProperty": "ALIYUN::ECS::SecurityGroup::SecurityGroupId",
          "AssociationPropertyMetadata": {
            "VpcId": "${VpcId}"
          }
        }
      },
      "Resources": {
        "Instance": {
          "Type": "ALIYUN::KAFKA::Instance",
          "Properties": {
            "DeployType": 5,
            "SpecType": "normal",
            "PayType": "Hour",
            "DiskType": "1",
            "DeployOption": {
              "VpcId": {
                "Ref": "VpcId"
              },
              "ZoneId": {
                "Ref": "ZoneId"
              },
              "VSwitchId": {
                "Ref": "VSwitchId"
              },
              "SecurityGroup": {
                "Ref": "SecurityGroupId"
              },
              "DeployModule": "vpc",
              "ServiceVersion": "0.10.2",
              "Config": {
                "kafka.log.retention.hours": "33"
              }
            },
            "DeletionForce": "false",
            "DiskSize": 500,
            "TopicQuota": 50,
            "OpenConnector": "false",
            "IoMaxSpec": "alikafka.hw.2xlarge"
          }
        }
      },
      "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"
            ]
          }
        }
      }
    }

For more examples, visit Instance.json and Instance.yml. In the examples, the ALIYUN::KAFKA::Instance and ALIYUN::KAFKA::Topic resource types are used.