Deleting an Environment Resource Based on the Environment ID
Function
This API is used to delete an environment resource based on the environment ID.
URI
DELETE /v3/{project_id}/cas/environments/{environment_id}/iac-resources/{resource_id}
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. |
resource_id |
Yes |
String |
Resource ID. |
Request
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
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. |
Content-Type |
Yes |
String |
Message body type (format). Default value: application/json;charset=utf8. |
Response parameters
Parameter |
Type |
Description |
---|---|---|
id |
String |
Environment ID. |
name |
String |
Environment name. |
description |
String |
Environment description. |
project_id |
String |
Project ID. |
enterprise_project_id |
String |
Enterprise project ID. |
deploy_mode |
String |
Environment type.
|
vpc_id |
String |
VPC ID. |
creator |
String |
Creator. |
create_time |
Integer |
Creation time. |
update_time |
Integer |
Update time. |
labels |
Array of objects |
Label. You can use TMS to query resources by labels. See Table 5. |
type |
String |
Whether the Kubernetes environment is of the HA type.
|
resource_create_mode |
String |
Resource configuration mode.
|
iac_resources |
Array of objects |
Resource template. See Table 4. |
iac_task_status |
String |
Task status.
|
availability_zone |
Array of String |
List of AZs. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Resource ID. |
name |
String |
Resource name. |
type |
String |
Resource type.
|
status |
String |
Status of an environment resource.
|
resource_id |
String |
Resource instance ID. |
custom_tf |
String |
Terraform template. |
vars_body |
Map<String, Object> |
Resource variable. |
vars_structure |
Array of objects |
Variable structure. See Table 6. |
Example Request
None
Example Response
{ "id" : "17a5baa0-8352-4fa9-94e7-fad2569a20a2", "name" : "hldtest1", "alias" : null, "description" : "", "project_id" : "0ada17d53d00d5cc2f8ac00ca4b5b119", "enterprise_project_id" : "0", "charge_mode" : "provided", "vpc_id" : "0000653d-e8b9-47ce-91d2-2c728f3338a4", "base_resources" : [], "optional_resources" : null, "creator" : "paas_roma", "create_time" : 1708915381226, "update_time" : 1709103342541, "deploy_mode" : "virtualmachine", "vm_cluster_size" : 50, "status" : null, "broker_id" : null, "labels" : [], "offline_hosts" : null, "alert_status" : null, "resource_create_mode" : "iac", "iac_resources" : [{ "id" : "a12345", "name" : "cce12323qq", "type" : "rds", "status" : "INIT", "vars_structure" : [{ "var_key" : "www", "var_value" : "" } ], "vars_body" : { "var_key" : "11qwqqw" } } ], "iac_task_status" : null, "component_count" : 0 }
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