entities
Creates, updates, deletes, gets or lists an entities
resource.
Overview
Name | entities |
Type | Resource |
Id | google.connectors.entities |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. Resource name of the Entity. Format: projects/{project}/locations/{location}/connections/{connection}/entityTypes/{type}/entities/{id} |
fields | object | Fields of the entity. The key is name of the field and the value contains the applicable google.protobuf.Value entry for this field. |
metadata | object | Metadata like service latency, etc. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. Resource name of the Entity. Format: projects/{project}/locations/{location}/connections/{connection}/entityTypes/{type}/entities/{id} |
fields | object | Fields of the entity. The key is name of the field and the value contains the applicable google.protobuf.Value entry for this field. |
metadata | object | Metadata like service latency, etc. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , connectionsId , entityTypesId , entitiesId | Gets a single entity row matching the entity type and entity id specified in the request. | |
list | select | projectsId , locationsId , connectionsId , entityTypesId | pageSize , pageToken , sortBy , sortOrder , conditions | Lists entity rows of a particular entity type contained in the request. Note: 1. Currently, only max of one 'sort_by' column is supported. 2. If no 'sort_by' column is provided, the primary key of the table is used. If zero or more than one primary key is available, we default to the unpaginated list entities logic which only returns the first page. 3. The values of the 'sort_by' columns must uniquely identify an entity row, otherwise undefined behaviors may be observed during pagination. 4. Since transactions are not supported, any updates, inserts or deletes during pagination can lead to stale data being returned or other unexpected behaviors. |
create | insert | projectsId , locationsId , connectionsId , entityTypesId | Creates a new entity row of the specified entity type in the external system. The field values for creating the row are contained in the body of the request. The response message contains a Entity message object returned as a response by the external system. | |
patch | update | projectsId , locationsId , connectionsId , entityTypesId , entitiesId | Updates an existing entity row matching the entity type and entity id specified in the request. The fields in the entity row that need to be modified are contained in the body of the request. All unspecified fields are left unchanged. The response message contains a Entity message object returned as a response by the external system. | |
update_entities_with_conditions | update | projectsId , locationsId , connectionsId , entityTypesId | conditions | Updates entities based on conditions specified in the request and not on entity id. |
delete | delete | projectsId , locationsId , connectionsId , entityTypesId , entitiesId | Deletes an existing entity row matching the entity type and entity id specified in the request. | |
delete_entities_with_conditions | delete | projectsId , locationsId , connectionsId , entityTypesId | conditions | Deletes entities based on conditions specified in the request and not on entity id. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
connectionsId | string | |
entitiesId | string | |
entityTypesId | string | |
locationsId | string | |
projectsId | string | |
conditions | string | |
pageSize | integer (int32) | |
pageToken | string | |
sortBy | string | |
sortOrder | string |
SELECT
examples
- get
- list
Gets a single entity row matching the entity type and entity id specified in the request.
SELECT
name,
fields,
metadata
FROM google.connectors.entities
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND connectionsId = '{{ connectionsId }}' -- required
AND entityTypesId = '{{ entityTypesId }}' -- required
AND entitiesId = '{{ entitiesId }}' -- required;
Lists entity rows of a particular entity type contained in the request. Note: 1. Currently, only max of one 'sort_by' column is supported. 2. If no 'sort_by' column is provided, the primary key of the table is used. If zero or more than one primary key is available, we default to the unpaginated list entities logic which only returns the first page. 3. The values of the 'sort_by' columns must uniquely identify an entity row, otherwise undefined behaviors may be observed during pagination. 4. Since transactions are not supported, any updates, inserts or deletes during pagination can lead to stale data being returned or other unexpected behaviors.
SELECT
name,
fields,
metadata
FROM google.connectors.entities
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND connectionsId = '{{ connectionsId }}' -- required
AND entityTypesId = '{{ entityTypesId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND sortBy = '{{ sortBy }}'
AND sortOrder = '{{ sortOrder }}'
AND conditions = '{{ conditions }}';
INSERT
examples
- create
- Manifest
Creates a new entity row of the specified entity type in the external system. The field values for creating the row are contained in the body of the request. The response message contains a Entity
message object returned as a response by the external system.
INSERT INTO google.connectors.entities (
data__fields,
data__metadata,
projectsId,
locationsId,
connectionsId,
entityTypesId
)
SELECT
'{{ fields }}',
'{{ metadata }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ connectionsId }}',
'{{ entityTypesId }}'
RETURNING
name,
fields,
metadata
;
# Description fields are for documentation purposes
- name: entities
props:
- name: projectsId
value: string
description: Required parameter for the entities resource.
- name: locationsId
value: string
description: Required parameter for the entities resource.
- name: connectionsId
value: string
description: Required parameter for the entities resource.
- name: entityTypesId
value: string
description: Required parameter for the entities resource.
- name: fields
value: object
description: >
Fields of the entity. The key is name of the field and the value contains the applicable `google.protobuf.Value` entry for this field.
- name: metadata
value: object
description: >
Metadata like service latency, etc.
UPDATE
examples
- patch
- update_entities_with_conditions
Updates an existing entity row matching the entity type and entity id specified in the request. The fields in the entity row that need to be modified are contained in the body of the request. All unspecified fields are left unchanged. The response message contains a Entity
message object returned as a response by the external system.
UPDATE google.connectors.entities
SET
data__fields = '{{ fields }}',
data__metadata = '{{ metadata }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND connectionsId = '{{ connectionsId }}' --required
AND entityTypesId = '{{ entityTypesId }}' --required
AND entitiesId = '{{ entitiesId }}' --required
RETURNING
name,
fields,
metadata;
Updates entities based on conditions specified in the request and not on entity id.
UPDATE google.connectors.entities
SET
data__fields = '{{ fields }}',
data__metadata = '{{ metadata }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND connectionsId = '{{ connectionsId }}' --required
AND entityTypesId = '{{ entityTypesId }}' --required
AND conditions = '{{ conditions}}'
RETURNING
metadata,
response;
DELETE
examples
- delete
- delete_entities_with_conditions
Deletes an existing entity row matching the entity type and entity id specified in the request.
DELETE FROM google.connectors.entities
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND connectionsId = '{{ connectionsId }}' --required
AND entityTypesId = '{{ entityTypesId }}' --required
AND entitiesId = '{{ entitiesId }}' --required;
Deletes entities based on conditions specified in the request and not on entity id.
DELETE FROM google.connectors.entities
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND connectionsId = '{{ connectionsId }}' --required
AND entityTypesId = '{{ entityTypesId }}' --required
AND conditions = '{{ conditions }}';