Help Center/ ServiceStage/ API Reference/ Application Management V3 APIs/ Environment/ Querying the Details of a Resource Enabling Record Based on the Environment ID
Updated on 2024-12-16 GMT+08:00

Querying the Details of a Resource Enabling Record Based on the Environment ID

Function

This API is used to query the details of a resource enabling record based on the environment ID.

URI

GET /v3/{project_id}/cas/environments/{environment_id}/iac-resources/provision-histories/{history_id}

Table 1 Path parameter

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.

history_id

Yes

String

Deployment record ID. See Querying Resource Enabling Records Based on the Environment ID.

Request

None

Response parameters

Table 2 Response body parameter

Parameter

Type

Description

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

{
  "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-22 10:10:48"
}

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.