Updated on 2023-07-28 GMT+08:00

Modifying an Environment

Function

This API is used to modify the information about a specified environment. Only the name and remark attributes of an environment can be modified.

URI

The following table lists the HTTP/HTTPS request method and URI of the API.

Table 1 HTTP/HTTPS request method and URI

Request Method

URI

PUT

/v1.0/apigw/envs/{id}

The following table lists the parameter in the URI.

Table 2 Parameter description

Parameter

Mandatory

Type

Description

id

Yes

String

Environment ID, which can be obtained by querying the environment information

Request

Table 3 Parameter description

Parameter

Mandatory

Type

Description

name

Yes

String

Environment name

An environment name consists of 3–64 characters, starting with a letter. Only letters, digits, and underscores (_) are allowed.

remark

No

String

Description of the environment

The description cannot exceed 255 characters.

Example request:

{
	"name": "DEVELOP",
	"remark": "Development environment"
}

Response

Table 4 Parameter description

Parameter

Type

Description

id

String

Environment ID

name

String

Environment name

create_time

Timestamp

Time when the environment is created

remark

String

Description of the environment

Example response:

{
	"id": "0035dd2e76dd4e3fa45fef634318ada4",
	"name": "DEVELOP",
	"remark": "Development environment",
	"create_time": "2017-12-28T12:50:47Z"
}

Status Codes

Table 5 Status codes

Status Code

Description

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

500

Server Internal Error