delete_data_classification¶
- DatasetsApi.delete_data_classification(id, role_id, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Delete the data classification item
Deletes a data classification by name. The caller must have dataclassifications.fullaccess permission. Deletion is blocked when one or more datasets still reference this classification — remove the classification from those datasets first. Usage examples: DELETE /datasets/dataclassifications/testclassification — deletes the “testclassification” classification if no datasets reference it.
- Parameters:
id (str) – DataClassificationName of the classification to delete. (required)
role_id (str) – The active Amorphic role ID of the caller. (required)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
- Returns:
Returns the result object.
Request and Response Examples¶
HTTP: DELETE /datasets/dataclassifications/{id}
Success (HTTP 200)¶
Data classification deleted successfully.
Request / response example
{
"Message": "Successfully deleted dataclassification",
"DataClassificationName": "testclassification"
}
Errors¶
Documented error codes: IPV-1002, GE-1118, DB-1003, GE-1008.
HTTP 400
Classification not found (IPV-1002).
Request / response example
{
"Message": "IPV-1002 - Invalid DataClassificationName - testclassification, resource not found."
}
HTTP 500
Backend failure. GE-1118 when datasets still reference this classification. DB-1003 on DynamoDB delete failure.
Datasets still reference this classification
{
"Message": "GE-1118 - Dependent datasets found!, please check dependent datasets in the details page"
}
DynamoDB delete failed
{
"Message": "DB-1003 - Failed to delete entry in dynamoDB table, please check for errors"
}
Unexpected backend error
{
"Message": "GE-1008 - Could not complete the request. Please try again."
}