delete_datasource_entity¶
- DatasourcesApi.delete_datasource_entity(datasource_id, entity_id, role_id, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Delete a datasource entity
Deletes a shared entity. Requires at least edit permission on the path datasource (else AUTH-1012). Entity must belong to the path datasource. Advanced dedicated entity_id equal to datasource_id cannot be deleted (GE-1034). Supports instances, functions, and kafka-cluster entity types. Not idempotent when already deleted.
- Parameters:
datasource_id (str) – UUID of the datasource. Rejected with IPV-1045 if missing. (required)
entity_id (str) – Shared entity UUID. Rejected with IPV-1045 if missing or associated with another datasource. (required)
role_id (str) – Amorphic role ID. Must grant at least edit access on the datasource. (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 /datasources/{datasource_id}/entities/{entity_id}
Success (HTTP 200)¶
Deletion accepted. Typical Message values: “Successfully deleted entity”, “Successfully triggered entity deletion”, “Successfully triggered entity deletion and is running in background” (Advanced with ClusterArn).
Sync delete
{
"Message": "Successfully deleted entity"
}
Async delete triggered
{
"Message": "Successfully triggered entity deletion and is running in background"
}
Errors¶
Documented error codes: AUTH-1012, IPV-1045, GE-1034, DTSC-1007, GE-1020, DB-1003, GE-1075.
HTTP 400
Validation or authorization failure. Body is {“Message”: “<CODE> - <text>”}. Common codes: AUTH-1012 (no edit access), IPV-1045 (missing entity or wrong datasource), GE-1034 when raised as InvalidInput (e.g. Bulkload active DMS tasks blocking delete).
EntityId not found
{
"Message": "IPV-1045 - Invalid parameter - EntityId(b1e6c2a0-9f4d-4c7a-8f2e-1a2b3c4d5e6f), value either missing or is invalid."
}
Caller lacks edit access
{
"Message": "AUTH-1012 - User: user1 requires at least edit access on the resource to perform this action."
}
HTTP 500
Backend failure. Body is {“Message”: “<CODE> - <text>”}. Common codes: GE-1034 (busy status, active MSK/Streams dependents, dedicated Advanced cannot delete), DTSC-1007 (schedule cleanup), GE-1020 / DB-1003 / GE-1075 (persist or S3 cleanup).
Advanced dedicated entity_id equals datasource_id
{
"Message": "GE-1034 - Dedicated entity cannot be deleted."
}