Enabling an Environment Resource Based on the Environment ID
Function
This API is used to enable an environment resource based on the environment ID.
URI
POST /v3/{project_id}/cas/environments/{environment_id}/iac-resources/provision
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Tenant's project ID. See Obtaining a Project ID. |
environment_id |
Yes |
String |
Environment ID. See Obtaining All Environments. |
Request
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
Content-Type |
Yes |
String |
Message body type (format). Default value: application/json;charset=utf8. |
X-Auth-Token |
Yes |
String |
API calling can be authenticated using a token or AK/SK. If you use a token, this parameter is mandatory and must be set to the token. For details about how to obtain the token, see Authentication. |
Response
Parameter |
Type |
Description |
---|---|---|
status |
String |
Status of an environment resource.
|
status_message |
String |
Displayed message. When status is CREATION_FAILED, an error message is displayed for troubleshooting. |
create_time |
Integer |
Creation time. |
execution_plan_item |
Array of objects |
List of execution plan items. See Table 4. |
Parameter |
Type |
Description |
---|---|---|
resource_type |
String |
Resource type. |
resource_name |
String |
Resource name. The default value is the logical name of a resource. |
index |
String |
Resource index. |
action |
String |
Resource change type. |
action_reason |
String |
Reason for triggering the change. |
mode |
String |
Resource mode.
|
drifted |
Boolean |
Whether the resource change is caused by deviation.
|
imported |
Boolean |
Whether the resource change is imported.
|
resource_id |
String |
Physical ID of a resource. |
attributes |
Array of objects |
Changed attributes of execution plan items. If no attribute is changed, the list is empty. See Table 5. |
Parameter |
Type |
Description |
---|---|---|
name |
String |
Name of the to-be-modified parameter of the current resource. |
previous_value |
String |
Original value of the to-be-modified parameter of the current resource. |
target_value |
String |
Target value of the to-be-modified parameter of the current resource. |
Example Request
None
Example Response
{ "status": "CREATION_COMPLETE", "status_message": null, "execution_plan_items": [ { "resource_type": "hcs_vpc_subnet", "resource_name": "subnet", "action": "ADD", "attributes": [ { "name": "cidr", "target_value": "172.16.0.0/16" } ], "mode": "RESOURCE", } ] }
Status Code
Status Code |
Description |
---|---|
200 |
OK |
400 |
Bad Request |
404 |
Not Found |
500 |
Internal Server Error |
Error Code
The error code format is SVCSTG.00100.[Error_ID], for example, SVCSTG.00100400. For details, see ServiceStage 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