Querying Resource Enabling Records Based on the Environment ID
Function
This API is used to query resource enabling records based on the environment ID.
URI
GET /v3/{project_id}/cas/environments/{environment_id}/iac-resources/provision-histories
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. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
limit |
No |
Integer |
Number of records to be queried. Value range: 0–100. |
offset |
No |
Integer |
Offset, which indicates the result after the Nth data record is queried. |
order_by |
No |
String |
Sorting field. Numerated values:
If the transferred value is not within the supported enumerated value range, the default sorting field is used. |
order |
No |
String |
Sorting order.
|
Request
None
Response parameters
Parameter |
Type |
Description |
---|---|---|
total |
Integer |
Total number of deployment records. |
pageNum |
Integer |
Number of pages. |
pageSize |
Integer |
Number of records on each page. |
list |
Array of deployment_history objects |
Deployment record list. |
Parameter |
Type |
Description |
---|---|---|
deployment_id |
String |
Deployment record ID. |
task_id |
String |
Deployment task ID. |
status |
String |
Status. |
template_uri |
String |
Template URL. |
template_body |
String |
Template body. |
vars_body |
String |
Parameter body. |
vars_uri |
String |
Parameter URL. |
vars_structure |
String |
Encryption parameter. |
stack_resources |
String |
Stack resource. |
stack_output |
String |
Stack output. |
creator |
String |
Creator. |
create_time |
String |
Creation time. |
modify_time |
String |
Update time. |
Example Request
None
Example Response
{ "total": 2, "pageNum": 1, "pageSize": 10, "list": [ { "id": "6f48e0bd-2b41-46f3-a9e9-5009696cb6f4", "task_id": "5d5e7347-ebe2-4ee5-8bab-6c780b264253", "operation": "EXECUTION_PLAN_APPLY", "status": "EXECUTION_PLAN_APPLY_SUCCEED", "stack_name": "env-8b199252-2a9c-4c65-b9b5-a3164d9255b6", "version": "3.0", "output": "[]", "template_uri": "https://servicestage-bucket-a412b6da56b7444f88ebda92d119b8f0.obsv3.example.com:443/templates/8b199252-2a9c-4c65-b9b5-a3164d9255b6/drSHUVEr.zip", "template_body": null, "vars_body": null, "vars_uri": null, "vars_structure": "\"[]\"", "stack_resources": "[{\"logical_resource_name\":\"eipe05\",\"logical_resource_type\":\"hcs_vpc_eip\",\"physical_resource_id\":\"e38529c4-fb0a-42a4-8dbb-94f1af43489b\",\"resource_attributes\":[{\"key\":\"address\",\"value\":\"71.24.81.15\"},{\"key\":\"bandwidth\",\"value\":\"[{\\\"id\\\":\\\"8fe0a9e4-a659-4638-84ae-996569129b85\\\",\\\"name\\\":\\\"bandwidth-7ca\\\",\\\"share_type\\\":\\\"PER\\\",\\\"size\\\":10}]\"},{\"key\":\"enterprise_project_id\",\"value\":\"0\"},{\"key\":\"id\",\"value\":\"e38529c4-fb0a-42a4-8dbb-94f1af43489b\"},{\"key\":\"name\",\"value\":\"null\"},{\"key\":\"port_id\",\"value\":\"\"},{\"key\":\"private_ip\",\"value\":\"\"},{\"key\":\"publicip\",\"value\":\"[{\\\"ip_address\\\":\\\"71.24.81.15\\\",\\\"port_id\\\":\\\"\\\",\\\"type\\\":\\\"eip\\\"}]\"},{\"key\":\"region\",\"value\":\"roma-dev-1\"},{\"key\":\"status\",\"value\":\"UNBOUND\"},{\"key\":\"timeouts\",\"value\":\"null\"}],\"resource_status\":\"CREATION_COMPLETE\"}]", "deployment_id": "bd3bf753-21cd-4dd2-9c01-0918bc54f6c8", "stack_events": "{\"stack_events\":[{\"event_message\":\"Apply required resource success. \",\"event_type\":\"LOG\"},{\"event_message\":\"Apply complete! Resources: 1 added, 0 changed, 0 destroyed.\",\"event_type\":\"SUMMARY\"},{\"event_message\":\"hcs_vpc_eip.eipe05: Creation complete after 8s [id=e38529c4-fb0a-42a4-8dbb-94f1af43489b]\",\"event_type\":\"CREATION_COMPLETE\",\"resource_name\":\"eipe05\",\"resource_type\":\"hcs_vpc_eip\"},{\"event_message\":\"hcs_vpc_eip.eipe05: Creating...\",\"event_type\":\"CREATION_IN_PROGRESS\",\"resource_name\":\"eipe05\",\"resource_type\":\"hcs_vpc_eip\"},{\"event_message\":\"Creating required resource now\",\"event_type\":\"LOG\"}]}", "raw_data": { "iac_resources": [ { "id": "eipe05", "name": "eipc55", "type": "eip", "status": "INIT", "vars_body": { "bandwidth": { "name": "bandwidth-7ca", "size": 10, "share_type": "PER" }, "enterprise_project_id": "0", "name": "eipc55", "ip_type": "eip", "fixed_Type_auxiliary": "Automatic", "fixed_ip": "", "external_network_auxiliary": "b6d902e0-403e-4f31-a5c0-e79adc9e3bd7", "subnet_auxiliary": "" } } ] }, "ext_info": null, "creator": null, "create_time": "2024-05-18 17:28:53", "modify_time": "2024-05-20 18:38:34" }, { "id": "c8101377-e067-4572-8aca-36049357d3d5", "task_id": "5d5e7347-ebe2-4ee5-8bab-6c780b264253", "operation": "EXECUTION_PLAN_APPLY", "status": "EXECUTION_PLAN_APPLY_SUCCEED", "stack_name": "env-8b199252-2a9c-4c65-b9b5-a3164d9255b6", "version": "5.0", "output": "[]", "template_uri": "https://servicestage-bucket-a412b6da56b7444f88ebda92d119b8f0.obsv3.example.com:443/templates/8b199252-2a9c-4c65-b9b5-a3164d9255b6/Y7B4MyzM.zip", "template_body": null, "vars_body": null, "vars_uri": null, "vars_structure": "\"[]\"", "stack_resources": "[{\"logical_resource_name\":\"eipe05\",\"logical_resource_type\":\"hcs_vpc_eip\",\"physical_resource_id\":\"e38529c4-fb0a-42a4-8dbb-94f1af43489b\",\"resource_attributes\":[{\"key\":\"address\",\"value\":\"71.24.81.15\"},{\"key\":\"bandwidth\",\"value\":\"[{\\\"id\\\":\\\"8fe0a9e4-a659-4638-84ae-996569129b85\\\",\\\"name\\\":\\\"bandwidth-7ca\\\",\\\"share_type\\\":\\\"PER\\\",\\\"size\\\":20}]\"},{\"key\":\"enterprise_project_id\",\"value\":\"0\"},{\"key\":\"id\",\"value\":\"e38529c4-fb0a-42a4-8dbb-94f1af43489b\"},{\"key\":\"name\",\"value\":\"null\"},{\"key\":\"port_id\",\"value\":\"\"},{\"key\":\"private_ip\",\"value\":\"\"},{\"key\":\"publicip\",\"value\":\"[{\\\"ip_address\\\":\\\"71.24.81.15\\\",\\\"port_id\\\":\\\"\\\",\\\"type\\\":\\\"eip\\\"}]\"},{\"key\":\"region\",\"value\":\"roma-dev-1\"},{\"key\":\"status\",\"value\":\"UNBOUND\"},{\"key\":\"timeouts\",\"value\":\"null\"}],\"resource_status\":\"CREATION_COMPLETE\"}]", "deployment_id": "a7cf21b9-19d8-4fa4-b34f-9a63b0e1cc47", "stack_events": "{\"stack_events\":[{\"event_message\":\"Apply required resource success. \",\"event_type\":\"LOG\"},{\"event_message\":\"Apply complete! Resources: 0 added, 1 changed, 0 destroyed.\",\"event_type\":\"SUMMARY\"},{\"event_message\":\"hcs_vpc_eip.eipe05: Modifications complete after 3s [id=e38529c4-fb0a-42a4-8dbb-94f1af43489b]\",\"event_type\":\"UPDATE_COMPLETE\",\"resource_name\":\"eipe05\",\"resource_type\":\"hcs_vpc_eip\"},{\"event_message\":\"hcs_vpc_eip.eipe05: Modifying... [id=e38529c4-fb0a-42a4-8dbb-94f1af43489b]\",\"event_type\":\"UPDATE_IN_PROGRESS\",\"resource_name\":\"eipe05\",\"resource_type\":\"hcs_vpc_eip\"},{\"event_message\":\"Creating required resource now\",\"event_type\":\"LOG\"}]}", "raw_data": { "iac_resources": [ { "id": "eipe05", "resource_id": "e38529c4-fb0a-42a4-8dbb-94f1af43489b", "name": "eipc55-30", "type": "eip", "status": "MARK_UPDATE", "vars_body": { "bandwidth": { "name": "bandwidth-7ca", "size": 20, "share_type": "PER" }, "enterprise_project_id": "0", "name": "eipc55-30", "ip_type": "eip", "fixed_Type_auxiliary": "Automatic", "fixed_ip": "", "external_network_auxiliary": "b6d902e0-403e-4f31-a5c0-e79adc9e3bd7", "subnet_auxiliary": "e1ccfbd0-a2e2-4123-b0f3-ba11dd509ceb" } } ] }, "ext_info": null, "creator": null, "create_time": "2024-05-18 17:29:48", "modify_time": "2024-05-18 17:29:59" } ] }
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