Skip to content

Delete AWS Role Cloud Account



POST /api/v1/cloud_account/{cloud_account_uuid}/do/delete

Overview

Delete the AWS assume_role account in the current Workspace and its collector configuration.

Before Calling and Usage Steps

Use the target Workspace API Key. The four management entry points require cloudAccount.accountManage and are explicitly denied in the Free Plan. The account scope is the Workspace to which the Key belongs. Temporary credential reading requires separate cloudAccount.temporaryCredentialsRead; management permissions do not automatically include it. Platform authorization is selected according to this Workspace's brand and the cn/intl partition, and does not fall back to other brands. All responses include Cache-Control: no-store and Pragma: no-cache.

You must POST an empty JSON object {}; extra Body fields such as source/Workspace/vendor are not accepted. First confirm that existing collectors and external automation no longer depend on the record; first issue the collector uninstall script, then soft-delete the collector and cloud account configuration and commit. It does not delete the customer's AWS IAM Role, permissions/trust policy, and does not revoke temporary credentials already issued by AWS; if access needs to be stopped during their remaining validity period, the customer must manage AWS authorization separately.

Database and external script uninstallation are not atomic; on failure, the script may be stopped but the configuration not deleted. Query the configuration and actual collection tasks first; do not assume nothing changed based on a 500. Nonexistent/cross-Workspace/deleted returns 404; do not treat duplicate requests as successful no-ops; only AWS assume_role is supported.

Route Parameters

Parameter Name Type Required Description
cloud_account_uuid string Y Path parameter, required. Must be a non-deleted AWS assume_role record; do not use the customer Account ID, role ARN, or another Workspace UUID.
Empty string allowed: False
Example: clac_example
How to obtain or fill in: Obtain the current Workspace clac_ record from Cloud Account List content.data[].uuid or the content.uuid returned after successful creation.

Request Headers

Parameter Name Type Required Description
DF-API-KEY string Y OpenAPI authentication credential for the Workspace.
Example: <DF-API-KEY>
How to obtain or fill in: Obtain an OpenAPI Key with this operation permission from API Key Management in the target Workspace.

Additional Parameter Notes

Only AWS assume_role in this Workspace is supported; cloudAccount.accountManage is required, and the body must be {}.

Deletion follows the Front behavior: soft-delete the cloud account, remove associated collectors and tasks, and do not delete historical observability data or the customer's AWS IAM Role. Enqueuing to a Private Func does not mean uninstallation is complete. Before execution, confirm the target UUID and associated collectors; if collection needs to be retained, stop the deletion.

Repeated deletion returns the original not-found error and does not automatically become a success. Recreating after deletion generates a new UUID/External ID; the customer must reconfigure the trust policy and collectors, and previous request results cannot be restored. Customer Roles are managed by the customer; the platform does not automatically roll back across AWS.

Request Example

curl --request POST 'https://openapi.guance.com/api/v1/cloud_account/clac_example/do/delete' \
  -H 'DF-API-KEY: <DF-API-KEY>' \
  -H 'Content-Type: application/json' \
  --data-raw '{}'

Response

HTTP 200, application/json. The example below shows the main fields that can be read directly.

Field Type Description
content.uuid string UUID of the deleted cloud account.
content.declaration object Public declaration.
Response Header Type Description
Cache-Control string no-store; caching is disabled for both successful responses and errors on this blueprint route.
Pragma string no-cache.
{
  "code": 200,
  "content": {
    "uuid": "clac_example",
    "declaration": {}
  },
  "errorCode": "",
  "message": "",
  "success": true,
  "traceId": "TRACE-EXAMPLE"
}

Error Responses

For authentication, rate limiting, and common request errors, see Common Error Definitions.

Public declaration/authentication layer failures may only have the standard content={}; validationResult is not guaranteed to appear. After the four management entry points enter business adaptation, creation/modification failures may include security operation results; their internal ordinary 5xx responses uniformly return 500 ft.CodeError themselves, and content retains the validation state for this request without being globally replaced with InternalServerError. Only ordinary uncaught exceptions at the temporary credential entry point go through the global 500 ft.InternalServerError. Do not rely only on HTTP or success; you must make the judgment based on the operation result, validation result, saved, and read-back record.

HTTP Status errorCode Trigger Condition Message or Response Description Handling
406 ft.ParameterValidationFailed Request field is missing, or the field value violates the declared validation conditions Parameter parsing failed Verify the parameter location, field name, type, and value.
400 ft.RequestJsonFormatError Invalid request JSON syntax Request JSON format error Correct the JSON according to content.reason, line, and column.
400 ft.JsonFormatError Body top level is not a JSON object Partial JSON file format error Submit a JSON object that matches the example.
403 ft.Forbidden The four management entry points are rejected by an explicit version check in a Free Plan Workspace You do not have permission to perform this operation Verify the Workspace version and management permissions; switch to a target Workspace with the corresponding capabilities and authorization.
404 ft.CloudAccountNotFound The target UUID is not within the scope of non-deleted cloud accounts in the current Workspace Cloud account does not exist Re-obtain the target from the current Workspace's AWS Role cloud account list content.data[].uuid; this read does not wait for the write lock.
404 ft.InvalidCloudAccountType The supplied or target record is not AWS assume_role Invalid cloud account type Obtain the record from the current Workspace's dedicated cloud account list; legacy accessKey/role and other vendors cannot be used for this entry point.
400 ft.ParamsValidateError JSON Body is not an empty object {}, or the previously saved AWS assume_role configuration does not conform to account/role/External ID specifications Parameter validation failed: {} Submit only {} in the request; if the historical configuration is invalid, verify and fix it through a cloud account management process with permissions; do not pass dryRun/configuration update fields to this API.
429 ft.OperationTooFrequently Write lock contention/lock lost, or the configuration is modified by another request while waiting Your operation is too frequent, please try again later Read back by UUID before limited backoff; do not overwrite a new submission based on an old snapshot; if the creation result is unknown, first recover by Account ID.
500 ft.CodeError An internal exception occurs while reading the cloud account/historical JSON/collector information or displaying platform authorization Internal processing error Retain the traceId and Query, and verify the historical configuration/database and platform authorization; this read does not perform collector script deployment or configuration writes.

Feedback

Is this page helpful?