Creates an environment.
This API has been deprecated with no replacement. While temporary access is maintained, no further updates or bug fixes will be provided. To ensure continued functionality, plan your migration and contact your account manager for support.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
apig:CreateEnvironment |
none |
*Environment
|
None | None |
Request syntax
POST /v1/environments HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request body. |
|
| name |
string |
Yes |
The environment name. |
test |
| alias |
string |
Yes |
The environment alias. |
测试环境 |
| description |
string |
No |
The description of the environment. You can specify information such as the purpose and owner of the environment. |
这是xxx的xx项目测试环境 |
| gatewayId |
string |
Yes |
The gateway ID. |
gw-cq7l5s5lhtgi6qasrdc0 |
| resourceGroupId |
string |
No |
The resource group ID. |
rg-ahr5uil8raz0rq3b |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| requestId |
string |
The request ID, which is used to trace the API call chain. |
3C3B9A12-3868-5EB9-8BEA-F99E03DD125C |
| code |
string |
The response code. |
Ok |
| message |
string |
The response message. |
success |
| data |
object |
The response data. |
|
| environmentId |
string |
The environment ID. |
env-cq7l5s5lhtgi6qasrdc0 |
Examples
Success response
JSON format
{
"requestId": "3C3B9A12-3868-5EB9-8BEA-F99E03DD125C",
"code": "Ok",
"message": "success",
"data": {
"environmentId": "env-cq7l5s5lhtgi6qasrdc0"
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.