All Products
Search
Document Center

ApsaraMQ for Kafka:StartInstance

Last Updated:Mar 19, 2024

Deploys an ApsaraMQ for Kafka instance. You must purchase and deploy an ApsaraMQ for Kafka instance before you can use the instance to send and receive messages.

Operation description

Note You can call this operation up to twice per second.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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.

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

Specifies whether cross-zone deployment is required. Valid values:

  • true
  • false

Default value: true.

false
SecurityGroupstringNo

The security group of the instance.

If you do not specify this parameter, ApsaraMQ for Kafka automatically configures a security group for your instance. If you specify this parameter, you must create a security group in advance. For more information, see Create a security group.

sg-bp13wfx7kz9pko****
ServiceVersionstringNo

The version of ApsaraMQ for Kafka. Valid values: 0.10.2 and 2.2.0.

0.10.2
ConfigstringNo

The initial configurations of ApsaraMQ for Kafka. The value must be a valid JSON string.

If you do not specify this parameter, it is left empty.

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 you enable VPC transmission encryption, you must also enable access control list (ACL).
    • false: disables VPC transmission encryption. By default, VPC transmission encryption is disabled.
  • enable.acl: specifies whether to enable ACL. Valid values:

    • true: enables ACL.
    • false: disables ACL. By default, ACL is disabled.
  • kafka.log.retention.hours: the maximum message retention period when the disk capacity is sufficient. Unit: hours. Valid values: 24 to 480. Default value: 72. When the disk usage reaches 85%, the disk capacity is considered insufficient and the system deletes messages in the order in which they are stored to ensure service availability.

  • kafka.message.max.bytes: the maximum size of messages that ApsaraMQ for Kafka can send and receive. Unit: bytes. Valid values: 1048576 to 10485760. Default value: 1048576. Before you change the value of this parameter, make sure that the new value matches the corresponding configurations on the producers and consumers.

{"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 two-dimensional arrays that consist of the candidate set for primary zones and the candidate set for secondary zones.

  • If you set CrossZone to true and specify Zone H and Zone F as the candidate set for primary zones and Zone K as the candidate set for secondary zones, set this parameter to [[\"zoneh\",\"zonef\"],[\"zonek\"]].

    **

    Note If you specify multiple zones as the primary or secondary zones, the system deploys the instance in one of the zones without prioritizing them. For example, if you set this parameter to [[\"zoneh\",\"zonef\"],[\"zonek\"]], the primary zone in which the instance is deployed can be Zone H or Zone F, and the secondary zone is Zone K.

  • If you set CrossZone to false and want to deploy the instance in Zone K, set this parameter to [[\"zonek\"],[]]. In this case, the value of this parameter must still be two-dimensional arrays, but the array that specifies the candidate for secondary zones is left empty.

[[\"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

Examples

Sample success responses

JSONformat

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

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-02-27The request parameters of the API has changedsee changesets
Change itemChange content
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: VSwitchIds
2023-10-09The request parameters of the API has changedsee changesets
Change itemChange content
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: CrossZone