update_datasource_entity

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

Update a datasource entity

Updates an entity. Requires at least edit permission on the path datasource (else AUTH-1012). Shared entities use a UUID entity_id and must belong to the path datasource. Non-UUID entity_id updates a JDBC Bulkload dedicated DMS instance and requires EntityConfig.DataflowId. Advanced dedicated entity_id equal to datasource_id cannot be edited (GE-1034). Not idempotent.

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

  • entity_id (str) – Shared entity UUID, or dedicated JDBC Bulkload DMS instance name (non-UUID) when updating a dedicated instance. (required)

  • role_id (str) – Amorphic role ID. Must grant at least edit access on the datasource. (required)

  • datasource_entity_details (DatasourceEntityDetails) – (required)

  • content_type (str) – Must be application/json.

  • _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:

UpdateDatasourceEntityResponse

Returns:

Returns the result object.

Request and Response Examples

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

Request

JDBC Bulkload shared instance update (sample)

{
  "EntityName": "shared-dms-1",
  "EntityConfig": {
    "InstanceClass": "dms.t3.large",
    "AllocatedStorage": 100,
    "ScheduleConfig": {
      "ScheduleEnabled": "no"
    }
  }
}

JDBC Bulkload dedicated instance (non-UUID entity_id)

{
  "EntityName": "dedicated-repl-1",
  "EntityConfig": {
    "DataflowId": "b1e6c2a0-9f4d-4c7a-8f2e-1a2b3c4d5e6f",
    "InstanceClass": "dms.t3.medium",
    "AllocatedStorage": 50,
    "ApplyImmediately": "true"
  }
}

Success (HTTP 200)

Update accepted. Typical Message: “Successfully triggered entity updation and is running in background” (async). Advanced metadata-only updates may return “Successfully updated entity”.

Async update triggered

{
  "Message": "Successfully triggered entity updation and is running in background"
}

Advanced metadata-only update

{
  "Message": "Successfully updated entity"
}

Errors

Documented error codes: AUTH-1012, IPV-1045, SCH-1015, IPV-1008, DTSC-1013, GE-1034, DTSC-1007, GE-1020, DB-1002.

HTTP 400

Validation or authorization failure. Body is {“Message”: “<CODE> - <text>”}. Common codes: AUTH-1012 (no edit access), IPV-1045 (missing entity, wrong datasource association, invalid config), SCH-1015 (schedule), IPV-1008 (AutoTerminationTime), DTSC-1013 (cannot clear global with dependents).

Entity belongs to another datasource

{
  "Message": "IPV-1045 - EntityId (b1e6...) is associated with datasource sales-ds (a2f7...). Please update the entity from the corresponding datasource. Access denied."
}

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>”} or a plain Message. Common codes: GE-1034 (busy status, immutable AZ/public, dedicated Advanced cannot edit, missing DataflowId for dedicated), DTSC-1007 (DMS modify constraints), GE-1020 / DB-1002 (persist).

Advanced dedicated entity_id equals datasource_id

{
  "Message": "GE-1034 - Dedicated entity cannot be edited."
}