You can call this operation to query deployment environments based on specified conditions.

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

GET /pop/v1/wam/appEnv HTTP/1.1

Request parameters

Parameter Type Required? Example Description
AppId String Yes wa-5cef9f96dd351b61df0*****

The ID of the application to which the deployment environments to be queried belong.

EnvId String No we-5d22b3816f48e5478fd*****

The ID of the deployment environment.

EnvName String No Test1

The name of the deployment environment.

EnvSearch String No Test

The keyword used to query deployment environments.

IncludeTerminated Boolean No true

Specifies whether to include the terminated deployment environments in the returned list.

PageNumber Integer No 1

The number of the page to return. Default value: 1.

PageSize Integer No 10

The number of entries to return on each page. Default value: 10.

RecentUpdated Boolean No false

Specifies whether to query the deployment environments that are changed recently. Default value: false.

StackSearch String No Java

The keyword used to query technology stacks.

Response parameters

Parameter Type Example Description
AppEnvs

The list of the deployment environments queried.

AbortingChange Boolean false

Indicates whether the change of the deployment environment is being aborted.

AppId String wa-5cef9f96dd351b61df0*****

The ID of the application to which the queried deployment environments belong.

AppName String test

The name of the application.

ApplyingChange Boolean false

Indicates whether the deployment environment is being changed.

CategoryName String Java

The type of the technology stack used by the deployment environment.

ChangeBanner String Web+ is changing your deployment environment.

The message notifying you of the change progress.

CreateTime Long 1560246554242

The time when the deployment environment was created.

CreateUsername String test

The name of the user who created the deployment environment.

DataRoot String wproot

The root directory for storing data files.

EnvDescription String This is an env.

The description of the deployment environment.

EnvId String we-5d22b3816f48e5478fd*****

The ID of the deployment environment.

EnvName String test

The name of the deployment environment.

EnvStatus String RUNNING

The running status of the deployment environment.

EnvType String web

The type of the deployment environment.

LastEnvStatus String RUNNING

The status of the deployment environment before the last change.

LatestChangeId String wc-5d22c046b767ab0fc64*****

The ID of the last change of the deployment environment.

LogBase String logs/yourJava-java/environments/Test2/

The root directory for storing log files.

PkgVersionId String wp-5d1c0a5d913567334af*****

The ID of the deployment package version.

PkgVersionLabel String 20190703.095155

The name of the deployment package version.

PkgVersionStorageKey String webplus-demo-java-0.1.0-SNAPSHOT-exec.jar

The file of the deployment package version.

StackId String ws-6c937c98a9c0296d0c48*****

The ID of the technology stack.

StackName String Java 8 / Aliyun Linux 2.1903

The name of the technology stack.

StorageBase String resources/yourJava-java/environments/Test2/

The root directory for storing resources in the deployment environment.

TotalInstances Long 1

The total number of instances in the deployment environment.

UpdateTime Long 1562557466136

The time when the deployment environment was last updated.

UpdateUsername String test

The name of the user who last updated the deployment environment.

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.

PageNumber Integer 10

The number of the page returned.

PageSize Integer 1

The number of entries returned on each page.

RequestId String D435EBFB-623E-47FB-A55A-C0F4C8B*****

The ID of the request.

TotalCount Integer 1

The total number of entries returned.

Examples

Sample request


http://webplus.cn-hangzhou.aliyuncs.com/pop/v1/wam/appEnv?&AppId=wa-5cef9f96dd351b61df0*****&<Common request parameters>

Sample success response

XML format

<DescribeAppEnvsResponse>
    <AppEnvs>
        <AppEnv>
            <LatestChangeId>wc-5d135e524f2c7336e33*****</LatestChangeId>
            <Type>web</Type>
            <DataRoot>wproot</DataRoot>
            <ApplyingChange>false</ApplyingChange>
            <AppId>wa-5cef9f96dd351b61df0*****</AppId>
            <StackName>Java 8 / Aliyun Linux 2.1903</StackName>
            <PkgVersionStorageKey>webplus-demo-java-0.1.0-SNAPSHOT-exec.jar</PkgVersionStorageKey>
            <CreateUsername>test</CreateUsername>
            <AppName>sanwei-java</AppName>
            <LastEnvStatus>TERMINATING</LastEnvStatus>
            <PkgVersionId>wp-5cff7917c6af395bed9*****</PkgVersionId>
            <EnvDescription></EnvDescription>
            <LogBase>logs/test/environments/test/</LogBase>
            <StackId>ws-6c937c98a9c0296d0c48*****</StackId>
            <UpdateTime>1561550418955</UpdateTime>
            <TotalInstances>1</TotalInstances>
            <AbortingChange>false</AbortingChange>
            <EnvName>tefdsa</EnvName>
            <EnvStatus>TERMINATED</EnvStatus>
            <CategoryName>Java</CategoryName>
            <UpdateUsername>test</UpdateUsername>
            <StorageBase>resources/test/environments/test/</StorageBase>
            <CreateTime>1560246554242</CreateTime>
            <PkgVersionLabel>20190611.174849</PkgVersionLabel>
            <EnvId>we-5cff791ac6af395bed9*****</EnvId>
        </AppEnv>
    </AppEnvs>
    <PageNumber>1</PageNumber>
    <TotalCount>1</TotalCount>
    <Message>success</Message>
    <PageSize>10</PageSize>
    <RequestId>46F9B039-C782-4E68-8881-7F63A63*****</RequestId>
    <Code>OK</Code>
</DescribeAppEnvsResponse>

JSON format

{
	"AppEnvs":{
		"AppEnv":[
			{
				"LatestChangeId":"wc-5d135e524f2c7336e33*****",
				"DataRoot":"wproot",
				"Type":"web",
				"AppId":"wa-5cef9f96dd351b61df0*****",
				"StackName":"Java 8 / Aliyun Linux 2.1903",
				"EnvStatus":"TERMINATED",
				"PkgVersionStorageKey":"webplus-demo-java-0.1.0-SNAPSHOT-exec.jar",
				"EnvName":"test",
				"EnvId":"we-5cff791ac6af395bed9*****",
				"CreateUsername":"test",
				"AppName":"test",
				"PkgVersionId":"wp-5cff7917c6af395bed9*****",
				"AbortingChange":false,
				"CategoryName":"Java",
				"LogBase":"logs/test/environments/test/",
				"StackId":"ws-6c937c98a9c0296d0c48*****",
				"UpdateTime":1561550418955,
				"TotalInstances":1,
				"EnvDescription":"",
				"LastEnvStatus":"TERMINATING",
				"UpdateUsername":"test",
				"StorageBase":"resources/yourJava-java/environments/tefdsa/",
				"ApplyingChange":false,
				"CreateTime":1560246554242,
				"PkgVersionLabel":"20190611.174849"
			}
		]
	},
	"PageNumber":1,
	"TotalCount":1,
	"Message":"success",
	"PageSize":10,
	"RequestId":"D435EBFB-623E-47FB-A55A-C0F4C8B*****",
	"Code":"OK"
}

Error codes

HTTP status code Error code Error message Description
400 AppNotExist A corresponding application was not found based on the application ID. The error message returned because the application of the specified ID does not exist.
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.

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