entities
Creates, updates, deletes, gets or lists a entities
resource.
Overview
Name | entities |
Type | Resource |
Id | google.connectors.entities |
Fields
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. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | connectionsId, entitiesId, entityTypesId, locationsId, projectsId | Gets a single entity row matching the entity type and entity id specified in the request. |
list | SELECT | connectionsId, entityTypesId, locationsId, projectsId | 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 | connectionsId, entityTypesId, locationsId, projectsId | 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. |
delete | DELETE | connectionsId, entitiesId, entityTypesId, locationsId, projectsId | Deletes an existing entity row matching the entity type and entity id specified in the request. |
patch | UPDATE | connectionsId, entitiesId, entityTypesId, locationsId, projectsId | 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. |
SELECT
examples
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
FROM google.connectors.entities
WHERE connectionsId = '{{ connectionsId }}'
AND entityTypesId = '{{ entityTypesId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new entities
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.connectors.entities (
connectionsId,
entityTypesId,
locationsId,
projectsId,
fields
)
SELECT
'{{ connectionsId }}',
'{{ entityTypesId }}',
'{{ locationsId }}',
'{{ projectsId }}',
'{{ fields }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: fields
value: object
UPDATE
example
Updates a entities
resource.
/*+ update */
UPDATE google.connectors.entities
SET
fields = '{{ fields }}'
WHERE
connectionsId = '{{ connectionsId }}'
AND entitiesId = '{{ entitiesId }}'
AND entityTypesId = '{{ entityTypesId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';
DELETE
example
Deletes the specified entities
resource.
/*+ delete */
DELETE FROM google.connectors.entities
WHERE connectionsId = '{{ connectionsId }}'
AND entitiesId = '{{ entitiesId }}'
AND entityTypesId = '{{ entityTypesId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';