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.
|
X-Enterprise-Project-ID |
No |
String |
Enterprise project ID.
NOTE:
For details about how to obtain enterprise project IDs and enterprise project features, see Enterprise Management User Guide.
|
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
api_version |
Yes |
String |
API version. Fixed value: v1. |
kind |
Yes |
String |
API type. Fixed value: Environment. |
metadata |
Yes |
metadata object |
Request data. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
annotations |
No |
CreateEnvRequestAnnotations object |
|
name |
Yes |
String |
Environment name. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
{User defined key} |
No |
Map<String,String> |
Additional parameters for creating an environment.
|
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
job_id |
String |
Job ID. |
Example Requests
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", "subnet_id" : "1c75734a-132c-459f-86e2-a3db86a66b86", "security_group_id" : "e6c5a41d-8f47-48bd-a21b-0a4b10766aef" }, "name" : "test" } }
Example Responses
Status code: 200
OK
{ "job_id" : "xxx" }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
Error Codes
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