Deploys a Message Queue for Apache Kafka instance.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | StartInstance |
The operation that you want to perform. Set the value to StartInstance. |
InstanceId | String | Yes | alikafka_post-cn-v0h1fgs2**** |
The ID of the Message Queue for Apache Kafka instance. |
RegionId | String | Yes | cn-hangzhou |
The region ID of the Message Queue for Apache Kafka instance. |
VpcId | String | Yes | vpc-bp1r4eg3yrxmygv**** |
The ID of the virtual private cloud (VPC) where you want to deploy the Message Queue for Apache Kafka instance. |
VSwitchId | String | Yes | vsw-bp1j3sg5979fstnpl**** |
The ID of the vSwitch where you want to deploy the Message Queue for Apache Kafka instance. |
DeployModule | String | Yes | vpc |
The deployment mode of the Message Queue for Apache Kafka instance. Valid values:
The deployment mode of the Message Queue for Apache Kafka instance must match its instance type. Set the value to vpc if the instance allows access only from a VPC. Set the value to eip if the instance allows access from the Internet and a VPC. |
ZoneId | String | No | cn-hangzhou-k |
The ID of the zone where you want to deploy the Message Queue for Apache Kafka instance.
|
IsEipInner | Boolean | No | false |
Specifies whether the Message Queue for Apache Kafka instance supports elastic IP addresses (EIPs). Valid values:
The value of this parameter must match the instance type. For example, if the instance allows access only from a VPC, set this parameter to false. |
IsSetUserAndPassword | Boolean | No | false |
Specifies whether to set a new username and password for the Message Queue for Apache Kafka instance. Valid values:
This parameter applies only to instances that allow access from the Internet and a VPC. |
Username | String | No | username |
The username for the Message Queue for Apache Kafka instance. This parameter applies only to instances that allow access from the Internet and a VPC. |
Password | String | No | password |
The password for the Message Queue for Apache Kafka instance. This parameter applies only to instances that allow access from the Internet and a VPC. |
Name | String | No | newInstanceName |
The name of the Message Queue for Apache Kafka instance. Note Make sure that the parameter value is unique in the region of the instance.
|
SecurityGroup | String | No | sg-bp13wfx7kz9pkow*** |
The security group of the Message Queue for Apache Kafka instance. If you do not specify this parameter, Message Queue for Apache Kafka automatically configures a security group for the instance. If you specify this parameter, you must create a security group in advance. For more information, see Create a security group. |
ServiceVersion | String | No | 0.10.2 |
The version of the Message Queue for Apache Kafka instance. Valid values: 0.10.2 and 2.2.0. |
Config | String | No | {"kafka.log.retention.hours":"33"} |
The initial configurations of the Message Queue for Apache Kafka instance. The value must be a valid JSON string. If you do not specify this parameter, it is left empty. The Config parameter supports the following parameters:
|
KMSKeyId | String | No | 0d24xxxx-da7b-4786-b981-9a164dxxxxxx |
The ID of the key that is used to encrypt data on standard SSDs in the region of the instance. You can either obtain the ID of the key from the Key Management Service (KMS) console or create a key. For more information, see Manage CMKs. If this parameter is specified, encryption is enabled for the instance. You cannot disable encryption after it is enabled. When you call this operation, the system checks whether the AliyunServiceRoleForAlikafkaInstanceEncryption service-linked role is created. If not, the system automatically creates it. For more information, see Service-linked roles. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Code | Integer | 200 |
The HTTP status code. The HTTP status code 200 indicates that the request is successful. |
Message | String | operation success. |
The returned message. |
RequestId | String | ABA4A7FD-E10F-45C7-9774-A5236015A*** |
The ID of the request. |
Success | Boolean | true |
Indicates whether the request is successful. |
Examples
Sample requests
http(s)://alikafka.cn-hangzhou.aliyuncs.com/?Action=StartInstance
&InstanceId=alikafka_post-cn-v0h1fgs2****
&RegionId=cn-hangzhou
&VpcId=vpc-bp1r4eg3yrxmygv****
&VSwitchId=vsw-bp1j3sg5979fstnpl****
&DeployModule=vpc
&ZoneId=cn-hangzhou-k
&IsEipInner=false
&IsSetUserAndPassword=false
&Username=username
&Password=password
&Name=newInstanceName
&SecurityGroup=sg-bp13wfx7kz9pkow***
&ServiceVersion= 0.10.2
&Config={"kafka.log.retention.hours":"33"}
&KMSKeyId=0d24xxxx-da7b-4786-b981-9a164dxxxxxx
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<StartInstanceResponse>
<Code>200</Code>
<Message>operation success.</Message>
<RequestId>ABA4A7FD-E10F-45C7-9774-A5236015A***</RequestId>
<Success>true</Success>
</StartInstanceResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"Code" : 200,
"Message" : "operation success.",
"RequestId" : "ABA4A7FD-E10F-45C7-9774-A5236015A***",
"Success" : true
}
Error codes
For a list of error codes, visit the API Error Center.