get_datasource_entity_details

DatasourcesApi.get_datasource_entity_details(datasource_id, entity_id, role_id, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)

Get a datasource entity

Returns one entity. Non-global entities require at least read/view on the path datasource (else AUTH-1012). Global entities (IsGlobalEntity=true) skip the datasource permission check. Supports JDBC Bulkload shared instances, JDBC Advanced Load shared clusters, and Streams transformation functions.

Parameters:
  • datasource_id (str) – UUID of the datasource. Rejected with IPV-1045 if missing (also checked for global entities). (required)

  • entity_id (str) – Entity UUID. Rejected with IPV-1045 if not found. (required)

  • role_id (str) – Amorphic role ID. Required for non-global entities with at least read/view 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:

DatasourceEntityDetails

Returns:

Returns the result object.

Request and Response Examples

HTTP: GET /datasources/{datasource_id}/entities/{entity_id}

Success (HTTP 200)

Entity details. JDBC includes attached Dataflows. Streams includes PresignedUrl for ZIP upload. Bulkload may return Message only if the DMS instance was already deleted while status was deleting.

JDBC Bulkload shared instance (sample keys)

{
  "EntityId": "b1e6c2a0-9f4d-4c7a-8f2e-1a2b3c4d5e6f",
  "EntityName": "shared-dms-1",
  "EntityType": "instances",
  "EntityStatus": "available",
  "DatasourceId": "a2f7d3b1-8e5c-4a6f-9d1e-2b3c4d5e6f7a",
  "Dataflows": [],
  "EntityConfig": {
    "SharedInstance": "yes",
    "InstanceClass": "dms.t3.medium",
    "AllocatedStorage": 50
  }
}

Streams transformation function

{
  "EntityId": "c3d8e4f2-9a6b-5c7d-0e1f-3a4b5c6d7e8f",
  "EntityName": "transform_fn",
  "EntityType": "functions",
  "PresignedUrl": "https://amorphic-misc.s3.amazonaws.com/streams/data-transformations/...?X-Amz-Algorithm=...",
  "EntityConfig": {
    "LambdaHandler": "index.handler",
    "MemorySize": 128
  }
}

Errors

Documented error codes: AUTH-1012, IPV-1045, GE-1020, DB-1003.

HTTP 400

Validation or authorization failure. Body is {“Message”: “<CODE> - <text>”}. Common codes: AUTH-1012 (no view access on non-global), IPV-1045 (missing entity or datasource).

EntityId not found

{
  "Message": "IPV-1045 - Invalid parameter - EntityId(b1e6c2a0-9f4d-4c7a-8f2e-1a2b3c4d5e6f), value either missing or is invalid."
}

Caller lacks view access

{
  "Message": "AUTH-1012 - User: user1 requires at least read-only access on the resource to perform this action."
}

HTTP 500

Backend failure. Body is {“Message”: “<CODE> - <text>”}. Example: GE-1020 / DB-1003 on Bulkload status sync failures. Unsupported datasource types have no handler.

Failed to sync entity metadata

{
  "Message": "GE-1020 - Unable to update Entities table, please retry or contact administrator"
}