Creates an instance group for a specified application.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request headers

This operation uses only the common request header. For more information, see Common request parameters.

Request syntax

POST /pop/v5/deploy_group HTTP/1.1

Request parameters

Parameter Type Position Required Example Description
AppId String Query Yes 3616cdca-4f92-4413-***********

The ID of the application.

GroupName String Query Yes test

The name of the instance group. The name can be up to 64 characters in length.

InitPackageVersionId String Query No 441beb18-da42-44dc-****-****

The version of the initial deployment package associated with the instance group. You can call the ListHistoryDeployVersion operation to query the version. For more information, see ListHistoryDeployVersion.

Response parameters

Parameter Type Example Description
Code Integer 200

The HTTP status code.

DeployGroupEntity Struct

The information about the instance group created.

AppId String 3616cdca-4f92-4413-***********

The ID of the application.

AppVersionId String ****f4c50-16ee-a02b-667*****

The version of the deployment package for the application.

  • If the application is deployed, a string of random numbers is returned.
  • If the application is not deployed, the return value is empty.
ClusterId String 0d247b93-8d62-4e34***********

The ID of the cluster.

CreateTime Long 1573627695779

The time when the instance group was created. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC.

GroupName String test

The name of the instance group.

GroupType Integer 1

The type of the instance group. Valid values:

  • 0: the default group.
  • 1: a group for which canary traffic management is not enabled.
  • 2: a group for which canary traffic management is enabled.
Id String 577f4c50-16ee-43d8-a02b-667*********

The ID of the instance group.

PackageVersionId String ****7b93-8d62-4e34***********

The version of the deployment package that was used to deploy an application in the instance group.

  • If an application is deployed in the instance group, a string of random numbers is returned.
  • If no application is deployed in the instance group, the return value is empty.
UpdateTime Long 1573627695779

The time when the instance group was updated. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC.

Message String success

The returned message that indicates whether the request is successful.

RequestId String 3RD9-D3FRE****************

The ID of the request.

Examples

Sample requests

POST /pop/v5/deploy_group HTTP/1.1
Common request header
{
"AppId": "3616cdca-4f92-4413-***********",
"GroupName": "test"
}

Sample success responses

XML format

<Message>success</Message>
<DeployGroupEntity>
    <GroupType>1</GroupType>
    <GroupName>test</GroupName>
    <ClusterId>0d247b93-8d62-4e34***************</ClusterId>
    <PackageVersionId/>
    <CreateTime>1573627695779</CreateTime>
    <AppId>3616cdca-4f92-4413-***********</AppId>
    <UpdateTime>1573627695779</UpdateTime>
    <Id>577f4c50-16ee-43d8-a02b-667*********</Id>
    <AppVersionId/>
</DeployGroupEntity>
<Code>200</Code>

JSON format

{
	"Message": "success",
	"DeployGroupEntity": {
		"GroupType": 1,
		"GroupName": "test",
		"ClusterId": "0d247b93-8d62-4e34***************",
		"PackageVersionId": "",
		"CreateTime": 1573627695779,
		"AppId": "3616cdca-4f92-4413-***********",
		"UpdateTime": 1573627695779,
		"Id": "577f4c50-16ee-43d8-a02b-667*********",
		"AppVersionId": ""
	},
	"Code": 200
}

Error codes

For a list of error codes, visit the API Error Center.