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

The following fields are returned by SELECT queries:

Successful response

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}.
archiveTimestring (google-datetime)Output 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

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, datasetsId, consentStoresId, userDataMappingsIdGets the specified User data mapping.
listselectprojectsId, locationsId, datasetsId, consentStoresIdpageSize, pageToken, filterLists the User data mappings in the specified consent store.
createinsertprojectsId, locationsId, datasetsId, consentStoresIdCreates a new User data mapping in the parent consent store.
patchupdateprojectsId, locationsId, datasetsId, consentStoresId, userDataMappingsIdupdateMaskUpdates the specified User data mapping.
deletedeleteprojectsId, locationsId, datasetsId, consentStoresId, userDataMappingsIdDeletes the specified User data mapping.
archiveexecprojectsId, locationsId, datasetsId, consentStoresId, userDataMappingsIdArchives the specified User data mapping.

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.

NameDatatypeDescription
consentStoresIdstring
datasetsIdstring
locationsIdstring
projectsIdstring
userDataMappingsIdstring
filterstring
pageSizeinteger (int32)
pageTokenstring
updateMaskstring (google-fieldmask)

SELECT examples

Gets the specified User data mapping.

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

INSERT examples

Creates a new User data mapping in the parent consent store.

INSERT INTO google.healthcare.user_data_mappings (
data__name,
data__dataId,
data__userId,
data__resourceAttributes,
projectsId,
locationsId,
datasetsId,
consentStoresId
)
SELECT
'{{ name }}',
'{{ dataId }}',
'{{ userId }}',
'{{ resourceAttributes }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ datasetsId }}',
'{{ consentStoresId }}'
RETURNING
name,
archiveTime,
archived,
dataId,
resourceAttributes,
userId
;

UPDATE examples

Updates the specified User data mapping.

UPDATE google.healthcare.user_data_mappings
SET
data__name = '{{ name }}',
data__dataId = '{{ dataId }}',
data__userId = '{{ userId }}',
data__resourceAttributes = '{{ resourceAttributes }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND datasetsId = '{{ datasetsId }}' --required
AND consentStoresId = '{{ consentStoresId }}' --required
AND userDataMappingsId = '{{ userDataMappingsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
archiveTime,
archived,
dataId,
resourceAttributes,
userId;

DELETE examples

Deletes the specified User data mapping.

DELETE FROM google.healthcare.user_data_mappings
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND datasetsId = '{{ datasetsId }}' --required
AND consentStoresId = '{{ consentStoresId }}' --required
AND userDataMappingsId = '{{ userDataMappingsId }}' --required;

Lifecycle Methods

Archives the specified User data mapping.

EXEC google.healthcare.user_data_mappings.archive 
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@datasetsId='{{ datasetsId }}' --required,
@consentStoresId='{{ consentStoresId }}' --required,
@userDataMappingsId='{{ userDataMappingsId }}' --required;