Modifying Environment Information
Function
This API is used to modify environment information based on the environment ID.
URI
PUT /v2/{project_id}/cas/environments/{environment_id}
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| project_id | String | Yes | Tenant's project ID. |
| environment_id | String | Yes | Environment ID. |
Request Parameters
Request parameters
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| name | String | No | Environment name. |
| alias | String | No | Environment alias. |
| description | String | No | Environment description. |
Response Parameters
Response parameters
| Parameter | Type | Description |
|---|---|---|
| id | String | Environment ID. |
| name | String | Environment name. |
| alias | String | Environment alias. |
| description | String | Environment description. |
| project_id | String | Project ID. |
| enterprise_project_id | String | Enterprise project ID. |
| charge_mode | String | Billing mode. |
| vpc_id | String | Virtual Private Cloud (VPC) ID. |
| base_resources | Array of objects | Basic resources. See Table 4. |
| optional_resources | Array of objects | Optional resources. See Table 4. |
| creator | String | Creator. |
| create_time | Integer | Creation time. |
| update_time | Integer | Update time. |
| Parameter | Type | Description |
|---|---|---|
| id | String | Resource ID. |
| type | String | Basic resources: Cloud Container Engine (CCE), Cloud Container Instance (CCI), Elastic Cloud Server (ECS), and Auto Scaling (AS). Optional resources: Relational Database Service (RDS), Distributed Cache Service (DCS), Elastic Load Balance (ELB), and other services. |
Example
Example request
{
"name": "environment_name",
"description": "environment_description",
"enterprise_project_id": "0",
"charge_mode": "provided",
"vpc_id": "b9b8f9ad-1a2e-403d-83f1-cb71a3c06df8",
"base_resources": [
{
"id": "b6862a62-d916-11e9-bdf1-0255ac101fd9",
"type": "cce"
}
],
"optional_resources": [
{
"id": "default",
"type": "cse"
}
]
} Example response
{
"id": "string",
"name": "string",
"alias": "string",
"description": "string",
"project_id": "string",
"enterprise_project_id": "string",
"charge_mode": integer,
"vpc_id": "string",
"base_resources": [{
"id": "string",
"type": "string"
}],
"optional_resources": [{
"id": "string",
"type": "string"
}],
"creator": "string",
"create_time": long,
"update_time": long
} Status Code
| HTTP Status Code | Description |
|---|---|
| 200 | OK |
| 400 | Bad Request |
| 404 | Not Found |
| 500 | Internal Server Error |
Error code must be in the format of SVCSTG.00100.[Error_ID]. Example: SVCSTG.00100400. See Error Codes of Application Management APIs.
Last Article: Obtaining All Environments
Next Article: Deleting an Environment Based on the Environment ID
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.