Skip to main content

user_data_mappings

Creates, updates, deletes, gets or lists a user_data_mappings resource.

Overview

Nameuser_data_mappings
TypeResource
Idgoogle.healthcare.user_data_mappings

Fields

NameDatatypeDescription
namestringResource name of the User data mapping, of the form projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/userDataMappings/{user_data_mapping_id}.
archiveTimestringOutput only. Indicates the time when this mapping was archived.
archivedbooleanOutput only. Indicates whether this mapping is archived.
dataIdstringRequired. A unique identifier for the mapped resource.
resourceAttributesarrayAttributes of the resource. Only explicitly set attributes are displayed here. Attribute definitions with defaults set implicitly apply to these User data mappings. Attributes listed here must be single valued, that is, exactly one value is specified for the field "values" in each Attribute.
userIdstringRequired. User's UUID provided by the client.

Methods

NameAccessible byRequired ParamsDescription
getSELECTconsentStoresId, datasetsId, locationsId, projectsId, userDataMappingsIdGets the specified User data mapping.
listSELECTconsentStoresId, datasetsId, locationsId, projectsIdLists the User data mappings in the specified consent store.
createINSERTconsentStoresId, datasetsId, locationsId, projectsIdCreates a new User data mapping in the parent consent store.
deleteDELETEconsentStoresId, datasetsId, locationsId, projectsId, userDataMappingsIdDeletes the specified User data mapping.
patchUPDATEconsentStoresId, datasetsId, locationsId, projectsId, userDataMappingsIdUpdates the specified User data mapping.
archiveEXECconsentStoresId, datasetsId, locationsId, projectsId, userDataMappingsIdArchives the specified User data mapping.

SELECT examples

Lists the User data mappings in the specified consent store.

SELECT
name,
archiveTime,
archived,
dataId,
resourceAttributes,
userId
FROM google.healthcare.user_data_mappings
WHERE consentStoresId = '{{ consentStoresId }}'
AND datasetsId = '{{ datasetsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

Use the following StackQL query and manifest file to create a new user_data_mappings resource.

/*+ create */
INSERT INTO google.healthcare.user_data_mappings (
consentStoresId,
datasetsId,
locationsId,
projectsId,
name,
dataId,
userId,
resourceAttributes
)
SELECT
'{{ consentStoresId }}',
'{{ datasetsId }}',
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ dataId }}',
'{{ userId }}',
'{{ resourceAttributes }}'
;

UPDATE example

Updates a user_data_mappings resource.

/*+ update */
UPDATE google.healthcare.user_data_mappings
SET
name = '{{ name }}',
dataId = '{{ dataId }}',
userId = '{{ userId }}',
resourceAttributes = '{{ resourceAttributes }}'
WHERE
consentStoresId = '{{ consentStoresId }}'
AND datasetsId = '{{ datasetsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND userDataMappingsId = '{{ userDataMappingsId }}';

DELETE example

Deletes the specified user_data_mappings resource.

/*+ delete */
DELETE FROM google.healthcare.user_data_mappings
WHERE consentStoresId = '{{ consentStoresId }}'
AND datasetsId = '{{ datasetsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND userDataMappingsId = '{{ userDataMappingsId }}';