Creating an Environment
Function
This API is used to create an environment.
URI
POST /v1/{project_id}/cae/environments
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. See Obtaining a Project ID. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token.
Maximum characters: 16,384 |
X-Enterprise-Project-ID |
No |
String |
Enterprise project ID.
NOTE:
For more information about enterprise projects and how to obtain enterprise project IDs, see Enterprise Management User Guide. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
api_version |
Yes |
String |
API version. Fixed value: v1. Enumerated value:
|
kind |
Yes |
String |
API type. Fixed value: Environment. Enumerated value:
|
metadata |
Yes |
metadata object |
Request data. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
annotations |
No |
map<string, object> |
Additional parameters for creating an environment.
|
name |
Yes |
String |
Environment name. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
job_id |
String |
Job ID. |
Example Request
Create environment test, and bind it to a VPC and organization cae-test.
POST https://{endpoint}/v1/{project_id}/cae/environments { "api_version" : "v1", "kind" : "Environment", "metadata" : { "annotations" : { "vpc_id" : "9b320498-6c39-4fe7-a758-79636dd68a82", "group_name" : "cae-test", "type" : "exclusive" }, "name" : "test" } }
Example Response
Status code: 200
The request is successful.
{ "job_id" : "xxx" }
Status Code
Status Code |
Description |
---|---|
200 |
The request is successful. |
Error Code
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot