根据环境ID查询资源开通历史
功能介绍
此API用于根据环境ID查询资源开通历史。
URI
GET /v3/{project_id}/cas/environments/{environment_id}/iac-resources/provision-histories
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
project_id |
是 |
String |
租户项目ID。获取方法,请参考获取项目ID。 |
environment_id |
是 |
String |
环境ID。获取方法,请参考获取所有环境。 |
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
limit |
否 |
Integer |
指定个数,取值[0, 100]。 |
offset |
否 |
Integer |
指定偏移量,表示查询第n条数据后的结果。 |
order_by |
否 |
String |
排序字段。 排序字段支持如下枚举值:
传值不在支持的枚举值范围内按默认排序字段排序。 |
order |
否 |
String |
排序方式。
|
请求参数
无
响应参数
参数 |
参数类型 |
描述 |
---|---|---|
total |
Integer |
部署历史总数。 |
pageNum |
Integer |
页数。 |
pageSize |
Integer |
每页条数。 |
list |
Array of deployment_history objects |
部署历史列表。 |
参数 |
参数类型 |
描述 |
---|---|---|
deployment_id |
String |
部署历史ID。 |
task_id |
String |
部署任务ID。 |
status |
String |
状态。 |
template_uri |
String |
模板URL。 |
template_body |
String |
模板body。 |
vars_body |
String |
参数body。 |
vars_uri |
String |
参数URL。 |
vars_structure |
String |
加密参数。 |
stack_resources |
String |
堆栈资源。 |
stack_output |
String |
堆栈输出。 |
creator |
String |
创建人。 |
create_time |
String |
创建时间。 |
modify_time |
String |
修改时间。 |
请求示例
无
响应示例
{ "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" } ] }
状态码
状态码 |
描述 |
---|---|
200 |
操作成功。 |
400 |
错误的请求。 |
404 |
请求对象不存在。 |
500 |
内部错误。 |
错误码
错误码格式为:SVCSTG.00100.[Error_ID],例如:SVCSTG.00100400。错误码说明请参考ServiceStage错误码。