You can call this operation to create a deployment package version.

Debugging

Alibaba Cloud provides OpenAPI Explorer to simplify API usage. You can use OpenAPI Explorer to search for APIs, call APIs, and dynamically generate SDK example code.

Request headers

This operation uses common request headers, instead of special request headers. For more information, see the "Common request headers" section in "Common request and response headers."

Request syntax

POST /pop/v1/wam/pkgVersion HTTP/1.1

Request parameters

Parameter Type Required? Example Description
AppId String No wa-5d3eaae92977ca5251e*****

The ID of the application for which the deployment package version is to be created.

PackageSource String No oss://target-url/webx/webx-quickstart-tomcat-0.1.0-SNAPSHOT.war

The URL of the resource package used to create the deployment package version.

PkgVersionDescription String No This is a package.

The description of the deployment package version.

PkgVersionLabel String No version-demo-tmc-1.5

The label of the deployment package version.

Response parameters

Parameter Type Example Description
Code String OK

The response code. The value is OK if the request is successful.

Message String success

The response message. The value is success if the request is successful.

PkgVersion

The information about the deployment package version.

AppId String wa-5d3eaae92977ca5251e*****

The ID of the application.

AppName String app1

The name of the application.

CreateTime Long 1564388159130

The time when the deployment package version was created.

PackageSource String oss://target-url/webx/webx-quickstart-tomcat-0.1.0-SNAPSHOT.war

The URL of the resource package used to create the deployment package version.

PkgVersionDescription String This is a package

The description of the deployment package version.

PkgVersionId String wp-5d3eab3f2977ca5251e*****

The ID of the deployment package version.

PkgVersionLabel String version-demo-tmc-1.5

The label of the deployment package version.

UpdateTime Long 1564388159130

The time when the deployment package version was last updated.

RequestId String 14A65FB3-DFD6-4D9A-83EA-9259C2D*****

The ID of the request.

Examples

Sample request


http://webplus.cn-hangzhou.aliyuncs.com/pop/v1/wam/pkgVersion?ServiceCode=webx&<Common request parameters>
{
   "PkgVersionLabel","version-demo-tmc-1.5",
   "PkgVersionDescription","This is a package.",
   "AppId","wa-5d3eaae92977ca5251e*****",
   "PackageSource","oss://target-url/webx/webx-quickstart-tomcat-0.1.0-SNAPSHOT.war"

}

Sample success response

XML format

<CreatePkgVersionResponse>
      <Message>success</Message>
      <RequestId>257C2FA9-3316-4BCB-9DB7-219A7A0*****</RequestId>
      <PkgVersion>
            <PkgVersionDescription>This is a package. </PkgVersionDescription>
            <CreateTime>1562246822377</CreateTime>
            <AppId>wa-5d1d9d8c85c7f86e2ef*****</AppId>
            <UpdateTime>1562246822377</UpdateTime>
            <PkgVersionLabel>version-demo-tmc-1.4</PkgVersionLabel>
            <PkgVersionId>wp-5d244f33f314934e2ab*****</PkgVersionId>
      </PkgVersion>
      <Code>OK</Code>
</CreatePkgVersionResponse>

JSON format

{
	"PkgVersion":{
		"PkgVersionDescription":"This is a package.",
		"CreateTime":1564388159130,
		"PkgVersionLabel":"version-demo-tmc-1.5",
		"AppId":"wa-5d3eaae92977ca5251e*****",
		"UpdateTime":1564388159130,
		"PkgVersionId":"wp-5d3eab3f2977ca5251e*****"
	},
	"Message":"success",
	"RequestId":"257C2FA9-3316-4BCB-9DB7-219A7A0*****",
	"Code":"OK"
}

Error codes

HTTP status code Error code Error message Description
403 ResourceAuthFailed The specified resource does not exist or it does not belong to this Alibaba Cloud account. The error message returned because the specified resource does not exist or it does not belong to your Alibaba Cloud account.
400 VersionLabelExists An error occurred while creating an application version. The version name already exists. Please use a different name and try again. The error message returned because an error occurred while creating an application version. The version name already exists. Use a unique version name and try again.
400 OSSPathInvalid The specified OSS path is invalid. For more information about OSS path, see oss://webx-demo/directory/file.json The error message returned because the specified OSS path is invalid. For more information about the OSS path, see oss://webx-demo/directory/file.json.

For more information about error codes, see API Error Center.