Analysis: GCP Delete
Analysis: GCP Delete
#340800
Description
The /analysis/cloud/gcp/<analysisId> resource can be used to delete the audit and all associated scheduler entries of the cloud analysis specified by <analysisId>.
- The single-day and 60-day historical audits are removed, if they exist.
- The audit and all associated scheduler entries, are deleted, if they exist.
When executing the delete operation in an environment observe the following:
- When deleting an audit for an environment associated with a single account, the operation proceeds as outlined above.
- When deleting an audit, if Densify determines that there is a many-to-one relationship for this connection, then the delete request fails. This type of multi-account connection can only be created through the Cloud Connection Wizard and must be deleted through the Cloud Connection Wizard.
During a delete operation, any attempt to access other associated endpoints related to the specified <analysisId> (i.e. GET, PUT, POST) will trigger a "400 Bad Request" error response.
While the delete operation is in progress, you can check the status (using the /analysis/cloud/gcp/<analysisId>/status resource) or wait for the results to be published to an optional webhook URI.
Collected data is saved for the defined retention period and the environment and associated analysis structure are saved in case you want to generate reports on the historical data or restart data collection. Since the environment and analyses are not deleted, a GET call for the specified <analysisId> will always succeed regardless of whether the associated connection has been deleted.
If you use a GET call to list available environment and analyses, for which the audits have been deleted, they are still listed. You can reestablish the audit without have to re-create the analysis. You will still see the data in the Densify Console.
Resource
/analysis/cloud/gcp/analysisId
Supported Operations
Table: GCP Supported Operations
Operation |
HTTP Method |
Input |
Output |
Description |
DELETE /analysis/cloud/gcp/<analysisId> |
Request Body Parameter:
|
This resource operation is used to delete audit and audit-related items for the specified analysis. |
Table: GCP Analysis Path Parameters
Parameter Name |
Type |
Description |
string |
The unique, referenced ID of the GCP analysis. |
Table: GCP Analysis Request Body Parameters
Parameter Name |
Type |
Description |
(optional) |
|
The webhook definition to an external application. Status can be sent to the webhook-defined application when the delete operation is complete. See Parameters for details of each parameter in the webhook definition. |
Table: GCP Analysis Response Schema
Element |
Type |
Filter/Sort |
Description |
string |
|
The informational message for the status response that is returned. |
|
number |
|
The HTTP response code of the request. Possible status values include:
|
Examples
Example: Deleting GCP Data Collection
The following example shows you how to delete the audit and send the results to a WebHook.
Example: Deleting an Audit that is in Progress
The following example shows you the response if you attempt to delete an audit that is in progress.
Example: Deleting an Aggregate Audit
The following example shows you the response if you attempt to delete an audit that has more than one audit associated with the specified analysis ID.
If Densify determines that there is a many-to-one relationship for this connection, then the delete request fails. This type of multi-subscription connection can only be created through the Cloud Connection Wizard and must be deleted through the Cloud Connection Wizard.

Request:
DELETE /analysis/cloud/gcp/fd9234a7b43c-7e4b-4084-8f46-b898c2c2
Response:
{
"message": "Account dfc04848-3848-44c0-b85a-02311951de36 was created via UI and subscriptions [cc377154-9605-4cb0-8b41-1b39e1c4ac0f,3d4ba999-cbd8-40b8-9998-574be6824a97] are incompatible with API use; please delete via UI",
"status": 500
}