All Products
Search
Document Center

Message Queue for Apache Kafka:StartInstance

Last Updated:Nov 18, 2022

Deploys a Message Queue for Apache Kafka instance.

Operation Description

NoteYou can call this operation up to twice per second.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
InstanceIdstringYes

The ID of the instance.

alikafka_post-cn-v0h1fgs2****
RegionIdstringYes

The region ID of the instance.

cn-hangzhou
VpcIdstringYes

The ID of the virtual private cloud (VPC) in which you want to deploy the instance.

vpc-bp1r4eg3yrxmygv****
VSwitchIdstringYes

The ID of the vSwitch to which you want to connect the instance.

vsw-bp1j3sg5979fstnpl****
DeployModulestringYes

The deployment mode of the instance. Valid values:

  • vpc: deploys the instance that allows access only from a VPC.
  • eip: deploys the instance that allows access from the Internet and a VPC.

The deployment mode of the instance must match the type of the instance. If the instance allows access only from a VPC, set the value to vpc. If the instance allows access from the Internet and a VPC, set the value to eip.

vpc
ZoneIdstringNo

The ID of the zone in which you want to deploy the instance.

  • The zone ID of the instance must be the same as that of the vSwitch.
  • The value must be in the format of zoneX or Region ID-X. For example, you can set this parameter to zonea or cn-hangzhou-k.
cn-hangzhou-k
IsEipInnerbooleanNo

Specifies whether the instance supports elastic IP addresses (EIPs). Valid values:

  • true: supports EIPs and allows access from the Internet and a VPC.
  • false: does not support EIPs and allows access only from a VPC.

The value of this parameter must match the type of the instance. For example, if the instance allows access only from a VPC, set this parameter to false.

false
IsSetUserAndPasswordbooleanNo

Specifies whether to set a new username and password. Valid values:

  • true: sets a new username and password.
  • false: does not set a new username or password.

This parameter is available only if you deploy an instance that allows access from the Internet and a VPC.

false
UsernamestringNo

The username that is used to access the instance.

This parameter is available only if you deploy an instance that allows access from the Internet and a VPC.

username
PasswordstringNo

The password that corresponds to the username.

This parameter is available only if you deploy an instance that allows access from the Internet and a VPC.

password
NamestringNo

The name of the instance.

NoteIf you specify a value for this parameter, make sure that the specified value is unique in the region of the instance.
newInstanceName
SecurityGroupstringNo

The security group of the instance.

If you do not configure this parameter, Message Queue for Apache Kafka automatically configures a security group for the instance. If you want to configure this parameter, you must create a security group for the instance in advance. For more information, see Create a security group.

sg-bp13wfx7kz9pko****
ServiceVersionstringNo

The version number of the instance. Valid values: 0.10.2 and 2.2.0.

0.10.2
ConfigstringNo

The initial configuration of the instance. The value must be a valid JSON string.

If you do not specify a value for this parameter, the value is left empty by default.

The following parameters can be configured for Config:

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

    • true: enables VPC transmission encryption. If VPC transmission encryption is enabled, you must also enable the access control list (ACL) feature.
    • false: disables VPC transmission encryption. This is the default value.
  • enable.acl: specifies whether to enable ACL. Valid values:

    • true: enables the ACL feature.
    • false: disables the ACL feature. This is the default value.
  • kafka.log.retention.hours: the maximum period for which messages can be retained when the remaining disk space is sufficient. Unit: hours. Valid values: 24 to 480. Default value: 72. When the disk usage reaches 85%, the system deletes messages in the order in which they are stored, starting from the earliest stored message. This ensures that the performance of the service is not degraded.

  • kafka.message.max.bytes: the maximum size of messages that Message Queue for Apache Kafka can send and receive. Unit: bytes. Valid values: 1048576 to 10485760. Default value: 1048576. Before you change the maximum message size to a new value, make sure that the new value matches the configuration on the producers and consumers in the instance.

{"kafka.log.retention.hours":"33"}
KMSKeyIdstringNo

The ID of the key that is used for disk encryption in the region where the instance is deployed. You can obtain the ID of the key in the Key Management Service (KMS) console or create a key. For more information, see Manage CMKs.

If this parameter is configured, disk encryption is enabled for the instance. You cannot disable disk encryption after disk encryption is enabled. When you call this operation, the system checks whether the AliyunServiceRoleForAlikafkaInstanceEncryption service-linked role is created. If the role is not created, the system automatically creates the role. For more information, see Service-linked roles.

0d24xxxx-da7b-4786-b981-9a164dxxxxxx
NotifierstringNo

The alert contact.

Mr. Wang
UserPhoneNumstringNo

The mobile phone number of the alert contact.

1581234****
SelectedZonesstringNo

The zones among which you want to deploy the instance.

[[\"zonel\"],[\"zonek\"]]
IsForceSelectedZonesbooleanNo

Specifies whether to forcibly deploy the instance in the selected zones.

false

Response parameters

ParameterTypeDescriptionExample
object
Codeinteger

The HTTP status code returned. The HTTP status code 200 indicates that the request is successful.

200
Messagestring

The returned message.

operation success.
RequestIdstring

The ID of the request.

ABA4A7FD-E10F-45C7-9774-A5236015****
Successboolean

Indicates whether the request is successful.

true

Example

Normal return example

JSONFormat

{
  "Code": 200,
  "Message": "operation success.",
  "RequestId": "ABA4A7FD-E10F-45C7-9774-A5236015****",
  "Success": true
}

Error codes

For a list of error codes, visit the API error center.

Change history

Change timeSummary of changesOperate
2021-11-22
Change itemChange content